<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Aw c'mon, Miller, you didn't even try.<br></span></div><div><br><span></span></div><div><span>It's just a little sprintf hacking and  that idiosyncratic recursion that outputs everything backwards.</span></div><div><br><span></span></div><div><span>-Jonathan<br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Miller Puckette &lt;msp@ucsd.edu&gt;<br><b><span style="font-weight: bold;">To:</span></b> Alexandre Torres Porres &lt;porres@gmail.com&gt;<br><b><span style="font-weight:
 bold;">Cc:</span></b> pd-lista puredata &lt;pd-list@iem.at&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, August 3, 2011 12:35 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file<br></font><br>Nope... there needs to be a string-to-binary-list-and-back function somewhere<br>but I can't figure out what to name it :)<br><br>M<br><br>On Wed, Aug 03, 2011 at 01:26:21AM -0300, Alexandre Torres Porres wrote:<br>&gt; now, some files come in ratios as one symbol like this<br>&gt; <br>&gt; 5/4<br>&gt; 3/2<br>&gt; 7/4<br>&gt; <br>&gt; I'd need to break them into different characters, then treat as numbers to<br>&gt; get interval in cents. How do I do that? I believe I can't do it in any way<br>&gt; with vanilla objects, right?<br>&gt; <br>&gt; thanks<br>&gt; Alex<br>&gt; <br>&gt; <br>&gt; <br>&gt; 2011/8/3 Alexandre Torres Porres &lt;<a
 ymailto="mailto:porres@gmail.com" href="mailto:porres@gmail.com">porres@gmail.com</a>&gt;<br>&gt; <br>&gt; &gt; yeah, it works :)<br>&gt; &gt;<br>&gt; &gt; I knew there had to be an easier way other than the mess I did.<br>&gt; &gt;<br>&gt; &gt; Perfect, Thanks<br>&gt; &gt;<br>&gt; &gt; This is a very cool addon feature to my stuff I'm showing at PdCon, see you<br>&gt; &gt; all there.<br>&gt; &gt;<br>&gt; &gt; See you all there soon!<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; 2011/8/3 Miller Puckette &lt;<a ymailto="mailto:msp@ucsd.edu" href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>&gt;<br>&gt; &gt;<br>&gt; &gt;&gt; HI Alex --<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Have you tried sending textfile an "open [my-filename] cr" message?&nbsp; The<br>&gt; &gt;&gt; "cr" flag asks to interpret newlines as end-of-list.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; cheers<br>&gt; &gt;&gt; Miller<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Tue, Aug 02, 2011 at
 11:51:17PM -0300, Alexandre Torres Porres wrote:<br>&gt; &gt;&gt; &gt; Hi folks<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Back in the end of my masters, I did make something that allows you to<br>&gt; &gt;&gt; load<br>&gt; &gt;&gt; &gt; scales from the Scala software into Pd, which has a database of over<br>&gt; &gt;&gt; 4000<br>&gt; &gt;&gt; &gt; scales.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Check the software and data bank here<br>&gt; &gt;&gt; <a href="http://www.huygens-fokker.org/scala/" target="_blank">http://www.huygens-fokker.org/scala/</a><br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; It's an extremely powerful tool for microtonality, but you may not care<br>&gt; &gt;&gt; for<br>&gt; &gt;&gt; &gt; that and just want to use the scale data bank in Pd.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Anyway, I have a way that exports the&nbsp; from the Scala software into a<br>&gt; &gt;&gt; text<br>&gt; &gt;&gt; &gt; file that opens in this
 specific subpatch of mine.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; But I was trying to do something easier, and that is just load these<br>&gt; &gt;&gt; *.scl<br>&gt; &gt;&gt; &gt; files into [textfile] or [msgfile] for example, and extracting the list<br>&gt; &gt;&gt; of<br>&gt; &gt;&gt; &gt; these scale intervals in cents.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Here's what one of these files look like<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ==============<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ! 08-11.scl<br>&gt; &gt;&gt; &gt; !<br>&gt; &gt;&gt; &gt; 8 out of 11-tET<br>&gt; &gt;&gt; &gt;&nbsp; 8<br>&gt; &gt;&gt; &gt; !<br>&gt; &gt;&gt; &gt;&nbsp; 218.18182<br>&gt; &gt;&gt; &gt;&nbsp; 327.27273<br>&gt; &gt;&gt; &gt;&nbsp; 436.36364<br>&gt; &gt;&gt; &gt;&nbsp; 654.54545<br>&gt; &gt;&gt; &gt;&nbsp; 763.63636<br>&gt; &gt;&gt; &gt;&nbsp; 872.72727<br>&gt; &gt;&gt; &gt;&nbsp; 1090.90909<br>&gt; &gt;&gt; &gt;&nbsp;
 2/1<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ===============<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; So I assumed it'd be easy to extract each cents value and make a list<br>&gt; &gt;&gt; out of<br>&gt; &gt;&gt; &gt; it, but I was wrong. Don't know why but it doesn't load this in separate<br>&gt; &gt;&gt; &gt; lines, maybe because it is not a *.txt file at all.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; And anyway, I'm getting in Pd just a list, so the above file, for<br>&gt; &gt;&gt; example,<br>&gt; &gt;&gt; &gt; file becomes<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; list ! 08-11.scl ! 8 out of 11-tET 8 ! 218.182 327.273 436.364 654.545<br>&gt; &gt;&gt; &gt; 763.636 872.727 1090.91 2/1<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; I seem to have found a messy way to get the list out of it, but maybe<br>&gt; &gt;&gt; you<br>&gt; &gt;&gt; &gt; people know of something really
 simple and elegant with some extended<br>&gt; &gt;&gt; &gt; objects.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Thanks<br>&gt; &gt;&gt; &gt; Alex<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; <a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>&gt; &gt;&gt; &gt; UNSUBSCRIBE and account-management -&gt;<br>&gt; &gt;&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;<br><br>&gt; _______________________________________________<br>&gt; <a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list"
 target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br>_______________________________________________<br><a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br></div></div></blockquote></div></div></body></html>