Discuss Scratch

stickfiregames
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

Mr_sprite wrote:

Firedrake969 wrote:

A block shouldn't be called one thing when it returns a different value, then - it's extremely misleading.

Suggest me a name. If you want to see why it is called Sound Loudness, look on the first page of this thread.
(sound loudness :: sound) // amplitude
(sound pitch :: sound) // frequency
The first post says it is called “loudness” but returns the frequency, which makes no sense.










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
Firedrake969
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

stickfiregames wrote:

Mr_sprite wrote:

Firedrake969 wrote:

A block shouldn't be called one thing when it returns a different value, then - it's extremely misleading.

Suggest me a name. If you want to see why it is called Sound Loudness, look on the first page of this thread.
(sound loudness :: sound) // amplitude
(sound pitch :: sound) // frequency
The first post says it is called “loudness” but returns the frequency, which makes no sense.
+1

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
Audius
New to Scratch
4 posts

Sound Loudness Block - Test it now!

I support this. Also, I believe we should stick to loudness instead of amplitude. Why? The scratch team used loudness instead of amplitude for the microphone. And perhaps adding pitch would be good too. But if you REALLY want to have a volume, I found a solution. In Heart of the Storm, I downloaded the project, uploaded it to the special editor you linked at the start of this project, and created a list. I used “forever add (sound loudness) to list.” I exported the list and imported it back into the original project.

Support Sound Volume blocks!
MegaApuTurkUltra
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

Audius wrote:

But if you REALLY want to have a volume, I found a solution. In Heart of the Storm, I downloaded the project, uploaded it to the special editor you linked at the start of this project, and created a list. I used “forever add (sound loudness) to list.” I exported the list and imported it back into the original project.
Yep, lists is how I've been working around this. (Of course, my aim is to build full blown visualizer (frequency domain based, not time domain like @Audius above)).
Initial attempt at a visualizer here (months old, not that good)
Better visualizer here (released this a few days ago, looks amazing IMO )
Tool to generate visualizer data here (you can also see my recent visualizer more clearly in this project)

This is a great workaround, except that it makes project files HUGE (each minute of audio adds ~1MB to the project code file with 10fps and 80 frequency samples per frame)

Sorry, this is kinda advertising. This doesn't mean I'm switching my support; I still support a block for this.

@OP, have you considered writing a pull req for LLK/scratch-flash? There's a small chance the ST might accept it

Last edited by MegaApuTurkUltra (May 17, 2015 23:04:57)


$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Audius
New to Scratch
4 posts

Sound Loudness Block - Test it now!

MegaApuTurkUltra wrote:

Audius wrote:

But if you REALLY want to have a volume, I found a solution. In Heart of the Storm, I downloaded the project, uploaded it to the special editor you linked at the start of this project, and created a list. I used “forever add (sound loudness) to list.” I exported the list and imported it back into the original project.
Yep, lists is how I've been working around this. (Of course, my aim is to build full blown visualizer (frequency domain based, not time domain like @Audius above)).
Initial attempt at a visualizer here (months old, not that good)
Better visualizer here (released this a few days ago, looks amazing IMO )
Tool to generate visualizer data here (you can also see my recent visualizer more clearly in this project)

This is a great workaround, except that it makes project files HUGE (each minute of audio adds ~1MB to the project code file with 10fps and 80 frequency samples per frame)

Sorry, this is kinda advertising. This doesn't mean I'm switching my support; I still support a block for this.

@OP, have you considered writing a pull req for LLK/scratch-flash? There's a small chance the ST might accept it

To be honest, a frequency detector would be better than a loudness detector. Both would be amazing!

Support Sound Volume blocks!
Mr_sprite
Scratcher
82 posts

Sound Loudness Block - Test it now!

Okay let me clear things up:

1st. Yes Firedrake969, it is incorrectly named. I can rename it if that is what the majority desires.

2nd. This block does not get amplitude. It gets the frequency. I haven't really edited the main post.

3rd. I know there are workarounds, but this block is meant to make hard things easy and fun! (And dynamic. SFX will even trigger the block!)

4th. I did make a pull request.
“Really, you're supposed to first suggest any additions to Scratch in the Suggestions forum. Once it has been approved by the Scratch Team, you can create a PR.

However, i kinda doubt this block will be added. I'm an experienced Scratcher and don't even understand what it does. What would a newbie do?”

Closing—we usually won't accept pull requests for new features that we haven't considered carefully beforehand. See the readme for more information.

And honestly. How many suggestions have been added to Scratch….. Not trying to be pessimistic, but realistic. I still hope for the ST to add this block, but until then, we can only wish and hope!

I hope this cleared things up for you all!
stickfiregames
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

Mr_sprite wrote:

2nd. This block does not get amplitude. It gets the frequency. I haven't really edited the main post.

Why can't we have both?










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
MegaApuTurkUltra
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

stickfiregames wrote:

Mr_sprite wrote:

