How to make a block that slows sounds but without lag?

I want to know how to make blocks like: untitled script pic (6)
But without that longg wait at the beginning, a little help?

You can store the speed-altered sound so you only have to calculate it once.

untitled script pic (1)

It doesn't even play the music if I do that.

you have to use the play sound block to play the music

put the result where you would put the audio name

1 Like

Phew, it worked, but that was a lot of work.

But it says some sort of error when I try to slow it down, and i'm not looking for speed, I'm looking for slow.

It does work slow. You're not giving me much information so I'm assuming that you copied the speed multiplier I forgot to remove from the image and put a negative multiplier. The range from 0.00 to 1.00 makes the audio slower. Anything under 0 won't work because you would be playing the sound at a negative rate.

"Some sort of error" is not very helpful to people wanting to help you. It would be best to include a screenshot of what you did and what error you got, but just typing the message into your post would go a long way.

1 Like

It glows red when I put a negative number in it thinking it would accept the negative number, because I thought it would slow down.


The error message goes away too fast before I can read it.

Well my assumption was correct then. Also, the error said something about BaseAudioContext and the frequency not being in the range of [3000, some big number].

I need it slower than its normal rate, 1 or 0(they don't really make a difference).

Well if you want to continue using the speed multiplier thing code that I put in there, put something like 0.5 or 0.25 or 0.75.

I need to know How to make a block that slows sounds but without lag, In this case, I need a slowness multiplier.

1 divided by how slow you want to be

And to make a block that slows sounds without lag you'd probably need to use JavaScript. I don't think there is a built-in functionality to change a sound's playback rate on the fly in Snap but there is in JavaScript.

1 Like

Think about driving a car. You are going 60mph. You want to slow down. What will happen if you multiply your speed by -1?

that doesn't make sense! If you want to slow down, why you you multiply something by -1.?

Ohh, that's what I did there.

You will go backwards and collide w/ the car behind you.
The correct way to slow a car down is to continuisly mulitply its speed by 0.99 at 60fps
:~)

Technically, speed is a scalar (non-negative) and velocity is a vector (can be negative); speed is the absolute value of a vector.

actually magnitude

1 Like

If you're actually driving a car it doesn't have a frame rate! :~)