Discuss Scratch

kenny2scratch
Scratcher
500+ posts

Play [sound] from (time) block.

Hey guys!
I vaguely remember posting this before, but nobody read it so I'm reposting it.
Could we have
play sound [sound v] from () secs :: sound stack
and
play sound [sound v] from () secs until () secs :: sound stack
blocks? The only workaround for this currently is to chop your sounds into pieces to start from, which doesn't work when you don't know when you need to play from. I would like it very much for projects that maybe include pausing the game and playing again, meaning “stopping” the sound and saving the time, then when the game is continued the sound plays from the saved time.
An example would be
when green flag clicked
play sound [sound v]
broadcast [start v]
when I receive [start v]
forever
change [time v] by (1)
wait (1) secs
end
when I receive [pause v]
stop all sounds
stop [other scripts in stage v] //assuming this script is in the stage
when I receive [continue v]
play [sound v] from (time) secs :: sound stack
broadcast [start v]
which would play the sound at the start, counting the time, then when the game is paused stop the sound and stop counting the time, then when the game is continued start counting the time again and play the sound from the saved time.

UPDATE: It looks like this is being seriously considered!

Last edited by kenny2scratch (Aug. 4, 2017 01:35:30)

stickfiregames
Scratcher
1000+ posts

Play [sound] from (time) block.

Yes, you did suggest this before, so you should have bumped that one instead of making a duplicate.

Anyway, support for the first one.

No support for the second one, we should have
stop sound [ v] :: sound
instead. It has more uses, and your block could be worked around with
play sound [sound v] from (...) secs :: sound
wait (...) secs
stop sound [sound v] :: sound

Last edited by stickfiregames (Dec. 16, 2016 14:42:59)

kenny2scratch
Scratcher
500+ posts

Play [sound] from (time) block.

Oh, thank you for finding it! In that case,
Bump!
JonathanSchaffer
Scratcher
1000+ posts

Play [sound] from (time) block.

no support, scratch is not a sound mixer.
LemonComputer
Scratcher
100+ posts

Play [sound] from (time) block.

JonathanSchaffer wrote:

no support, scratch is not a sound mixer.
In that case, all the sound blocks should be removed.
alexphan
Scratcher
1000+ posts

Play [sound] from (time) block.

kenny2scratch wrote:

Oh, thank you for finding it! In that case,
Bump!
He meant to actually go to the topic and post “bump” on it

But this would be a really useful feature for those who add a pausing feature to their game, so they can stop the music at a certain time and play it again.
It also could be used for a “music player”, where the user can rewind, pause, and move to whatever part of the music they want.
dvargasews
Scratcher
500+ posts

Play [sound] from (time) block.

stickfiregames wrote:

Yes, you did suggest this before, so you should have bumped that one instead of making a duplicate.
<snipped the unimportant parts>
I'd report it, but I'm not sure which to report.

Last edited by dvargasews (Dec. 19, 2016 00:05:55)

alexphan
Scratcher
1000+ posts

Play [sound] from (time) block.

dvargasews wrote:

stickfiregames wrote:

Yes, you did suggest this before, so you should have bumped that one instead of making a duplicate.
<snipped the unimportant parts>
I'd report it, but I'm not sure which to report.
Well, this post has more information and justification to the suggestion, so if it was up to me, I'd keep this one and report the other one to be closed.
kenny2scratch
Scratcher
500+ posts

Play [sound] from (time) block.

BUMP
QuantumSingularity
Scratcher
1000+ posts

Play [sound] from (time) block.

Support! I think that this would make it easier for a lot of people.

However, what would happen if you tried to play from a time that was greater than the sound's length. Like trying to play a 3-min song at 5 minutes. What do you guys think should happen?

Last edited by QuantumSingularity (Jan. 11, 2017 18:41:52)

The4thPixel
Scratcher
1000+ posts

Play [sound] from (time) block.

I support for the ideas mentioned by stickfiregames, they would be helpful for animations or projects with music in general.

JonathanSchaffer wrote:

no support, scratch is not a sound mixer.
Yes, then let's go ahead and remove anything having to do with sound.
kenny2scratch
Scratcher
500+ posts

Play [sound] from (time) block.

BUMP
VideoGamerCanInvent
Scratcher
1000+ posts

Play [sound] from (time) block.

Yes we need this SUPER BADLY. Something I have really needed.

Full Support.
MathlyCat
Scratcher
1000+ posts

Play [sound] from (time) block.

LemonComputer wrote:

JonathanSchaffer wrote:

no support, scratch is not a sound mixer.
In that case, all the sound blocks should be removed.
In that case you used a Strawman Fallacy.
At least be somewhat reasonable about it?

– –

I like the idea here, it's simple and could really help, especially in games where you might have a cut scene and need the music to pause rather than having it be replayed everytime
Tails233
Scratcher
7 posts

Play [sound] from (time) block.

This seems nice, I requested a block that pauses the audio and can resume it, but maybe if there's something that can track how far the audio went, that could be used in variables which then the variables would be used for this block, then would making it possible to resume/pause. I like this idea!
track sound time
FancyFoxy
Scratcher
500+ posts

Play [sound] from (time) block.

Tails233 wrote:

This seems nice, I requested a block that pauses the audio and can resume it, but maybe if there's something that can track how far the audio went, that could be used in variables which then the variables would be used for this block, then would making it possible to resume/pause. I like this idea!
track sound time
I think the block should look like this:
(progress in sound [sound v] :: sound)
As for the original suggestion, I support being able to start a sound in the middle of it. Whenever I want to do that, I have to create a new sound where I cut off a part. And when I have a lot of different start times, it's way too complicated. It's also good for having specific timing on where the sound starts.
Sheep_maker
Scratcher
1000+ posts

Play [sound] from (time) block.

FancyFoxy wrote:

I think the block should look like this:
(progress in sound [sound v] :: sound)
It's workaroundable by keeping track of when you start playing the sound and when you stop it.
FancyFoxy
Scratcher
500+ posts

Play [sound] from (time) block.

Sheep_maker wrote:

FancyFoxy wrote:

I think the block should look like this:
(progress in sound [sound v] :: sound)
It's workaroundable by keeping track of when you start playing the sound and when you stop it.
Oh yeah, I didn't think of that!
Blue_Science
Scratcher
100+ posts

Play [sound] from (time) block.

Support & Bump !
kenny2scratch
Scratcher
500+ posts

Play [sound] from (time) block.

Good news! It seems like this suggestion is being seriously considered along with a new hat block that fires when a sound reaches a certain time.

Powered by DjangoBB