Reading loop points / cues from .wav files
so am i right that info~ only handles loop points in aif files and sflist~ only lets you add cue points but can't read ones that are already embedded?
from googling and searching max's documentation this seems to be the case. i noticed someone had written an object that can read them from .wav files but it's mac only.
so looks like i'll have to use filein and scan for the smpl chunk and work it out manually yeah? someone please tell me this isn't the case.
For Mac there is sfmarkers external
http://www.crfmw.be/max/sfmarkers0.4.2.zip
yep that's the object i referred to in my post
I could build a Win version a couple of years ago, unfortunately 32 bit only.
But as I don't have a Win machine, I can't offer any support.
If somebody wants to build a 64bit version, I can send him the sources.
Hey, I'm trying to get sfmarkers~ to work, but it doesn't report any markers in my soundfile.
Here is my test file. It does contain loop-points written with the excellent Endless Wav Software https://www.bjoernbojahr.de/endlesswav.html but they don't get read, why is that? I'm using the 0.5.0 version of sfmarkers~ on macOS 14.7
Dear Elud, I'm sorry to read there is a bug in sfmarkers~
I can reproduce the problem and will try to fix it when I find some time. In the meantime as a workaround you could try to convert your sound into an AIFF.
that file has no markers at all.
indeed, but it does have a loop. I didn't check yet but as far as I remember, loops and markers are in different chunks, in WAVE files there is a Sampler Chunck to define a loop.
I will soon have to open an Hex editor again :-)
Hey Source Audio, thanks for looking into the file. I wrote the loop points using the aforementioned software. If I download my uploaded file from this forum and drag it into the sampler of ableton live the loop points get recognized and set properly, am I missing something?
Thanks PDELGES!
Edit: Ah, I seem to be a bit confused about markers and cues and loop points, will read up on that.
Elud, could you send me an email (you'll find my adress where you found the external)?
have sent the mail!
SMPLCHUNK is present in bassoon wave file,
wave files have minimum :
header, format and data chunks
if markers are inserted then cue and list chunks
if sample infos are present, then smpl chunk.


Only samplers and few editors can read SMPLCHUNK
Max info~ object can't ...
Indeed. sfmarkers~ reads the loop(s) defined in the smpl chunk, but there was a bug (it expected to find also a LIST chunk with the name of the loop, but it is not mandatory - there is none in this sample).
Acoustica, DSP-Quattro, ocenaudio, Snapper do read those loops too.
Where does your screenshot come from? Seems more handy than an hex editor :-)
that screenshot was from sweetscape editor
CUECHUNK and LISTCHUNK have only to do with markers.
CUE = marker offsets, LIST = marker names
all info for samplers in in SMPLCHUNK
If a loop has a name, its name will be stored in a 'labl' sub chunk, in a list. Here for instance with the name 'gazobu' :

The WAVE format is a real pita. Here is the same sample, but with a named loop ('gazobu').
It seems even possible to define more than one loop, although I never found an editor (nor sampler) able to do that.
what if you now add few Markers ?
I added one to your Named Wave file in TwistedWave.app
which des not recognise smpl data.
When resaved it leaves SMPLCHUNK as is,
but wipes sample name in LISTCHUNK and inserts Marker name(s) instead.

:-)
I added a marker, named 'bugazo', with ocenaudio :

As you can see, both names are in 'labl' chunks, in a LIST. But maybe ocenaudio does it wrong…
Everytime I dig a bit into the WAVE format I got headache…
I'd say oceanaudio does it right, lists all names in the list,
no matter if markers or loop points.
TwistedWave and probably any other non smpl aware
editor might remove loop names