Code covered by the MathWorks Limited License

Highlights from
Real-Time Audio Processor

Be the first to rate this file! 54 Downloads (last 30 days) File Size: 48.5 KB File ID: #37770
image thumbnail

Real-Time Audio Processor

by Tucker McClure

 

04 Sep 2012

Simplifies streaming or generating audio in real time.

| Watch this File

File Information
Description

The RealTimeAudioProcessor makes it easy to stream or generate audio in real time in MATLAB.

It includes examples for generating sound from a qwerty keyboard, generating sound from a MIDI keyboard (with included MIDI interface for acquiring MIDI inputs), and using any old algorithm you have lying around as real-time processor.

For a smooth experience, please start with the included documentation. There are a few things to do for the best performance.

Requirements
* Windows
* MATLAB r2012a or greater
* Signal Processing Toolbox
* DSP System Toolbox
* Soundcard with ASIO driver (recommended)
* MIDI input device (recommended only for MidiDemo)

Early beta.

Required Products DSP System Toolbox
Signal Processing Toolbox
MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements * Windows XP, Vista, or 7 * Soundcard with ASIO driver (recommended) * MIDI input device (recommended only for MidiDemo)
Tags for This File  
Everyone's Tags
audio, digital signal processing, dsp, midi, music, rapidprototyping, realtime, signal processing, sound, synthesis, system object
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
06 Nov 2012 Tucker McClure

Hi Bert,

Your question prompts a few things.

1. The MEX files for midi_interface.cpp are included, so you shouldn't need to build them. That script is only included in case someone *wants* to rebuild it for whatever reason. You should be able to just call midi_interface('open') from the command line to get going.

2. If for whatever reason you *do* want to rebuild it, it requires that you have the Windows SDK and edit midi_interface_builder.m to reflect the right path for its include and binary directories. This isn't documented because it's not intended for the user to do this.

3. The error is actually about a loss of precision in a cast. This is usually a warning instead of an error. Somewhere in your compiler, there's a setting for whether loss of precision should be considered an error or a warning. If you set it to warning, it will probably move on.

There's some included documentation about setting everything up. Have you read through this? Have you tried running any of the examples yet?

Hope that helps,

- Tucker

05 Nov 2012 Bert

I tried to run the midi_interface_builder but got his error:

>> midi_interface_builder
Building MEX file... midi_interface.cpp: In function 'bool OpenMidiInputDevice(unsigned int)':
midi_interface.cpp:111:64: error: cast from 'void (*)(HMIDIIN, UINT, DWORD, DWORD, DWORD) {aka void (*)(HMIDIIN__*, unsigned int, long unsigned int, long unsigned int, long unsigned int)}' to 'DWORD {aka long unsigned int}' loses precision [-fpermissive]

C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Compile of 'midi_interface.cpp' failed.

Error using mex (line 206)
Unable to complete successfully.
Error in midi_interface_builder (line 18)
mex(['-I' sdk_path include_sub], ...
206 throw(exception);

Updates
04 Sep 2012

Updated copyright info.

Contact us