Submitted by kumon on 2013-05-12 11:01
Tested Playrec on Ubuntu 13.04.
-
Get the package from the original site http://www.playrec.co.uk/ (tested version was 2.1.0)
-
The package uses PortAudio, and the source kit is required to compile mex file. (http://www.portaudio.com/ pa_stable_v19_20111121.tgz was used)
-
Extract Playrec package and place extracted PortAudio package under "lib" directory of Playrec.
-
Apply the patch for Ubuntu(attached to this blog http://ick.mech.kumamoto-u.ac.jp/kumon/sites/default/files/patch_playrec_2_1_0_ubuntu13.04.diff)( patch -p1 < patch_playrec_2_1_0_ubuntu13.04.diff )
-
Setup your MATLAB の mex compiler to compile playrec.
-
mex -setup
-
Edit /.matlab/R2013a/mexopt.sh to change '-std=ansi' to '-std=gnu89' (you can put it back to the default settings by rerun "mex -setup")
-
Run compile_playrec_gui.m at m_files directory of Playrec package. It will open a window to compile, so configure the directory of PortAudio library, and then press "Compile" button at the bottom.
-
Copy "playrec.mexa64" to the directory where your MATLAB path refers. That's it.
You can test your Playrec mex file with the examples distributed by the original site.(http://www.playrec.co.uk/download/playrec_scripts.zip)
>> spectrum_analyser(2,[1,2,3,4,5,6,7,8])
(1st arg is deviceID, and 2nd are a list of channels)
You can see two figures showing spectrums and raw signals on realtime.