Playrec on Ubuntu 13.04

Tested Playrec on Ubuntu 13.04.

  1. Get the package from the original site http://www.playrec.co.uk/ (tested version was 2.1.0)
  2. 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)
  3. Extract Playrec package and place extracted PortAudio package under "lib" directory of Playrec.
  4. 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 )
  5. Setup your MATLAB の mex compiler to compile playrec.
    1. mex -setup
    2. 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")
  6. 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.
  7. 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.

 

AttachmentSize
File patch_playrec_2_1_0_ubuntu13.04.diff2.72 KB