4 ;name "Onset Detection..."
5 ;action "Generate onset label track using aubioonset..."
6 ;info "Aubio onset detector:\n Generates a label track with markers at the beginning of audio events"
7 ;control threshold "Detection threshold" real "[0.001-0.900...]" 0.1 0.001 1.0
9 ; largest number of samples
10 (setf largenumber 1000000000)
11 ; some temporary files
12 (setf infile "/tmp/test.wav")
13 (setf tmfile "/tmp/test.txt")
15 (setf aubiocmd (strcat "aubioonset -t " (ftoa threshold) " -i " infile " > " tmfile))
16 (setf deletcmd "rm -f /tmp/test.wav /tmp/test.txt")
18 ; save current selection in /tmp
19 ; bug: should check the sound is mono
20 (s-save s (snd-length s largenumber) "/tmp/test.wav")
24 ; read the file and build the list of label in result
26 (fp (open "/tmp/test.txt" :direction :input))
36 (list (list (atof c) ""))
38 (setf c (read-line fp))