Playing a Sound for n Beats?

Hi all - I am brooding on the idea of coding a drum-app. For this I have to be able to play a sound - say: a kick drum sound or a snare sound - for a certain amount of beats.
I do find play note for %n beats but there is no equivalent block to play a sound the same way.

Would someone have any suggestions?

I have been looking into the js code but find my knowledge lacking to add it.

Is there perhaps an easier workaround? If not I will start studying JS.

TIA

Frank

A strategy I always use is to play a sound without the "until done" part, and then attach a rest block to it waiting for how long you want to play the sound. You can turn that into a custom block, et voilĂ !

But, of course, looking at the js code is so helpful...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.