Sound Level Meter

I want to program a small app with a sound-level meter. Where can I get information about the soundlevel for example from a music-track played in the movieplayer?

MBS has some good PortAudio functions for this, and a great example to get your started.

Hi Knut.

By sound level do you mean like the spectrum analyzer displays of stereo systems?

Do you know anything about digital signal processing and FFT/DFTTS?

Or do you mean, the audio amplitude vs time?

To begin with I believe you will need to determine the file and its format… I know you said movieplayer and I assume you mean the audio track of a movie or a audio file like mp3, avi, mp4, m4v etc…

Are you developing on a OS X, Windows or Linux?

Any how… check this out… it might be a good place to being.

Dim f as FolderItem = GetFolderItem("Doh!") If f <> nil then Dim s as Sound = f.OpenAsSound If s <> nil then s.Play Else //check f.LastErrorCode End if Else //user cancelled End if

The QuickTime Plugin from us has sound level things, so you can get the levels of the movie playing in a movieplayer.

@Brad Hutchings and Christian: Neither in MBS PortAudio nor in MBS Quick Time I can find anything which has something to do with my needs. Ok - maybe that I’m a little bit blind to find that in the huge documentation - so, if you have a tip for me :wink: ?

@Brian : answering your question:

  • in the 1st step: audio amplitude vs time
  • until now I know nothing about digital signal processing and FFT/DFTTS
  • shure I mean audio-tracks
  • Windows development

And I checked out that easy way to pla my audio tracks … :wink:

@ all: thanks to all of you for your assistence - with your help I’m shure to solve my problem!

Greeting from Germany
Knut

To get a good sound meter you need to incorporate ballistics to get the motion right. There is a specification available for the VU standard if your looking for a good quality audio meter display. Playing the sound file might turn out to be the simplest solution because it could take care of that for you.

Well, I though about QTTrackMBS.SoundLevelMeteringEnabled and QTTrackMBS.SoundLevelMeterInfo.
It’s built into QuickTime.

I use this and built a class for it using some graphic wizardry it now looks like a meter you might find on a studio desk (basically, you give it a backdrop that is the meter with the leds lit up. have another graphic with the leds off. take the y of the soundlevelmeter and draw the led off graphic from the top to the y. Viola - you have a led meter)

Hi Sean,
I’m not so familiar and more a beginner with XOJO/Realbasic and I tried to understand the example programs coming with the plugins. A lot of memory and stream buffering etc. Is there not an easy way to call the player and get the metering information out of the runing player?
Knut

Did you try the “Sound Equalizer.rbp” example project?

not yet
I’ll take a look …

Hi Christian,
oh yes I did yesterday - but with my realbasic 2010.2 the app-class is empty and it looks like that you are calling methods from this class
Knut

@Christian Schmitz : It seems that it is not a problem with my old Realbasic Version - I’ve tried to run it with the new YoJo - and the same - app ist empty and the following classes/methods are not defined: CGImageMSB, CGCreateImageMSB.

Well, how about adding the MacOSXCG plugin? Or better all MacOSX plugin parts?
One may be missing.

That’s a big problem: I have an iPhone, iPad but no PC from that Company…

ignoring those graphical classes - now it works fine …

I am looking for the sound equalizer,rbp sample project but cannot find it or any other .rbp only .xojo_binary_project examples…

We just recently got a new AUPlayerMBS class which can give you equalizer bands:
http://www.monkeybreadsoftware.net/class-auplayermbs.shtml

What is the relationship between Xojo and Monkeybread? If you bought a full Xojo license are Monkeybread features pay as you go addons or are they all together?

They’re unrelated. Chrstian runs Monkeybread and does the plugins. You purchase them separately from Xojo. There’s several options and bundles.