Mr_sprite

— I am currently updating the block. It will have two modes, frequency and amplitude!

This block would exist to report a number (0-100) based on the frequency of the playing sound. It is similar to the loudness block, but it does not use the microphone. To get a better idea of what I mean, you can test the block online right now Scratch Sound Loudness Online

The block looks like this:


Advanced description: It returns the frequency of the currently playing sound, as a number between 0-100. 0 meaning no sound, and 100 being the highest possible frequency possible.

Many Scratchers use the (loudness) block to gather the volume of the sound coming out of the computers speakers through a microphone. Recently NeonTech had a project featured that used a microphone in the way I just described. Many Scratchers commented that they couldn't use the project because they didn't have a mic. This block will fix that! http://scratch.mit.edu/projects/23370689/

This doesn't only have to be for audio visualizers. One could also create a game and use this block to randomly spawn an enemy when the music gets above a certain frequency.

Thepuzzlegame has created a demo for everyone to test! Open this Project inside the Scratch Sound Loudness Online link. Green Flag.

And if you want a song to test with it, here you go! : Transcendence

Supporters (37 so far!!!):

Blueinkproductions
astro-mechanic
savaka
DarkFusion
Thepuzzlegame
djdolphin
liam48D
Chainmanner
imadrainpipe
MetallicDragon
Dreamo
DemCupcakesYo
gigapouch
TheHockeyist
davidkt
The_Grits
ScratchModelMaker
Scratchifier
Code_Bender
digthebone (x3 support)
ealgase
1timetraveler
mundofinkyenglish
MewTheSmasher
Audius
rollercoasterfan
iamlink1
MegaApuTurkUltra
IceCube291
MV42Rises
Kal_Kal_Kal
meowmoo
Rexone
PrincessPanda_test_
fmtfmtfmt2
Pepperoni505
Alatis

astro-mechanic

I got bored for a minute, so I made a demo. The sound effect in there was really just the first WAV I found xD

Mr_sprite

astro-mechanic wrote:

I got bored for a minute, so I made a demo. The sound effect in there was really just the first WAV I found xD
Did you enjoy the block?

Mr_sprite

astro-mechanic wrote:

I got bored for a minute, so I made a demo. The sound effect in there was really just the first WAV I found xD
Also, what does your demo do?

djdolphin

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Blueinkproductions

+1!

astro-mechanic

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

+1

It'd be fun if there were a way to reverse this too.

savaka

Support, but one block like that can't give multiple values. It should be like this:
([loudness | pitch v] of sound playing :: sound)
Then you would probably also add pitch for sensing:
([loudness | pitch v] :: sensing)

Mr_sprite

savaka wrote:

Support, but one block like that can't give multiple values. It should be like this:
([loudness | pitch v] of sound playing :: sound)
Then you would probably also add pitch for sensing:
([loudness | pitch v] :: sensing)

What do you mean “one block like that can't give multiple values”?

DarkFusion

+1 on this.

Here's what I was suggesting for the frequency-thing:
(frequency [0-1] volume)

Where 0 would be a really low frequency and 1 would be a really high frequency.

dracae

Mr_sprite wrote:

savaka wrote:

Support, but one block like that can't give multiple values. It should be like this:
([loudness | pitch v] of sound playing :: sound)
Then you would probably also add pitch for sensing:
([loudness | pitch v] :: sensing)

What do you mean “one block like that can't give multiple values”?
Can sprites play more than one sound at once?

mathfreak231

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”,
^this

Mr_sprite

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Okay! I will change it to Sound Loudness. And I will multiply the result by 100 and then round it off to whole numbers to give a more easily used result!

djdolphin

Mr_sprite wrote:

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Okay! I will change it to Sound Loudness. And I will multiply the result by 100 and then round it off to whole numbers to give a more easily used result!
It's better now, but I think “sound levels” is still a little ambiguous.

Mr_sprite

djdolphin wrote:

Mr_sprite wrote:

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Okay! I will change it to Sound Loudness. And I will multiply the result by 100 and then round it off to whole numbers to give a more easily used result!
It's better now, but I think “sound levels” is still a little ambiguous.

I just can't think of a name that is easy to understand, yet is not long. (frequency of all current sounds playing).. That just sounds bad.

djdolphin

Mr_sprite wrote:

djdolphin wrote:

Mr_sprite wrote:

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Okay! I will change it to Sound Loudness. And I will multiply the result by 100 and then round it off to whole numbers to give a more easily used result!
It's better now, but I think “sound levels” is still a little ambiguous.

I just can't think of a name that is easy to understand, yet is not long. (frequency of all current sounds playing).. That just sounds bad.
Maybe
(total sound loudness :: sound)
? I can't think of a way that could confuse anyone.

Mr_sprite

djdolphin wrote:

Mr_sprite wrote:

djdolphin wrote:

Mr_sprite wrote:

djdolphin wrote:

The name would probably need to be less ambiguous, like “sound loudness”, and the block should probably use the same scale as the loudness block instead of one from 0 to 1.

Okay! I will change it to Sound Loudness. And I will multiply the result by 100 and then round it off to whole numbers to give a more easily used result!
It's better now, but I think “sound levels” is still a little ambiguous.

I just can't think of a name that is easy to understand, yet is not long. (frequency of all current sounds playing).. That just sounds bad.
Maybe
(total sound loudness :: sound)
? I can't think of a way that could confuse anyone.

I think that Sound Loudness is good! Also, Bum-pity bump!

DarkFusion

Sounds right.

Iditaroid

“Sound loudness” could possibly be confused with the “Loudness” block in sensing..

Thepuzzlegame

Works really well! Made a cool little demo!