2nd. This block does not get amplitude. It gets the frequency. I haven't really edited the main post.

Why can't we have both?
^^ this.

Also how exactly does it work if it gives frequency? As I said above, there often are multiple frequencies in a single sound…

Also, add me to the supporters list please

Finally, can you post the code on github please?

Last edited by MegaApuTurkUltra (May 18, 2015 12:25:29)


$(".box-head")[0].textContent = "committing AT crimes since $whenever"
ChocolatePi
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

MegaApuTurkUltra wrote:

I know this topic has just been necrobumped but I want to say no support.

My project already features a pretty swaggy visualizer - no extra blocks required. If novice scratchers want to make their own visualizer, they should recognize that making a visualizer, like a lot of things on scratch that people want to do (3D, multiplayer, etc) requires advanced knowledge and hard work, not wishing for a new block to do what they want. No offense to OP
[Removed - let's not put down other projects]
As per this.

No support, for ambiguity for newbies and because of MATU's post.
IceCube291
Scratcher
100+ posts

Sound Loudness Block - Test it now!

I like this idea
MegaApuTurkUltra
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

ChocolatePi wrote:

MegaApuTurkUltra wrote:

I know this topic has just been necrobumped but I want to say no support.

My project already features a pretty swaggy visualizer - no extra blocks required. If novice scratchers want to make their own visualizer, they should recognize that making a visualizer, like a lot of things on scratch that people want to do (3D, multiplayer, etc) requires advanced knowledge and hard work, not wishing for a new block to do what they want. No offense to OP
[Removed - let's not put down other projects]
As per this.

No support, for ambiguity for newbies and because of MATU's post.
Haha whoops, forgot I originally said no support. I've switched to support

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Mr_sprite
Scratcher
82 posts

Sound Loudness Block - Test it now!

MegaApuTurkUltra wrote:

stickfiregames wrote:

Mr_sprite wrote:

2nd. This block does not get amplitude. It gets the frequency. I haven't really edited the main post.

Why can't we have both?
^^ this.

Also how exactly does it work if it gives frequency? As I said above, there often are multiple frequencies in a single sound…

Also, add me to the supporters list please

Finally, can you post the code on github please?

We can have both! I used the SoundMIxer.computeSpectrum() method in ActionScript 3.0 to get the raw sound data of the currently playing sounds.

There is a very easy way to get either the amplitude or the frequency, I can do it in the near future!

ChocolatePi wrote:

No support, for ambiguity for newbies and because of MATU's post.
Explain the ambiguity for newbies.

And just because there is a workaround doesn't mean a feature isn't necessary. If there is an easier way (that only took 17 lines of code to add) then why not add it?

I am updating the supporters list!
Mr_sprite
Scratcher
82 posts

Sound Loudness Block - Test it now!

Firedrake969 wrote:

stickfiregames wrote:

Mr_sprite wrote:

Firedrake969 wrote:

A block shouldn't be called one thing when it returns a different value, then - it's extremely misleading.

Suggest me a name. If you want to see why it is called Sound Loudness, look on the first page of this thread.
(sound loudness :: sound) // amplitude
(sound pitch :: sound) // frequency
The first post says it is called “loudness” but returns the frequency, which makes no sense.
+1

I am implementing this!
MegaApuTurkUltra
Scratcher
1000+ posts

Sound Loudness Block - Test it now!

Can I please look at your source code?

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Mr_sprite
Scratcher
82 posts

Sound Loudness Block - Test it now!

MegaApuTurkUltra wrote:

Can I please look at your source code?

Oh yeah! Sorry about that!

https://github.com/LLK/scratch-flash/compare/master…MrSprite:sound-data-block
All the Green is what I added. I haven't touched this code for almost a year!
MV42Rises
Scratcher
18 posts

Sound Loudness Block - Test it now!

This block has to be added.
Right.
NOW.
Kal_Kal_Kal
Scratcher
100+ posts

Sound Loudness Block - Test it now!

Support!
meowmoo
Scratcher
500+ posts

Sound Loudness Block - Test it now!

support!

http://fyucha.com/

R a i n b o w
Rexone
Scratcher
62 posts

Sound Loudness Block - Test it now!

Full support. This is a great idea. I'm going to link to this on a ST member's profile, even though that probably won't help, and you could've already done it.

Also, do you think you could try to hack the block into the main editor via sharing a project with it? I've seen that done before.

Last edited by Rexone (May 30, 2015 12:01:48)

Mr_sprite
Scratcher
82 posts

Sound Loudness Block - Test it now!

Rexone wrote:

Full support. This is a great idea. I'm going to link to this on a ST member's profile, even though that probably won't help, and you could've already done it.

Also, do you think you could try to hack the block into the main editor via sharing a project with it? I've seen that done before.

I doubt it. I edited the source code of scratch and compiled it. The hacked blocks you see are when people edit the JSON file that is saved in the .sb2 file.

Powered by DjangoBB