News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Soundtracker DMA v2.0 released

Started by Zik, 22:01, 21 June 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zik

#100
I am Zik (!) and I do not think that programming PSG registers faster will significantly improve what you can hear (however I still have an idea to test!). Like said above, both CPC old and Plus have the same audio capabilities (I mean that they can output the same sounds).

What is more important is how you convert samples. Here is an example. I chose a voice, in connection with the previous message from @ComSoft6128 .
The source file is this one: https://freesound.org/people/milton./sounds/86878/

The SDD file can be loaded by Soundtracker DMA. Both WAV files show the result, as recorded on my Plus.
Note that both samples together already fill up almost all the 16KB of memory available for samples.

The file named "welcome_bad" (sorry for the biased filename!) was converted using the natural, simple direct linear conversion to 4 bit (actually, not strictly. But result would be a bit better but similar). AFAIK, this is what is used quite everywhere. It works ok on audio with little dynamics and full volume.
The other file was converted using my not-as-simple method which takes into account the fact that the volume of the PSG is logarithmic.

I voluntarily chose a sound with a little dynamic for the demonstration. Both could probably sound a little better with a bit of preprocessing. Here, I only applied a bit of gain.

ComSoft6128

Hi @Zik ,


The Welcome.sdd file gives the error message - "Incomplete Loading" :(

Zik

#102
Quote from: ComSoft6128 on 06:37, 01 September 21The Welcome.sdd file gives the error message - "Incomplete Loading"
@ComSoft6128 , did you try from an empty session? You may try CLEAR->SONG first.
The file contains two samples, it looks well formed. "Incomplete loading" here means only one sample could be loaded. Are both "Smp01" and "Smp02" shown in sample list after you get the error? (it is even better to check from SMP-Editor").

From which device are you trying to load? Which DOS ROM?

ComSoft6128

Cool, I reset the Plus and it loaded OK this time - how do I switch between the two samples?

Zik

Quote from: ComSoft6128 on 09:44, 01 September 21how do I switch between the two samples?
Use f5/f8 to browse the active list.
Common keys are documented here: https://soundtrackerdma.cpcscene.net/doku.php?id=en:interface

ComSoft6128

#105
Cheers, interesting to see the visual display of the sample :)


Also interesting is the difference between the two samples with Smp01 much "cleaner" that Smp02 which has a degree of  "distortion".

GUNHED

Quote from: Zik on 21:57, 31 August 21
I voluntarily chose a sound with a little dynamic for the demonstration. Both could probably sound a little better with a bit of preprocessing. Here, I only applied a bit of gain.
Indeed quite a difference!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

ComSoft6128

 @Zik ,


One last question, assuming that enough people are using this program to create songs, would you release a stand-alone song player?

Zik

Quote from: ComSoft6128 on 17:06, 01 September 21assuming that enough people are using this program to create songs, would you release a stand-alone song player?
What I said is that I do not plan to release a player that works from objects as they are stored in the module file (which is anyway not appropriate for patterns that should be stored differently).

But it is already possible to play the music in an application outside the editor using the modified Kit-AY, as documented here: https://soundtrackerdma.cpcscene.net/doku.php?id=en:export#using_a_music_once_exported
I plan to propose another method (without buffer) once debugged.
Both methods work from the exported data stream.

Cwiiis

I've been trying to integrate stkdma into the project I'm working on, but it's been quite the pain... I'm using the provided modified Kit-AY method, which I can get working fine on its own. Integrated into my program, I can't seem to get it to play nice with my interrupt setup. It seems as soon as DMA starts getting used, interrupts constantly get triggered. I can filter these out by setting the IVR register to 0 and checking bit 7 of the DCSR register in my interrupt handler, but this throws off all the timing of my interrupts - and even then, I hear no DMA sound, only the music's non-DMA sound.

Is there a way of playing back these AY streams without constantly triggering interrupts? What am I missing? I expect I've not set some register that would make this trivial... Did anything happen re the buffer-less playback method that @Zik mentioned? That's the other awkward thing, requiring 15 256-byte buffers is quite a hefty requirement!

andycadley

If interrupts are constantly happening, my guess would be you aren't clearing them (by writing a 1 to the relevant bit in the DCSR).

Cwiiis

To add some more detail, I've been trying to integrate the stkdma_ayc_player.asm code - I have the code itself, buffers and SidList in RAM, with the TabSmpAdr, SmpBase and YMLZ in ROM, which seems like it should be ok. I've turned the MAIN function into a callback that gets called at regular intervals by the program (inside an interrupt handler, but I've tried it outside and there was no difference). I removed all the halts, key checking and border colour setting.

Sid playback sounds mostly ok in ACE but very off in WinAPE. Sample playback is mostly silent but I hear the occasional pop/click/beep. The normal AY sound works correctly. When DMA is being used, interrupts are triggered - ideally, they wouldn't be. It doesn't seem like the playback code cares about them(?)

Maybe I should just be writing my own playback driver, I guess it might not be as hard as I imagine :P

Cwiiis

Ok, I got it working - no, it's not ok that the samples were in ROM :P  All my problems have disappeared now, except for it taking up a bunch of RAM.

Zik

Yep, the ASIC can only access the base 64kB. AY-Lists must reside in RAM within the base 64kB, any commutation is ignored.

zhulien

is there a potential to copy samples to RAM while music is playing, especially if you were to allow samples and PSG at the same time?  I don't mean the same sample that is playing at the time, but... if there are any CPU cycles in the middle of playing samples, maybe some can be switched on the fly?

GUNHED

Quote from: zhulien on 03:45, 23 January 25is there a potential to copy samples to RAM while music is playing, especially if you were to allow samples and PSG at the same time?  I don't mean the same sample that is playing at the time, but... if there are any CPU cycles in the middle of playing samples, maybe some can be switched on the fly?
Yes, exactly that's the reason to have a DMA in the Plus.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod