<div dir="ltr">If you're after the number of channels and sampling rate, the list coming out of the right outlet of [soundfiler] gives you that. And the left outlet gives you the number of frames/samples, but beware that it actually reports the number of samples loaded to the target array. So if you don't use the -resize flag it won't necessarily report the number of samples in the file.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 28, 2022 at 1:19 PM Pierre Alexandre Tremblay <<a href="mailto:tremblap@gmail.com">tremblap@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello again<br>
<br>
So I was missing an object that is quite useful when dealing with audio files in batches. Attached is the ugly file in progress to read (with [file]) the header of audio files and demingle it to get the number of channels and number of frames and sampling rate… what the Max object [sfinfo~] does.<br>
<br>
Now I notices that the pd API offers me the headers to recode it in C - so I have 2 options here<br>
<br>
- I don’t bother anyone and I coder it as fluid.sfinfo<br>
- I code it as [sfinfo~] and make a PR and pray that the dev gods pick on it and in the meantime I just include my PR version.<br>
<br>
I looked in decken and couldn’t find that string (soundfile, sound file, etc) so I’m pretty sure it is not there.<br>
<br>
In all cases this is a very useful object to have. I offer my pd attempt in sacrifice to the people who want to have a laugh. It kind of works… but that ‘extended’ format (80 bit float anyone?) is a pain to detangle :)<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">William Brent<br><br>“Great minds flock together”<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" target="_blank">www.conflations.com</a></div></div>