Discuss Scratch
- Saj-snake
-
Scratcher
40 posts
Sound Seeking - 30 Supporters
I'd like to be able to start sounds from a specific point, so I suggest the following blocks:Support! This is what I asked for!!play sound [ v] from (x) secs :: sound // Plays the sound from that position
play sound [ v] from (x) secs until done :: sound // Likewise, except it waits until it's finished.
play sound [ v] from (x) secs until (y) secs :: sound // Similar, but only plays up to Y seconds.
(length of sound [ v]::sound) // Reports the length of the sound in seconds. It gives something like "213.40", you can use round if you don't want that.
Where would this be useful?
- MP3 Players - You can skip forward and backward in sounds.
- Radios - When the user tunes in, it skips to what everyone else is hearing (based on time or Cloud Data, your choice), creating a synchronized sound, like a real radio.
- Time Travel Games - Imagine someone made a game similar to Braid. They could back up the music when the player reverses time.
- MAPs - This could benefit maps greatly by avoiding sound cutting, as shown below:
broadcast [Part 1 v]The same MAP script can be applied to other things, too.
play sound [Song v] from (0) secs until (33) secs :: sound
broadcast [Part 2 v]
play sound [Song v] from (33) secs until (68) secs :: sound
...
What if the user puts in more than 60 seconds/negative seconds/non-integer seconds?
More than 60 simply seeks to wherever that is - 0m and 78s seeks to 1 minute and 18 seconds (78 seconds) in.
Negative seconds don't play the sound in reverse, they simply cause the sound to start from the beginning, like 0 or the normal play sound blocks.
Non-integer seconds simply seek with more precision, for example, 12.5 seconds.
Why no hour or minute value?
@DaSpudLord makes a good point. The base value for everything in Scratch is in seconds - the timer reports seconds, wait _ secs, etc.
What happened to the seeking blocks?
stickfiregames pointed out that sprites can play more than one sound at a time, meaning those blocks can cause glitches. However, you can use this workaround to seek:stop all sounds
play sound from (seconds) secs until done :: sound
What about playing in reverse?
Just make a reversed copy of the sound and sync them up. Scratch has a “reverse” tool built into the sound editor, to reverse an entire sound, simply use “Select All” and then “Reverse”.List of supporters
@Tymewalk
@alexphan
@JoeyTheChicken
@little_kitten
@TheAwesomeMaster
@stickfiregames
@Sheep_Tester
@DaSpudLord
@Zarlog
@Skelepound
@Ninkancho
@Anthan
@PrincessPanda_test_
@BookOwl
@thoyal
@apgonscratch
@raspykoo
@Lataliat
@Digital_Gaming
@TheScratchHobbiest
@PoohBear789
@Rex208
@Appadela
@CodingGamerHD
@GlassGalaxy
@Prof_Red
@CoderOwl
@QuantumSingularity
@VideoGamerCanInvent
@Mario0314
@Saj-snake
Last edited by Saj-snake (July 13, 2023 23:55:08)
- Tris_das_Einhorn
-
Scratcher
100+ posts
Sound Seeking - 30 Supporters
Yes please. Support.
As it is the Scratch editor doesn't do well with long sounds (I uploaded a 10-minute long file once and the project refused to save) so as others have said, as long as it is limited to minutes and seconds, I think this is a great idea. It would be really useful for animations in particular.
Also the radio idea sounds awesome! I'd never thought about that but it could be a super innovative use for cloud data.
As it is the Scratch editor doesn't do well with long sounds (I uploaded a 10-minute long file once and the project refused to save) so as others have said, as long as it is limited to minutes and seconds, I think this is a great idea. It would be really useful for animations in particular.
Also the radio idea sounds awesome! I'd never thought about that but it could be a super innovative use for cloud data.
- wilhelm43
-
Scratcher
1000+ posts
Sound Seeking - 30 Supporters
Bump (dupe)
And support, really useful for pausing a sound, for example.
And support, really useful for pausing a sound, for example.
- undeterminstic
-
Scratcher
1000+ posts
Sound Seeking - 30 Supporters
there is a workaround but it is not very precise and takes around 0.125 seconds, which is why i support.
- medians
-
Scratcher
1000+ posts
Sound Seeking - 30 Supporters
I mean, their suggestion did make more sense at the time because before 3.0, sounds displayed minutes as well:There should also be a block calledEasy workaround((1) mins (30) secs::operators)which returns the time given in seconds so you can doplay sound [sound v] starting at ((2) mins (14.56) secs::operators)secs::sound

Because that's no longer the case, it doesn't really make as much sense to 3.0 users (I am not used to that not being there).
Anyway, bringing this topic up.
- Zyaxis_Lotl
-
Scratcher
100+ posts
Sound Seeking - 30 Supporters
all of them are good i like these ideas
- Emittey
-
Scratcher
16 posts
Sound Seeking - 30 Supporters
wholeheartedly
would be super duper useful for audio players (like what i am trying to do right now)
support!:: #00F531i'm trying to work around this using the pitch blocks but it's hard to get them to follow my time traveling orders
would be super duper useful for audio players (like what i am trying to do right now)
Last edited by Emittey (Dec. 14, 2023 04:59:21)
- DextronDoolittle
-
Scratcher
10 posts
Sound Seeking - 30 Supporters
Support, support, support! We're lacking in sound blocks 

- DextronDoolittle
-
Scratcher
10 posts
Sound Seeking - 30 Supporters
Most likely no support, but it would be neat to be able to play a sound from a URL:
Then again, this isn't a good idea at all
play sound from [https://example.com/sound.mp3]Would be useful for being able to use a diverse soundtrack without having to worry about storage space or load times.
Then again, this isn't a good idea at all
- snoopythe3
-
Scratcher
500+ posts
Sound Seeking - 30 Supporters
https://scratch.mit.edu/projects/1110729910/ Here is a petition for this!
- iiucandyfloss
-
Scratcher
1000+ posts
Sound Seeking - 30 Supporters
Can you not say ‘wait ____ seconds’ and then ‘play/start sound’?
- Catzcute4
-
Scratcher
500+ posts
Sound Seeking - 30 Supporters
Can you not say ‘wait ____ seconds’ and then ‘play/start sound’?no, that waits a couple seconds and then starts sound at beginning














