Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make a sprite react to music???
- Cherrii-Bloss
-
4 posts
How do I make a sprite react to music???
I'm trying to make a circle pulsate in time to music, anyone know any script?
- A48c
-
100+ posts
How do I make a sprite react to music???
what do you mean by react? (like dance to it?) I'm trying to make a circle pulsate in time to music, anyone know any script?
- AEMpizza15
-
42 posts
How do I make a sprite react to music???
Could you share the project and give me the link? Then I could look at the script and the music in general. I'm trying to make a circle pulsate in time to music, anyone know any script?
- hirsh001
-
100+ posts
How do I make a sprite react to music???
you could use the loudness block
as the loudness increases, increase the size as the circle, or as it decreases, decrease the size of the circle.
Last edited by hirsh001 (Dec. 23, 2018 21:59:06)
- Vicream_Creator
-
100+ posts
How do I make a sprite react to music???
Might just break the program completely. A sneeze? The character dances. And you need to have sound on.. you could use the loudness blockas the loudness increases, increase the size as the circle, or as it decreases, decrease the size of the circle.
I suggest you sync the characters. Basically, “fake” the reaction. Find the beats of the music (every pop music and all follow a specific pattern, just synchronize the beats with it). And the actions between each pulse might just be random I'm trying to make a circle pulsate in time to music, anyone know any script?
- BereketY
-
500+ posts
How do I make a sprite react to music???
I had to do the same for an intro creation and I made two scripts, one that records the sprite sizes after altering it with the loudness block and another one to play the recording. For this to work, You might want to be in a very quiet room and have the song at a loud volume. I however already had an audio setting on my computer which allowed system audio to be heard without any mic input. If you want the scripts, here they are.
To play the size recording, use this script.
This is the first Script for recordingThe script above altered the size using the original size before the altering and then alters the size using the loudness.
To play the size recording, use this script.
This is the script for playing the recordingAs you might have noticed, there is a variable in the first script called “Music Over”. For that, all you need is this script.
This is the script for the Music Over VariableThis should help, but make sure you are in a place where only the music can be heard. Also, note that the first script should only be used once, and the list “size” should never be cleared. Once you've finished recording, then switch to the second script. If you want, I can make a project explaining it.
Last edited by BereketY (Dec. 31, 2018 13:13:04)
- Vicream_Creator
-
100+ posts
How do I make a sprite react to music???
This is actually a smart way to code that! Only thing is thatshould more be like(smallest sound being like original size - 50)
since that script won't ever set size to a number under the original size, resulting in a “sound wheel” always reacting to high volumes (getting bigger) while never getting smaller than the original size (small volumes/music stopped)
- GamingForGold385
-
42 posts
How do I make a sprite react to music???
Yeah, I'm trying to make this circle react to sonic forces fistbump.

- D-ScratchNinja
-
1000+ posts
How do I make a sprite react to music???
If you're talking about in-game playing music, this way is easiest with 120 or 60 bpm, but you could use a timer block and this script:
Stage
Sprite
Stage
Sprite
- Vicream_Creator
-
100+ posts
How do I make a sprite react to music???
.. the question was about the “react” block actually. If you're talking about in-game playing music, this way is easiest with 120 or 60 bpm, but you could use a timer block and this script:
Stage
Sprite
Avoid bumping “old” posts and make your own post. Or, you could follow the solutions given above, from BereketY (super smart way to program that) Yeah, I'm trying to make this circle react to sonic forces fistbump.
- D-ScratchNinja
-
1000+ posts
How do I make a sprite react to music???
.. the question was about the “react” block actually.By “react”, I mean whatever the sprite does to the beat.
- Vicream_Creator
-
100+ posts
How do I make a sprite react to music???
Well yeah the OP wants to know how you can make it beat.. the question was about the “react” block actually.By “react”, I mean whatever the sprite does to the beat.
- cs2452561
-
11 posts
How do I make a sprite react to music???
I had to do the same for an intro creation and I made two scripts, one that records the sprite sizes after altering it with the loudness block and another one to play the recording. For this to work, You might want to be in a very quiet room and have the song at a loud volume. I however already had an audio setting on my computer which allowed system audio to be heard without any mic input. If you want the scripts, here they are.This is the first Script for recordingThe script above altered the size using the original size before the altering and then alters the size using the loudness.
To play the size recording, use this script.This is the script for playing the recordingAs you might have noticed, there is a variable in the first script called “Music Over”. For that, all you need is this script.This is the script for the Music Over VariableThis should help, but make sure you are in a place where only the music can be heard. Also, note that the first script should only be used once, and the list “size” should never be cleared. Once you've finished recording, then switch to the second script. If you want, I can make a project explaining it.
so what variables and stuff do I have to make to start?
Last edited by cs2452561 (June 14, 2019 17:07:39)
- codeman1044
-
1000+ posts
How do I make a sprite react to music???
Please don't necropost. If you have a question that you want to be answered, please make your own topic. -snip-
- Cherrii-Bloss
-
4 posts
How do I make a sprite react to music???
so, what are those funny dark orange blocks I had to do the same for an intro creation and I made two scripts, one that records the sprite sizes after altering it with the loudness block and another one to play the recording. For this to work, You might want to be in a very quiet room and have the song at a loud volume. I however already had an audio setting on my computer which allowed system audio to be heard without any mic input. If you want the scripts, here they are.This is the first Script for recordingThe script above altered the size using the original size before the altering and then alters the size using the loudness.
To play the size recording, use this script.This is the script for playing the recordingAs you might have noticed, there is a variable in the first script called “Music Over”. For that, all you need is this script.This is the script for the Music Over VariableThis should help, but make sure you are in a place where only the music can be heard. Also, note that the first script should only be used once, and the list “size” should never be cleared. Once you've finished recording, then switch to the second script. If you want, I can make a project explaining it.
- codeman1044
-
1000+ posts
How do I make a sprite react to music???
Those blocks are list blocks. Lists are accessed by going to the variables section in the scripts window and creating a new list.
- magakid00
-
3 posts
How do I make a sprite react to music???
Hello. I have the exact same problem as you. Try to find some music projects and see what's inside them. I've done that too, and those blocks are not so small!
- Is-it-friday_yet
-
1 post
How do I make a sprite react to music???
Thanks for the tips. It really helped me with some of my code
.

- CodingBaguette
-
500+ posts
How do I make a sprite react to music???
Those blocks are lists, they are similar to variables. You can make them by going to the variable section, then scrolling down and you can make a listso, what are those funny dark orange blocks I had to do the same for an intro creation and I made two scripts, one that records the sprite sizes after altering it with the loudness block and another one to play the recording. For this to work, You might want to be in a very quiet room and have the song at a loud volume. I however already had an audio setting on my computer which allowed system audio to be heard without any mic input. If you want the scripts, here they are.This is the first Script for recordingThe script above altered the size using the original size before the altering and then alters the size using the loudness.
To play the size recording, use this script.This is the script for playing the recordingAs you might have noticed, there is a variable in the first script called “Music Over”. For that, all you need is this script.This is the script for the Music Over VariableThis should help, but make sure you are in a place where only the music can be heard. Also, note that the first script should only be used once, and the list “size” should never be cleared. Once you've finished recording, then switch to the second script. If you want, I can make a project explaining it.
- Discussion Forums
- » Help with Scripts
-
» How do I make a sprite react to music???