scratchfoundation / scratch-flash

Open source version of the Scratch 2.0 project editor. This is the basis for the online and offline versions of Scratch found on the website.
https://scratch.mit.edu
GNU General Public License v2.0
1.33k stars 513 forks source link

Drum sounds continue playing their sample well after beat time in block ends #1328

Closed TheLogFather closed 5 years ago

TheLogFather commented 7 years ago

In particular, in drum sounds with long samples (such as "Crash Cymbal" and especially "Conga") this can mean you reach the limit of 32 sounds being played at once (which is the Flash sound channel limit).

See this topic: https://scratch.mit.edu/discuss/topic/270330/ And related project: https://scratch.mit.edu/projects/168821897/

See this post for discussion about the cause (and how to work around it with "stop all sounds"): https://scratch.mit.edu/discuss/post/2726426/

It might be nice if it were possible for Scratch to prioritise sound channels a bit – for example, if a new channel is requested, and there are already 32, then it looks to see which one has been running longest (or is nearest to ending?) and 'kills' it.

In particular, though, it seems a bit odd that the "Conga" drum sample is so long. Could it be shortened in some way?

DevanWolf commented 6 years ago

Maybe set drum length to 8 or 4 seconds on the source code.