Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Making an object change colour when a loud sound is played
- blackthelawliet
-
1 post
Making an object change colour when a loud sound is played
So, I've been working on a project and one of the things I wanted to make is that when a loud sound is played, the colour of an object changes.
I've tried adding a highly distorted and bass boosted sound and then added this block
And it didn't seem to work. I tried again going to the sounds tab and making the sound even louder and then tried again, and it didn't work.
What am I doing wrong?
I've tried adding a highly distorted and bass boosted sound and then added this block
And it didn't seem to work. I tried again going to the sounds tab and making the sound even louder and then tried again, and it didn't work.
What am I doing wrong?
- asivi
-
1000+ posts
Making an object change colour when a loud sound is played
Hard to help for anybody without a project and knowledge for your flashplayer, browser, or devices (microphone) at your PC settings. So, I've been working on a project and one of the things I wanted to make is that when a loud sound is played, the colour of an object changes.
I've tried adding a highly distorted and bass boosted sound and then added this block
And it didn't seem to work. I tried again going to the sounds tab and making the sound even louder and then tried again, and it didn't work.
What am I doing wrong?
- Mrman99
-
100+ posts
Making an object change colour when a loud sound is played
As far as i know Scratch ignores sounds made by the computer.
EDIT: Maybe it's just certain computers or settings.
EDIT: Maybe it's just certain computers or settings.
Last edited by Mrman99 (Jan. 4, 2017 12:14:02)
- asivi
-
1000+ posts
Making an object change colour when a loud sound is played
No, As far as i know Scratch ignores sounds made by the computer.
EDIT: Maybe it's just certain computers.
What it needs to work is a microphone or a PC sound' card able to pass playing sounds through internally like a microphone would do it.
- titanscratch
-
100+ posts
Making an object change colour when a loud sound is played
Try this:

I hope I helped.

- stickfiregames
-
1000+ posts
Making an object change colour when a loud sound is played
loudness is the volume of the sound being detected by the microphone - if you don't have a microphone it will always be 0.
volume is the volume used to play notes and sounds, which is 100 by default. It's like the volume setting on your computer or speakers.
There is currently no way to get the volume of the sound output in realtime. It is possible to precalculate it with external programs as is done here, although I don't know how you would do it.
I think there have been a few projects in the past that need to respond to the sound being played and just tell you to put your microphone next to your speakers, but that's obviously not an ideal solution.
volume is the volume used to play notes and sounds, which is 100 by default. It's like the volume setting on your computer or speakers.
There is currently no way to get the volume of the sound output in realtime. It is possible to precalculate it with external programs as is done here, although I don't know how you would do it.
I think there have been a few projects in the past that need to respond to the sound being played and just tell you to put your microphone next to your speakers, but that's obviously not an ideal solution.
Last edited by stickfiregames (Jan. 10, 2017 22:53:59)
- Discussion Forums
- » Help with Scripts
-
» Making an object change colour when a loud sound is played