<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>My problem is similar to your case b. Maybe I shoud mention at this point that the lists are midi messages, and the first number of each lists are timestamps.</div><div><br></div><div> I'm looking for a solution within pd. I shall have a look at all your suggestions, they look all very good. The [coll] object seems to be the easiest solution to adapt to my patch, but I don't like the fact that the [sort&lt; fonction strips out the number it uses to do sorting, in my case the timestamp which is off course an important information. But well, thats quite easy to fix.</div><div><br></div><div>For your interest, the goal of the patch is to create a text file which will be converted into a midi file using [seq]. It seems that [seq] works well only with sequentially ordered midi messages.</div><div><br></div><div>Thanks
 again</div><div>Benoît<br></div><div><br></div><div><br></div>  <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;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> Lorenzo Sutton &lt;lorenzofsutton@gmail.com&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> pd-list@iem.at <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> jeudi 15 mars 2012 8h41<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [PD] store and man<br> </font> </div> <br>On 14/03/12 23:04, Benoît Fortier wrote:<br>&gt; Hi everybody,<br>&gt; <br>&gt; I need to store multiple lists of numbers in a text file in a specific order : the first number of each list must be ascending, from the first line of the text file to the last. The problem is this : my patch
 outputs the lists in an unordered way. I could rewrite the patch so that the lists gets outputed the correct way, but to be able to store all the lists somehow and then write a patch to order them afterward feels to me like a much more elegant solution. Any toughts on this?<br>For me it is not very clear if:<br><br>a. your patch outputs some unordered lists for which you want to save the produced order E.g.<br>[x y z(<br>[z x y(<br>[a b c(<br><br>should be written to the text file in that order<br>1 x y z;<br>2 z x y;<br>3 a b c;<br><br>or<br><br>b. your patch outputs lists like<br>[3 x y z(<br>[1 z x y(<br>[2 a b c(<br>in an unknown order and you want to save them in the text file as:<br>1 z x y;<br>2 a b c;<br>3 x y z;<br><br>In case a. it's quite trivial just add a counter which grows at each list production and prepend it to the list then add the list to the [textfile]<br>In case b. I would probably save the lists unordered with [textfile] and then
 use some scripting like python to easily sort them<br><br>Lorenzo.<br>&gt; <br>&gt; Thank you all, this list has been very helpfull to me, and its also quite entertaining!<br>&gt; <br>&gt; Benoît<br>&gt; <br>&gt; <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;&nbsp; <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>  </div></body></html>