Matlab is widely used environment for signal processing and analysis. In this section, we introduce some key Matlab concepts and functions that are useful for music and audio. If you have no previous experience with Matlab, it would be beneficial to go through some of the tutorials provided in the Matlab documentation.
Matlab can be used to create and manipulate discrete-time signals.
Individual expressions can be typed directly inside the Matlab interpreter. Collections of commands can be saved in text-files or scripts (with .m extensions) and then run from the command-line. Users can also write Matlab functions.
Matlab operations are optimized for matrix algebra. Loops tend to execute more slowly.
Matlab functions can be compiled as C executables to speed up performance (though you must have the compiler).
You can also organize code in class structures and create projects with very detailed graphical user interfaces.
I have recently created a MEX package that provides multichannel realtime audio support using RtAudio.
Matlab is not free and its pricing structure is very complex. However, McGill has a site license.
An open-source alternative to Matlab called Octave is available.