Discuss Scratch

mervinthegreat
Scratcher
23 posts

Is there a way to detect the loudness of audio being played?

Just to clarify, I'm talking about sound effects/songs, not microphone loudness.

Last edited by mervinthegreat (March 15, 2023 20:41:05)

Spentine
Scratcher
1000+ posts

Is there a way to detect the loudness of audio being played?

In order to detect how loud the audio is, you must determine how loud each audio clip is at what time. You can then add it up when determining the loudness.

Last edited by Spentine (March 15, 2023 21:26:53)

mervinthegreat
Scratcher
23 posts

Is there a way to detect the loudness of audio being played?

Spentine wrote:

In order to detect how loud the audio is, you must determine how loud each audio clip is at what time. You can then add it up when determining the loudness.
So in order to set the loudness, I could do something like a list of numbers with each item being one sound and each number being a level of loudness?
vladfein
Scratcher
100+ posts

Is there a way to detect the loudness of audio being played?

The loudness is controlled by
setvolumeto%
and
changevolumeby
And it has a reporter
volume

But the perceived loudness depends on those sound clips. I don't think you can make them louder than what's recorded, you can only quiet them down.
mervinthegreat
Scratcher
23 posts

Is there a way to detect the loudness of audio being played?

vladfein wrote:

The loudness is controlled by
setvolumeto%
and
changevolumeby
And it has a reporter
volume

But the perceived loudness depends on those sound clips. I don't think you can make them louder than what's recorded, you can only quiet them down.
I wasn't looking for the volume block. That changes the whole audio files' volume. I'm looking for something that can detect the volume of audio being played at the time.

Powered by DjangoBB