Introduction
This is a console application written for my first year computing project. It takes a Wave (.wav) sound file, parse it and then you have the option of performing Discrete Fourier Transform on the data using Matlab. You can also use Matlab to plot a graph for visualisation.
Requirements
This application uses a COM interface to interface with Matlab. As such, there are several requirements that must be met before you can run it.
- Windows ONLY. – I have managed to test this only on Windows 7 64 Bit. It should work with 32 bit Windows7, Windows Vista and possibly Windows XP as well.
- Matlab
- Visual Studio 2010 (to open the solution) – You can get a free express version or the full version if you are a student.
The code that is compiled will need to be linked with the appropriate version of Matlab. The default settings in the projects reference the 64 bit version of Matlab and will compile to a 64 bit executable. Change the platform settings accordingly in Visual Studio to use 32 bit versions or to change the paths of Matlab libraries and executables. Refer to the “Runtime Requirements” and “Compile Requirements” sections below.
You might also need additional libraries to run the code. To find out which libraries are needed, refer to the Matlab documentation, especially the part about using Dependency Walker. You can use Dependency Walker with the executable file already compiled (note that it is for 64 bit Matlab and Windows only).
Compile Requirements
The default Matlab libraries that are linked are 64 Bit Libraries. You have to set several directories settings in the project settings of Visual Studio to point to Matlab’s libraries before you can compile the application. The included project file has paths set to the default install path of 64 Bit R2011a. Here are screenshots of settings that you should change:
![]()
Runtime Requirements
The application needs to find the libraries for Matlab during runtime. You can simply set PATH to the correct Matlab directory. You can achieve this using a batch file included in the source file download under Debug/x64. The default directory for a 64 bit install is “C:\Program Files\MATLAB\R2011a\bin\win64″.
Download
- Source Code – 1.3 MB
- Code Structure Description
Final Words
I don’t think this application will be further developed. It was developed as a test for using polymorphism in C++ as well as to try and interface C++ code with Matlab. A useful learning example, that’s all. I was not particularly satisfied with how the UI components of the application worked out.
