BeatrootAnalysis

Beatroot analysis

Beatroot by Simon Dixon is a system for beat tracking. Here's a small script for integrating this analysis with Praat.

  1. s1=selected("Sound")
  2. Write to WAV file... /tmp/forbeatroot.wav
  3. system java -jar /home/johanf/dev/beatroot/beatroot-0.5.3.jar /tmp/forbeatroot.wav -o /tmp/forbeatroot.txt
  4. tg1=To TextGrid... beats
  5. m1=Read Matrix from raw text file... /tmp/forbeatroot.txt
  6.  
  7. nr = Get number of rows
  8. for i to nr
  9.   b'i' = Get value in cell... i 1
  10. endfor
  11.  
  12. select 'tg1'
  13. for i to nr
  14.   Insert boundary... 1 b'i'
  15. endfor
  16.  
  17. select 'm1'
  18. Remove
  19.  
  20. select 's1'
  21. plus 'tg1'
  22. Edit