nyquist program to return clip boundary timestamps

one of the things I do with audacity is segment a track by each onset and gather the timestamps to use in another rather rudimentary program that I use.

I was wondering if it is possible to create a nyquist program that returns a list of timestamps for each clip boundary in a track (preferably in rounded milliseconds separated by spaces), and exports it to a file. for example, if there was a track with clip boundaries at every half second, it would create a file that contains “0 500 1000 1500 2000” etc.

I don’t know of anyone that’s done that, but yes it would be possible. However, it may not be necessary as you can get a list of clip times without needing to do any coding.

  1. Enable the “Extra” menu from the “View” menu.
  2. “Extra menu > Scriptables II > Get Info”
  3. Select “Type = Clips” and “Format = Brief”

For your example with clips every 0.5 seconds, you will see a list (which you can copy and paste into a document if you wish) like this:

    0 0 0.5 0  
   0 0.5 1 0  
   0 1 1.5 0  
   0 1.5 2 0  
   0 2 2.5 0  
   0 2.5 3 0  
   0 3 3.5 0  
   0 3.5 60 0

The “0” at the start of each line means “track id = 0”, so you can ignore that.
The “0” at the end of each line means “clip color id = 0”, so you can ignore that too.

The other numbers are the start / end times, and are accurate to 4 decimal places (trailing zeros are not printed).

Thank you, I really appreciate it.