Discuss Scratch
- Discussion Forums
- » Suggestions
- » block suggestion: play sound[ ] until < >
- sniperghost1
-
Scratcher
100+ posts
block suggestion: play sound[ ] until < >
play sound [ v] until <>
there should be a block that says play this sound until a certain condition is met. so say i load a sound file. i can play that sound but i cant stop it at a certain point in time without stopping every other sound. if i did this right then the block i'm thinking of should be there above this paragraph. if not, then i hope someone can interpret what i mean and make a visual representation of that block. with this block, i would do so much, i am making a digital audio workstation and this is a major setback since i want to use my own sounds and not the scratch instruments from the music extension. if i cant play a sound for a certain amount of time, then when i finish the project i wont be able to make it so that you can edit note length, and that kinda defeats the purpose of the workstation that weeks were put into. this is the work in progress workstation i was referring to if anyone was wondering
https://scratch.mit.edu/projects/320746228
Last edited by sniperghost1 (Aug. 17, 2019 06:34:15)
- WindOctahedron
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
There's a workaround:
create clone of [myself v]
when I start as a clone
play sound [ v] until done
when I start as a clone
wait until <>
delete this clone
- sniperghost1
-
Scratcher
100+ posts
block suggestion: play sound[ ] until < >
There's a workaround:i tried that, and when i did i realized that the sounds persist even after i delete the clonecreate clone of [myself v]
when I start as a clone
play sound [ v] until done
when I start as a clone
wait until <>
delete this clone
- MrFluffyPenguins
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
Use stop all sounds above the delete this clone block.There's a workaround:i tried that, and when i did i realized that the sounds persist even after i delete the clonecreate clone of [myself v]
when I start as a clone
play sound [ v] until done
when I start as a clone
wait until <>
delete this clone
- sniperghost1
-
Scratcher
100+ posts
block suggestion: play sound[ ] until < >
that would work if that block stopped all sounds in that clone, but that block stops all sounds in generalUse stop all sounds above the delete this clone block.There's a workaround:i tried that, and when i did i realized that the sounds persist even after i delete the clonecreate clone of [myself v]
when I start as a clone
play sound [ v] until done
when I start as a clone
wait until <>
delete this clone
- Testingscratcher
-
Scratcher
72 posts
block suggestion: play sound[ ] until < >
I recently got the Git so I might be able to code this block later as a test. It does sound rather useful to terminate a particular sound under a specific condition. However, actual implementation is something which will have to wait for a while… don't ask me why, just official dev stuff I guess.play sound [ v] until <>::sound
- sniperghost1
-
Scratcher
100+ posts
block suggestion: play sound[ ] until < >
thanks that would be reallly helpful. if you do decide to, just let me knowI recently got the Git so I might be able to code this block later as a test. It does sound rather useful to terminate a particular sound under a specific condition. However, actual implementation is something which will have to wait for a while… don't ask me why, just official dev stuff I guess.play sound [ v] until <>::sound
- codeman1044
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
I support this if it immediately cuts off the sound played from this when the boolean reports true (I assume that's what is intended).
I've made multiple projects that have audio loops playing at the same time, but then a circumstance requires the stopping of one of the loops for a bit. In order for that to happen, I have to run the stop all sounds block. It stops the target audio just fine, but it resets the other loops. It's not noticeable in some cases, but I notice it over half the time and it drives me crazy. Either add this block in or add a stop sounds from this sprite block.
Semi support.
I've made multiple projects that have audio loops playing at the same time, but then a circumstance requires the stopping of one of the loops for a bit. In order for that to happen, I have to run the stop all sounds block. It stops the target audio just fine, but it resets the other loops. It's not noticeable in some cases, but I notice it over half the time and it drives me crazy. Either add this block in or add a stop sounds from this sprite block.
Semi support.
Last edited by codeman1044 (Aug. 26, 2019 22:02:57)
- MrFluffyPenguins
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
make seperate sprite for music:
when green flag clicked
play sound [music v] until done
when I receive [stop music!!!!!! v]
stop [all scripts in sprite v]
- codeman1044
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
[Code removed by poster]
Last edited by codeman1044 (Aug. 26, 2019 22:03:23)
- Sheep_maker
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
i tried that, and when i did i realized that the sounds persist even after i delete the cloneHow about setting the volume to zero before deleting the clone?
when I start as a clone
play sound [some sound v]
wait until <condition::grey>
set volume to (0)%
delete this clone
+1Please add to the discussion; a mere “+1” is not constructive.
- codeman1044
-
Scratcher
1000+ posts
block suggestion: play sound[ ] until < >
To add to Sheep_maker's code, for a looping sound file, you would just have 2 different clone blocks:
when I start as a cloneI'm going to change my support from full to semi because of the workarounds.
forever
play sound [ v] until done
when I start as a clone
wait until <...>
set volume to (0) %
delete this clone
- Discussion Forums
- » Suggestions
-
» block suggestion: play sound[ ] until < >






