Discuss Scratch

JelliBeens-1
Scratcher
71 posts

Stop all sounds in this sprite block or stop a certain sound

Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)

when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
Zyaxis_Lotl
Scratcher
100+ posts

Stop all sounds in this sprite block or stop a certain sound

this is a good idea it will make scratch easier to use so I support it
ImmortalJelly13
Scratcher
500+ posts

Stop all sounds in this sprite block or stop a certain sound

honestly this is just a simple idea that would make scratch a tiny bit better.
This has my full support.
Zyaxis_Lotl
Scratcher
100+ posts

Stop all sounds in this sprite block or stop a certain sound

JelliBeens-1 wrote:

Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)

when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
cool but i still hope scratch team will add the block
EDawg2011
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

bump
came from this topic
Eason_9
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

bump + support, this can make adding multiple theme songs way easier
PizaGranny8878
Scratcher
26 posts

Stop all sounds in this sprite block or stop a certain sound

Workaround:

Have an invisible sprite, and have other sprites broadcast a message when they want to create a sound.

Put this in the sprite with the sounds:
when I receive [start sound v] :: control
create sound (...::grey)
define create sound (sound)
set [mySound v] to (sound) // for this sprite only
set volume to (...::grey) %
create clone of [myself v] :: events
when I start as a clone :: events
start sound (mySound) :: sound
repeat (... :: grey) ::events // adjust this value depending on the length of your sound so that it keeps looping until just after the sound ends
if <should this sound end? :: grey> then :: events
set volume to (0) %
end
end
delete this clone::events

Also, this could be useful for a looping sound that you want to end at a specific point.
Xzillox
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

PizaGranny8878 wrote:

Workaround:

Have an invisible sprite, and have other sprites broadcast a message when they want to create a sound.

Put this in the sprite with the sounds:
#snip#
Also, this could be useful for a looping sound that you want to end at a specific point.
generally a workaround is not the best reason to not implement a suggestion, especially one as (relatively) complex as this
PizaGranny8878
Scratcher
26 posts

Stop all sounds in this sprite block or stop a certain sound

Xzillox wrote:

PizaGranny8878 wrote:

snip
generally a workaround is not the best reason to not implement a suggestion, especially one as (relatively) complex as this
i'm not saying that the scratch team should not implement the stop sound ( v) block, it's just a workaround for it if we don't get it/before we get it
-absoulute_machine-
Scratcher
13 posts

Stop all sounds in this sprite block or stop a certain sound

bump

also im so glad my silly little suggestion is still getting attention, thanks so much guys! D
Eason_9
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

bump
medians
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

Bringing this topic up.
NamePending_
Scratcher
100+ posts

Stop all sounds in this sprite block or stop a certain sound

Support. Here's how I think the blocks would function:


Stop sounds in sprite
stop sounds in [Sprite1 v] :: sound
This one is pretty self-explanatory. It would stop all sounds in the selected sprite.


Stop specific sound
stop sound [pop v] :: sound
This block also seems simple, but there is one thing we must consider: What if the cat sprite and another sprite have the pop sound in them? I think a good fix for this would be to have the dropdown only extend to the sprite currently open. To stop sounds in other sprites, you could just do this.

Sprite code:
broadcast [stop Sprite2 sounds v]
Other sprite code:
when I receive [stop Sprite2 sounds v]
stop sound [pop v] :: sound

If anyone has any other ideas, I'll try to add them here.

Last edited by NamePending_ (Feb. 28, 2024 12:52:52)

NamePending_
Scratcher
100+ posts

Stop all sounds in this sprite block or stop a certain sound

bump
DangerPuppy10
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

JelliBeens-1 wrote:

Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)

when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy.
NamePending_
Scratcher
100+ posts

Stop all sounds in this sprite block or stop a certain sound

DangerPuppy10 wrote:

JelliBeens-1 wrote:

Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)

when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy.
He said that he isn't trying to undermine the suggestion, he's just providing us with a workaround to use if the suggestion isn't implemented.
DangerPuppy10
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

NamePending_ wrote:

DangerPuppy10 wrote:

JelliBeens-1 wrote:

Workaround:
define stop sound (sound)
set [sound to stop v] to (sound)
set [sound clone? v] to (1)
create clone of [myself v]
set [sound to stop v] to (0)

when I start as a clone
if <(sound clone?) = [1]> then
hide
set volume to (0) %
play sound (sound to stop)
delete this clone
else
. . . // Other clones' scripts go here.
end
You know, just because it has a workaround, doesn't mean everybody knows the workaround, Or that the workaround is easy.
He said that he isn't trying to undermine the suggestion, he's just providing us with a workaround to use if the suggestion isn't implemented.
All he said was “workaround:”
DangerPuppy10
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

.

Last edited by DangerPuppy10 (Feb. 29, 2024 01:56:47)

RethinkingVoxels
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

Beans

Last edited by RethinkingVoxels (March 1, 2024 01:39:24)

DangerPuppy10
Scratcher
1000+ posts

Stop all sounds in this sprite block or stop a certain sound

RethinkingVoxels wrote:

Beans
aaahh yes, beans.

Powered by DjangoBB