Creating/retrieving markers in a sound file

coralie's icon

Hi all
I need to display subtitles when playing a sound file. I have no knowledge of how to add markers in a sound file in Max and use them to output the content of a [text] object.
Is there anyway to do so?
Regards

Coralie

pdelges's icon

AFAIK, there is no way to write markers in a soundfile from Max.
But you can read existing markers with the help of sfmarkers~, available from here.

Now, a simple coll with the timings as index, and the subtitles as data, may be a simple way to do what you want!

coralie's icon

Hi, thank you very much. I knew about sfmarkers~, but I am not certain I can use the markers from a protools session. I'll look into it. I have used a [text] object in a way that is quite similar to what you describe. I haven't found a way to retrieve the timing when reading the sound file. I use playlist~. I have looked a groove~ and buffer~ but I haven't found what I was looking for.

pdelges's icon

If you use playlist~, you can use it's sync outlet to get the current position (you'll need to take the fractional part and multiply it by the length of the sound file).

If you don't need a list, you could use sfplay~ which sends the current position in ms (see [more feature] in its help file.

coralie's icon

Great. There are some features about objects in general that I never look at, because I don't understand the meaning of their name, such as the sync output. I didn't know sfplay~ could do such a thing.
I'll look at them.

Thanks a lot.

coralie's icon

OK, that's the "position outlet flag" of sfplay I didn't know about.

generalh's icon

I remember using mubu to do that kind of marker driving system it’s a package now.
You should give a try to that boxes!!
hth
H

coralie's icon

Hi,
I know mubu, I sometimes use it. I'll give it a try. Thank you!
Coralie

Roman Thilenius's icon


having "markers" is not part of any of the audio file formats... most programs are using unique formats... they use textfiles or put the audio files into containers... or they write custom meta data into a .wav header... that´s why markes are often hard to transfer from one app to another.

pdelges's icon

Roman , markers are part of the official specification of WAVE, AIFF and SD2 files. But then they are often poorly implemented in softwares and are not compatible with more recent metadata stuff.