mc.pattern~
Description
The mc.pattern~ object holds patterns -- sequences of signal values. Like seq~, playback is driven by a phasor, but unlike seq~, the output consists of signals on one or more audio channels. In addition to event recording, mc.pattern~ has an interface for generating events from Max messages or via algorithms.
Arguments
channels [int]
If present, a typed-in argument sets the number of channels of patterns the object contains. This can also be set via the chans attribute.
Attributes
autorecord [int] (default: 0)
Set autorecord to 1, and mc.pattern~ begins recording incoming numbers received in its inlet to successive channels starting with channel 1. Once each channel has reached the end (because the incoming phasor signal resets to 0), recording switches to the next channel. When recording has occurred once on all channels, autorecord switches itself off. To turn off autorecord before the automatic shutoff occurs, send the message . Autorecord is the only way and values can be recorded. Channel-specific recording (via the message) requires a consisting of a channel and value. Note that the times given to recorded values are relative to the current phasor input value, not the time you started recording.
chans [int]
Sets the number of channels storing patterns as well as number of signals in the multi-channel signal. If the chans attribute is set while the audio is on, the change does not take effect until the audio is restarted.
defaultmute [int] (default: 0)
Sets a default mute setting for all channels as a typed-in argument. After the object has been created, changing defaultmute has no effect. The default value of defaultmute is muting off.
defaultquantize [float] (default: 0.)
Sets a default record quantization setting for all channels as a typed-in argument. After the object has been created, changing defaultquantize has no effect. The default value of defaultquantize is 0.
defaultramp [int] (default: 0)
Sets a default ramp setting for all channels as a typed-in argument. After the object has been created, changing defaultramp has no effect. The default value of default is ramping off.
defaultwrap [int] (default: 0)
Sets a default wrap setting for all channels as a typed-in argument. After the object has been created, changing defaultwrap has no effect. The default value of defaultwrap is wrapping off.
embed [int] (default: 0)
When embed is enabled, the current state of the object is saved with the patcher.
immediate [int] (default: 1)
When immediate is enabled, any values recorded or added to the pattern are played if their time is after the current position of the input signal. When immediate is disabled, newly recorded or added values do not play until the input signal resets.
in [float] (default: 1.)
The in attribute defines the range of the input signal that causes output from mc.pattern~. Normally in is 1, which permits mc.pattern~ to be driven by a phasor~ object. If you set in to 10, then you would need to supply a ramp that ranges from 0 to 10 in order to play the entire pattern. The value of in does not affect the stored phases for pattern values. You can redefine the range of stored phases using the ref attribute.
individual [int] (default: 0)
When the individual attribute is enabled, each channel is driven by a phasor on a corresponding input channel of a multi-channel signal. If there are fewer input channels than output channels, the extra outputs are muted. When individual is disabled, a single phasor drives all channels. Note that individual mode affects recording, so the recorded position of a value sent at the same time to two different channels could be different if those channels' input phasors are not synchronized.
ref [float] (default: 1.)
The ref attribute sets the maximum value of the phase of an event in a pattern. Normally ref is 1, which means phase values for events will range from 0 to 1. If ref were set to 10, phase values for events could range from 0 to 10. When changing ref any values stored in mc.pattern~ will be rescaled to have the same relative position as they did before.
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] (default: 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'
hidden [int] (default: 0)
Toggles whether an object is hidden when the patcher is locked.
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] (default: 0)
Toggles whether an object ignores mouse clicks in a locked patcher.
jspainterfile [symbol]
JS Painter File
patching_rect [4 floats] (default: 0. 0. 100. 0.)
Sets the position and size of the object in the patcher window.
position [2 floats]
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] (default: 0)
Sets whether an object belongs to the patcher's presentation.
presentation_rect [4 floats] (default: 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]
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]
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
int
float
list
add
addrange
addrangeinclusive
clear
delete
deleterange
dictionary
dump
filldeviate
fillrange
When has three arguments, the first argument is a time and the second and third arguments specify a range. Starting at the value specified by the second argument, adds a value to all channels incrementing or decrementing until the last channel has a value equal to the third argument. If has four arguments, the first two arguments are a range of times and the second two arguments are a range of values. Example: for a four-channel mc.pattern~ will genreate the following: Channel 1 -- 0.5 1, Channel 2 -- 0.375 2, Channel 3 -- 0.5 3, Channel 4 -- 0.625 4.
getcontent
mute
quantize
ramp
read
record
setvalue
signal
wrap
write
See Also
Name | Description |
---|---|
seq~ | Signal-driven event sequencer |
phasor~ | Generate sawtooth signals |
zigzag~ | Linked list function editor |