MATLAB Compiler 4.11
Deployment of a Soundcard Audio Analysis Application
This demo shows how you can use MathWorks products to deploy an application that acquires live, streaming data from a PC's soundcard. The data is collected using the Data Acquisition Toolbox. We will generate a standalone executable using the MATLAB Compiler, and then run the application outside the MATLAB environment. We will then use MATLAB® Builder™ NE to generate a component, which we will integrate with a Microsoft Visual Basic .NET project. The examples below show the creation of both .NET and COM components.
This demo provides an overview of the application and six short videos showing the key steps in the process. The video segments run automatically, but you can set your own pace using the buttons at the bottom of the video window. You will need a soundcard and speakers to hear the audio narration.
Contents- Application Overview
- Running the Application
- Generating a Standalone Executable
- Building a Component
- Integrating the Component with Microsoft Visual Basic .NET
- Additional Information
The application that we will deploy processes and displays audio signals from a PC soundcard. The signals are read using the Data Acquisition Toolbox, and processed using MATLAB Fourier transform functions and plotting capabilities. A graphical user interface (GUI) provides a convenient way to run the application and visualize the results as the audio signal changes.
![]() |
Spectrum Analysis using the Data Acquisition Toolbox. Click on image to see enlarged view. |
The GUI consists of three plots and several controls, which are used to start and stop the simulation, modify plot types, and adjust the signal sample rate. The top plot shows the time domain of the audio signal. In the middle is a two-dimensional plot of the signal's frequency domain. The bottom plot displays a brief time history of the same frequency domain signal. We can modify the bottom plot type using the visualization drop-down menu.
Running the Application
We will now start our application and whistle into a microphone connected to our soundcard to see if the application works properly. After viewing the video, close the video viewer window to return to this main demo window.
Watch
the video. (1 minute, 57 seconds)
Generating a Standalone Executable
Now that we know our application works properly, we will generate a standalone executable using the MATLAB Compiler. After viewing the video, close the video viewer window to return to this main demo window.
Watch the video. (2 minutes, 32 seconds)
Building a Component
To integrate our application with a larger program, we can generate a C or C++
library or a component. In these examples, we will use MATLAB Builder for
.NET to generate .NET and COM components. After viewing the video, close the
video viewer window to return to this main demo window.
Watch
the video. (3 minutes, 1 second)
Integrating the Component with Microsoft Visual Basic .NET
Now that we have our application in the form of a component, we can integrate it with a Microsoft Visual Basic .NET project. After viewing the video, close the video viewer window to return to this main demo window.
Watch the .NET integration. (4 minutes, 19 seconds)
Watch the COM integration. (4 minutes, 27 seconds)
Visit these product pages to learn more about MathWorks deployment products:
Store
