Main Menu

Knowing when a sample has finished?

Started by Volvo_0ne, 25 Jan, 2018, 09:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Volvo_0ne

OK I have several short samples which I play with Sam Raw which is just fine

BUT

How can I find out when each sample has finished playing so that I can play the next one?

This is further complicated by the particular sample to play is done by human interaction.

Think Space Invaders

TIA
V1
Transuranic heavy elements may not be used where there is life.

adrazar

FLAGS=Deek($DFF01C)

Bit 7-10 in FLAGS (counting from bit 0) tells which voices are currently being played. Each bit corresponds to one of the four voices (bit 7 <--> voice 0, etc.). If a bit is cleared it means the corresponding voice is finished, so using this you can figure out when to play the next sample :).

Volvo_0ne

Quote from: adrazar on 27 Jan, 2018, 11:16 AM
FLAGS=Deek($DFF01C)

Bit 7-10 in FLAGS (counting from bit 0) tells which voices are currently being played. Each bit corresponds to one of the four voices (bit 7 <--> voice 0, etc.). If a bit is cleared it means the corresponding voice is finished, so using this you can figure out when to play the next sample :).

Excellent!  I will try that tonight.
Thank you so much for your help.

V1
Transuranic heavy elements may not be used where there is life.

Volvo_0ne

After a bit of experimenting, I realised that I could squeeze all my sample playing into 2 channels, and time the playback rather than need to detect the sample ends.

Thanks for the insight tho guys :)

V1
Transuranic heavy elements may not be used where there is life.