Hello. I’ve been experimenting with making an interactive music system in Unity, and I think it would be really useful to be able to read markers within wav-files. In a DAW such as Reaper, I can put markers in a project like so:
I can then render the project as a wav-file, and Reaper will put the markers in the header of the file:
This is what it looks like if I import a wav-file with markers into Reaper:
Oh hey Nikolaj. I’m Mordi. No, unfortunately I haven’t found a solution yet. Giving it another go now, to hopefully use this method for a dynamic game soundtrack.
Repear saves the marker metadata differently than audition, seems like the markers are saved as “Cue Points” which is binary data. You can extract that data with exiftool -b.
Aha, I see. I guess that exiftool won’t help in my case then. I actually managed to start reading a wav-file yesterday, by studying the wav-specification. This is a good source, as well as this one.
I’m literally just reading the file using a standard FileStream object.
FileStream fs = new FileStream(path, FileMode.Open);
for (int i = 0; i < x; i++) {
int b = fs.ReadByte();
}
Something like this.
Hopefully I can manage to read the cue points today. I’ll post here if I have any breakthroughs.
Just going to throw down a shameless plug here for Koreographer. It provides Cue Point-like functionality… on steroids. The base edition is sufficient for basic Cue Point style work. The Professional Edition provides you with a MIDI Converter (convert MIDI events into Cue Points/markers), expanded Payload types, and added integrations with third party audio engines.
Regardless, best of luck finding a solution to parsing the Cue Points from your raw WAV files!
Someone messaged me to ask how this works, so I’ll just share the solution I ended up with here.
It’s fairly straightforward to use. Should be something like this:
using MordiAudio;
class Example {
Wave.Metadata metadata = Wave.Reader.GetMetadata("Audio/whatever.wav");
}
The metadata object contains all sorts of info, including a list of cues.
I’ve tested it with a handful of wave files exported from various DAWs, and haven’t run into any issues yet.