Importing timestamp information with Python

There are different timestamp issues. The one we’re addressing here is I think the cue chunk (but your program as far as I know doesn’t look for the smpl chunk).

Basically we are in the hands of the libsndile PCM import/export library that we use as regards chunk issues (unless we modify that library ourselves).

I found a very old forum post here Read, Add, Edit and Write Loop and Cue markers to Wav - #12 by larpal where someone had got Audacity to handle up to 15 loop points and 10 cue points in one WAV by modifying Audacity and libsndfile. No one else seems to have rebuilt Audacity with that code, and libsndfile itself still does not seem to support cue chunks (sndfile-convert discards the cue chunk at the end of a WAV, so obviously current Audacity does that too when exporting).

So you should not export from Audacity over the original WAV if you want to keep cue points.

Then as I understand it there is the bext chunk which has timestamp-related metadata and is specified in the BWF standard . Libsndfile 1.0.24 (the version Audacity currently uses) and 1.0.25 retain the bext chunk (but don’t seem to understand it), but Audacity discards it. So the same moral applies, don’t export over the original WAV if you want to retain the bext chunk.

There is no Cue chunk, unquestionably. They use a proprietary MTE2 chunk to store the timestamp information.

The recordings of this underwater device seem to occur at intervals as set by the user in the configuration software.

Anyway I have looked on the site of the manufacturer of the equipment and found their InfoWav software which will give you the timestamp and other information in that MTE2 chunk. For more explanation see http://multi-electronique.com/files/AURAL/user/AURAL-M2_USER_GUIDE.pdf .

If you open the WAV file in InfoWav, you’ll see that there are four recordings of 4.5 minutes each and you can see the start date and time and end date and time of each recording. You can save the information to a text file if you wish. You could create your own Audacity labels manually from that file as there are only four start points.

The latest version of findcues.py that guenterrote posted at Missing features - Audacity Support has syntax errors in python 3.3, but I’ve written to guenterrote about that.


Gale