Sound "recording" or processing?

I need to be able to display relative sound amplitudes (single tone, swept frequency) for a one-off desktop project. There are several postings circa 2017 about sound recording on Windows using RealBasic. But, I cannot find anything more recent or with Xojo as the platform, or on a Mac (do have Windows available but would prefer to do something cross-platform).

It would appear that the windows version results in a wav file or data in the format for a wav file. If this is the case, then I will need to parse and process the sampled audio data into displayable and graphable amplitude values.

Can anyone suggest A coherent program flow that would do this and point to some relevant resources that might assist in this effort? Or even off-the shelf program(s) that are capable of doing something like this?

Many thanks
Jim Wagner
Oregon Research Electronics
Jim Wagner

Well, if you write it in Xojo and use MBS Xojo Plugins, you can check the Audio classes here to record on Windows.

The PortAudioStreamRecorderMBS class and the /Audio/PortAudio Record and Play may help.

Thanks, Christian - Figured that MBS would have a way. Will give it a careful look.


We use SoX for a lot of audio wrangling. It’s a command line tool, great for things like sample rate conversions, and whatnot. There is a Sox library (libsox) which may offer what you need. It would be easy enough to call the command line app from Xojo, but I’m not sure there’s any way to return the raw data you’re looking for from that, but libsox might be able to. I’ve never used it so I can’t say for sure.

1 Like

Thanks Perry -

Will take a look.


1 Like

+1 for SoX. Extremely powerful and flexible.

SoX is pretty well known for its vulnerabilities.
So watch out for this when you distribute this.

Edit: funny, even the Wiki page of SoX warns you about it.

Anyhow, using SoX is best when you are not connected to the internet.

Thanks for that heads-up. It will never be “distributed”; I just need a way to do some audio comparisons for a hardware project.