jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.51k stars 745 forks source link

Allow the "play sound samples" block to record the current sample's index in an upvar. #2303

Open Axis-Denied opened 5 years ago

Axis-Denied commented 5 years ago

If something like this could be done, pausing and continuing specific sounds would be a breeze. All that you would need to do is play the song from a specific sample.

Axis-Denied commented 5 years ago

After sifting through the javascript for the block, I realize now that it actually compiles all of the samples before playing the sound itself. I don't know if there is a way to modify that, due to my extremely limited knowledge of javascript.

rdococ commented 5 years ago

It looks like there's no way to stop playing a sound unless you stop all of them at once.

I think that there should just be "stop sound" and "resume sound" blocks.