Max implementation of qlist
After having problems with the adaption for Max of Miller Puckette’s qlist
object I finally decided to implement the basic idea of qlist
in an abstraction using the standard library coll
object. The idea is to have a list of cues where each cue contains a set of messages to be sent at the time the cue was received or at a specified time. The syntax for writing the text file to load into the collist
object is simple and very similar to the syntax for qlist
. Here is an example:
0, ------------------------ 1;
1, 0 print *** this is a message from collist ***;
2, print cue 1;
3, 2200 strt_spl 4 1;
4, ------------------------ 2;
5, 0 print *** this is a message from collist ***;
6, print cue 2;
7, pt_vce_ctrl 2;
8, 500 strt_spl 4 1;
9, ------------------------ 3;
On cue 1 collist
will print “** this is a message from collist **” and “cue 1” in the Max window and 2200 ms later it will send the list 4 1 to the receive
object named strt_spl
.
The object takes one argument - the name of the text file to be read. This is just an abstraction so doubleclicking on the object will open a patcher window where there is a readme subpatcher with documentation. One thing that is good to know is that although the lines in the collfile may be numbered consecutively, you can always insert new rows anywhere and send the renumber
message to the rightmost inlet of the collist
object. For example, if you want to insert a message between lines 3 and 4 in the example above just write:
0, ------------------------ 1;
1, 0 print *** this is a message from collist ***;
2, print cue 1;
3, 2200 strt_spl 4 1;
31, do_this 1;
4, ------------------------ 2;
...
and than send the renumber
message and the rows will be nicely renumbered consecutively
I also wrote a little Perl script that changes a original qlist file to the collsyntax. It needs some cleaning up, but feel free to send me an email if you want it and maybe I can get my act together and make nice and tidy. Download the object from here but remember, although it works for me, I can in no way garantee that it will work for you but feel free to use it and change it as you wish.