qlist
Store a collection of messages
Description
Stores a collection of timed or untimed "cues" in the form of messages which can be sent either out its outlet or remotely to various receive objects in your patch.
Discussion
If you double-click on the object it opens up a text editor where you can enter or edit the qlist object's cue-list. Each line of the cue-list is a message ending in a semicolon. Lines do not need to be numbered or indexed (as with the coll object), but there are a few idiosyncrasies which need to be discussed here.
There are three different message formats for lines in a cue-list: lines which contain only numerical values (i.e an , or ), lines which begin with a (i.e. message name and arguments), and lines beginning with a numerical value (or of numerical values) and subsequently having a (message name) with arguments. These three types of lines are treated differently by qlist. Lines containing only numerical values are sent out the qlist object's left outlet, and lines beginning with a symbol are sent remotely to a receive object named with that symbol. (Note that this is similar to remotely sending messages from a message box - contents before the first semicolon are sent out the outlet, and messages after each semicolon are sent remotely to named receive objects.) Lines which begin with a numerical value (or values) but have a message and arguments after the number(s), are treated as two separate lines - the first part (all numerical) is sent out the left outlet, and the second (message) part is remotely sent to a receive object.
When qlist receives a command (such as the message) to output data, it will send all lines beginning with symbols to the corresponding receive objects, and stop after it has output the numerical contents of a line beginning with a number. The qlist object also has an internal timer which it uses for automatic sequencing. Sending a message to a qlist will cause it to play the entire contents of the cue-list. When a line begins with a number, qlist will use that number as a delay time in milliseconds before it continues outputting or sending the remaining cues.
The qlist objects saves its cue-list with the patcher.
Arguments
None.
Attributes
Common Box Attributes
annotation[symbol]
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background[int]: 0
Adds or removes the object from the patcher's background layer.
adds the object to the background layer, removes it. Objects in the background layer are shown behind all objects in the default foreground layer.
color[4 floats]
Sets the color for the object box outline.
fontface[int]
Sets the type style used by the object. The options are:
plain
bold
italic
bold italic
Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
fontname[symbol]
Sets the object's font.
fontsize[float]
Sets the object's font size (in points).
Possible values:
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'
hint[symbol]
Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.
ignoreclick[int]: 0
Toggles whether an object ignores mouse clicks in a locked patcher.
jspainterfile[symbol]
JS Painter File
patching_rect[4 floats]: 0. 0. 100. 0.
Sets the position and size of the object in the patcher window.
position[2 floats]
write-only
Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.
presentation[int]: 0
Sets whether an object belongs to the patcher's presentation.
presentation_rect[4 floats]: 0. 0. 0. 0.
Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.
rect[4 floats]
write-only
Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).
size[2 floats]
write-only
Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.
textcolor[4 floats]
Sets the color for the object's text in RGBA format.
textjustification[int]
Sets the justification for the object's text.
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
varname[symbol]
Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.
Messages
bang
Sending a qlist will use that number as a delay time in milliseconds before continuing to send the remaining messages. A qlist that is playing automatically can be stopped using the message.
to qlist triggers automatic-playback of the entire cue list. It begins sending messages from the first line, until a line begins with a number, at which point
append
The word qlist object's cue-list. To append a semicolon, it must be preceded by a backslash character.
followed by any arguments will append those arguments to the last entry in the- message
[list]
clear
The word
will clear the contents of the cue-list. This is the same as sending a message with no arguments.
(mouse)
Double-clicking with the mouse on the qlist object displays its contents as text in an editing window which the user can modify.
fwd
The word
, followed by a number, is used to "fast forward" through a given number of lines, without remotely sending messages to named receive objects. For example, will output the next two lines in the cue-list which bengin with numerical values. Lines beginning with symbols will be ignored.- lines
[int]
insert
The word qlist object's cue-list as a new entry in the list. To append a semicolon, it must be preceded by a backslash character.
followed by any arguments will append those arguments to the- message
[list]
next
The word
is used to output the next line in the cue-list. It will remotely send all lines beginning with a symbol, and stop after it encounters and outputs a line beginning with a numerical value. If the word is followed by a non-zero argument, it will ignore lines beginning with symbols and only output the next line beginning with a numerical value.- ignore-symbols
[int]
open
The word qlist object's text editing window to be opened.
will cause the
read
The word
will allow you to read a file from disk via a standard Max file opening dialog. If followed by a symbol argument, Max will use the symbol as a filename (or filepath and filename) and try to read a text file with the given name from the disk.- filename
[symbol]
rewind
Move to the beginning of the file
set
The word qlist object. It completely clears any previous cue-list contents. Sending a message with no arguments is the same as sending a message.
can be used to set the contents of a- cue-list-contents
[list]
stop
The word qlist which is in the middle of playback as a result of a message.
can be used to stop a
tempo
The word qlist to automatically play itself at a faster or slower speed than indicated by the millisecond values stored internally in the cue list. By default the tempo is 1.0, which means the playback tempo is not scaled. A tempo of 0.5 plays back the cue list at half speed, whereas a tempo of 2. plays it back twice as fast.
, followed by a floating-point numerical value, can be used to allow a- tempo-multiplier
[float]
wclose
The word qlist object's text editing window to be closed.
will cause the
write
The word
will allow you to save a file via a standard Max file saving dialog. If followed by a symbol argument, Max will use the symbol as a filename (or filepath and filename) and write a text file with the given name to disk.- filename
[symbol]
Output
bang
Out middle outlet. A
is sent when a cue list has reached the end, and there are no more lines to send or output.bang
Out right outlet. A
is sent when a file has been read successfully from disk.int
Out left outlet. The qlist object outputs a numerical value or list of numerical values when a line in the cue list begins with a number. Output is usually in response to a or message, but can also be a result of the object's internal timer, when the entire list of cues is being played as the result of a message.
list
Out left outlet. The qlist object outputs a numerical value or list of numerical values when a line in the cue list begins with a number. Output is usually in response to a or message, but can also be a result of the object's internal timer, when the entire list of cues is being played as the result of a message.
See Also
Name | Description |
---|---|
External Text Editor | External Text Editor |
coll | Store and edit a collection of data |
text | Format messages as a text file |