<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv5234583815"><div id="yui_3_16_0_ym18_1_1459709891300_4092"><div id="yui_3_16_0_ym18_1_1459709891300_4091" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div>Shouldn't that be a separate object? Like [soundinfo] or something?</div><div id="yui_3_16_0_ym18_1_1459709891300_6179"><br></div><div>I'm thinking of cases where the user may want to query an attribute in <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6237" dir="ltr">order to decide how to load a file, or even whether they want to load <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6238" dir="ltr">it at all.  Plus a one-to-one ratio between method and output is way <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6344" dir="ltr">easier to learn, understand, and use.</div><div id="yui_3_16_0_ym18_1_1459709891300_6480" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1459709891300_6453" dir="ltr">Also-- I don't see anything in pd docs about methods which cause a<br></div><div id="yui_3_16_0_ym18_1_1459709891300_6580" dir="ltr">single outlet to send multiple messages in zero logical time.  It may seem <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6913" dir="ltr">like an obvious design pattern to pair that with [route], but Pd users have <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6914" dir="ltr">shown they can come up all kinds of creative ways to interpret an <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6994" dir="ltr">interface.  They could use an accumulator and mod to count <br></div><div id="yui_3_16_0_ym18_1_1459709891300_6667" dir="ltr">outputs if they want, and that makes it hard to add more messages later.<br> </div><div dir="ltr" id="yiv5234583815yui_3_16_0_ym18_1_1459699970677_3595"><br clear="none"></div><div dir="ltr" id="yiv5234583815yui_3_16_0_ym18_1_1459699970677_3595">-Jonathan</div><br></div></div></div><div class=".yiv5234583815yahoo_quoted"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div class="qtdSeparateBR"><br><br></div><div class="yiv5234583815yqt5185396935" id="yiv5234583815yqt38850"><div dir="ltr"><font face="Arial" size="2"> On Sunday, April 3, 2016 10:02 AM, Alexandre Torres Porres <porres@gmail.com> wrote:<br clear="none"></font></div>  <br clear="none"><br clear="none"> <div class="yiv5234583815y_msg_container"><div id="yiv5234583815"><div><div dir="ltr">that'd be a dream come true :)</div><div class="yiv5234583815gmail_extra"><br clear="none"><div class="yiv5234583815gmail_quote">2016-04-03 3:23 GMT-03:00 Dan Wilcox <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:danomatika@gmail.com" target="_blank" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>></span>:<br clear="none"><blockquote class="yiv5234583815gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv5234583815yqt6571533801" id="yiv5234583815yqt00779"><div style="word-wrap:break-word;">Throwing something else out there: looking at d_soundfiler.c, it looks like it wouldn’t be that hard to add a second outlet that could send out the number of channels and samplerate of the loaded file. As far as I can tell, the number of channels is already read, so it involves reading the samplerate. This would allow for the calculation of the correct playback speed for samples irregardless of source & playback samplerates.<div><br clear="none"></div><div>WAVE:</div><div><br clear="none"></div><div>The samplerate is the 4 bytes after the number of channels in the WAVE fmt chunk. Ref: <a rel="nofollow" shape="rect" target="_blank" href="http://www.lightlink.com/tjweber/StripWav/Canon.html">http://www.lightlink.com/tjweber/StripWav/Canon.html</a><br clear="none"><div><br clear="none"></div><div>AIFF:</div><div><br clear="none"></div><div>The samplerate is the last field in the COMM (Common) chunk. </div><div> <div>typedef struct {</div><br clear="none"><div>     ID              ckID;</div><div>     long           ckSize;</div><div>     short          numChannels;</div><div>     unsigned long  numSampleFrames;</div><div>     short          sampleSize;</div><div>     extended   sampleRate;</div><br clear="none"><div>}  CommonChunk;</div></div><div><br clear="none"></div><div>Ref: <a rel="nofollow" shape="rect" target="_blank" href="http://www-mmsp.ece.mcgill.ca/documents/audioformats/aiff/Docs/AIFF-1.3.pdf">http://www-mmsp.ece.mcgill.ca/documents/audioformats/aiff/Docs/AIFF-1.3.pdf</a></div><div><br clear="none"></div><div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;">--------<br clear="none">Dan Wilcox<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://twitter.com/danomatika">@danomatika</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://danomatika.com/">danomatika.com</a><br clear="none"><div><a rel="nofollow" shape="rect" target="_blank" href="http://robotcowboy.com/">robotcowboy.com</a></div></div>

</div>
<br clear="none"></div></div></div></div><br clear="none">_______________________________________________<br clear="none">
Pd-dev mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Pd-dev@lists.iem.at" target="_blank" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><div class="yiv5234583815yqt6571533801" id="yiv5234583815yqt35466">_______________________________________________<br clear="none">Pd-dev mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Pd-dev@lists.iem.at" target="_blank" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a><br clear="none"></div><br clear="none"><br clear="none"></div></div>  </div> </div>  </div></div></body></html>