DIGIDRUMS

SO. STarKos players manage digidrums in a very flexible way. It reads the song, and if a digidrum is detected in the song, returns the number of the sample (from 1-#3f, 0=No digidrum) and the channel where to play it (1/2/3). Basic can't play digidrums, but I guess you can use digidrums to trigger some events (it works in ASM too). Digidrum detection shouldn't be used in any case under the INTERRUPT player, because you might miss some events, but hey, you do what you want…

The values must be read here :

Sample Number : ASM BASIC INTER &B &B &8

Channel Number: ASM BASIC INTER &C &C &9

How to play digidrums ?

I won't tell technically how to play digidrums, this is not the purpose this text (read Demoniak 5, or Quasar). However, I'd like to talk about how you should manage the digidrums to play them as cleanly as possible.

The most common, easiest, yet less effective way to play digidrum would be to run the player one time, test if a digidrum must be played, and play it (cutting the noise and sound of the channel). You can improve this.

Check this source : STarKos Digidrum Source

The method I use is a bit more complex, but provides a better sound quality. Of course, you're free to code it the way you want !

The main point is that we play the music but don't send any value to the PSG. If a digidrum is detected, we prevent the player from modifying the PSG registers linked to the channel where we're going to play the sample (in fact, only the VOLUME is concerned). We also cut the noise and sound of the digichannel, in the Register 7. Now we're ready to send the modified values to the PSG. Then, we just have to play the sample, and that's all for this frame.

In the source example, the samples addresses and size are given in a table, but we test if the sample is over only at the end of the frame, so if you play 160 samples per frame (160*50 = 8000Khz, which is good for a digidrum), and your sample is 350 bytes long, the CPC will actually play 480 bytes (160* 3). This low accuracy doesn't matter when playing digidrums ; Testing the end after each byte would not provide any better result, and would take much more machine time.

documentations/software/starkos/howto.player.digidrums.txt · Last modified: 2009/08/10 12:57 by targhan