audio capture and realtime processing

Hi all, I’m totally new to Xojo. My background is Visual Basic 6 I use for developing software for audio capture and real-time processing (spectral analysis, frequency shifting, sonar detection, etc).
I’d like to do the same with Xojo on a Mac, possibly something portable to linux and windows too.

Are there in Xojo specific functions for doing real-time continuous audio capture ? or maybe dedicated external tools / sdk ?

Any help to start this adventure will be greatly appreciated.

Gianni

Well, you can check our MBS Plugins.
We have an audio plugins with the portaudio classes.
There we have various classes incluing PortAudioStreamBufferedMBS and PortAudioStreamRecorderMBS which allow near real time and thread safe recording/playback.
Also we do have Mac specific classes, e.g. the AVFoundation plugin.

thanks for the info. This makes xojo a viable solution. Let me check more about the language features.

Gianni

[quote=32669:@Christian Schmitz]Well, you can check our MBS Plugins.
We have an audio plugins with the portaudio classes.
There we have various classes incluing PortAudioStreamBufferedMBS and PortAudioStreamRecorderMBS which allow near real time and thread safe recording/playback.
Also we do have Mac specific classes, e.g. the AVFoundation plugin.[/quote]

I didn’t know this. I’ll take a look at them.

I want to do a recorder but crashes and errors worry me. Something programs like Audacity do is saving audio constantly in chunks so a crash would lose only the last few seconds of a recording. Could something like this be done with PortAudioStreamRecorderMBS by saving every “n” samples in continuous chunks? Another advantage is that “saving” is instantaneous, as it just writes the index file.

Also: Can any of these classes help generate a waveform (not graphically, but the data to generate it myself)?

you can write samples to a file. No problem.
One of the examples actually writes a wav file.
Also to generate the wave form, you simply process the audio samples. They are just numbers.

I’m using the MBS Quicktime function and his is the core of my software which features recording and playback.
Quicktime is a bit erratic about starting and playing back time-wise (like you could never use it to make a multiple track recorder). but it’s good for simple recording and playback - and it has a output level so you can make a level input. Also, it’s really easy to create waveform shapes and you can record as long as you want to. It also can be used to save your recording in loads of formats.

I have the Audio plugin by MBS but the documentation is a little hard to read - and the input list / output list for recording devices methods have made me look for alternatives - but with a lot of perseverance and the examples, you might use that.

And then, finally, there’s a openAL plugin my Roger Mieier that works pretty well - but you need to set it for recording at a predetermined length - and it has no real way to check the input level - and only works with wav files.