buzzbuzz wrote:When I ran your code, I didn't get an output of 0. The program gave me nothing - not NIL and not an error message. Just a blank text document.
It wasn't MY code, I just copied it from your previous message

Strange that you got a different result (or rather "no" result). I presume that Nyquist in Audacity must have been updated - I'm using Audacity 1.3.5
If that's the case, then I'd suggest that you install Audacity 1.3.5. v.1.2.x will be obsolete soon as the new stable version (1.4.0) is due out soon. Audacity 1.4 will be based on 1.3 beta, so I expect it will share most of the additional features of 1.3.x
You can have Audacity 1.2 and 1.3 on the same machine, so no need to uninstall 1.2. The only thing to be aware of though, is that Audacity 1.2 projects can be opened in 1.3, but 1.3 projects cannot be opened in 1.2
buzzbuzz wrote:The reason I want record when certain acoustic events occur is that I was hoping to use Audacity for a research project.
Is there some reason that you cannot process the entire track? That would resolve the problem and give you times that match the Audacity time line.
You may find it helpful to look at the code for the "Silence Finder" plug-in
http://easyspacepro.com/audacity/plugin ... eMarker.ny
buzzbuzz wrote:I also tried reading my text file like you said, but it doesn't seem to read the numbers in the file.
It is certainly possible to read in text from a file - I've done it.
This is the code snippet that I used:
Code: Select all
(setq fp (open "test.dat" :direction :input))
(read fp)
The file "test.dat" was in my home folder (I'm using Linux). I'm not sure off hand what the default path would be for Windows, but if you use
Code: Select all
(setq fp (open "test.txt" :direction :output))
without specifying a path, then that will create a file in the home directory.
Note that Nyquist is really a separate program from Audacity. It is included (or at least a trimmed down version of Nyquist) with Audacity, and Audacity is able to pass some data to it such as the selected sound and parameters entered through the plug-in dialogue. The output from Nyquist can then be returned to Audacity if it is data that makes sense to Audacity, such as a sound or labels.