The subdiv~ object evenly subdivides an input phasor signal into any integer number of output phasor signals.
A typed-in argument sets the initial number of subdivisions of the input.
Sets the number of subdivisions (from 1 to 16384)
When lockprob is enabled, the cyclic probability pattern is locked to the cyclic duration pattern, so a probability decision is made per duration event. When lockprob is disabled, the probabilities follow the subdivided phasor output. Stated another way, when lockprob is disabled, the probabilities maintain their position within a cyclic duration pattern.
Establishes a cyclic duration pattern that can modify the duration the phasor output of each step. Patterns consist of integers 1 and above, permitting you to break up the input into unequal durations. For example, if you are subdividing the input by 3, setting the pattern to , which will output a phasor that takes 1/3 of the input time followed by a second phasor of 2/3 of the input time.
Note that subdiv~ does not support duration patterns that do not line up with the current input subdivision. As an example, a pattern of will not produce expected results because the middle element crosses the point where the input resets. You can often avoid this limitation by increasing the subdvision and reducing the rate of the input phasor. In general, patterns can span multiples of the current subdivision and will work properly as long as they always reset when the input resets. For example, with a subdivision of 3, you will see expected results with a pattern of because the output ramps will always reset when the input resets.
If the pattern does not end at input reset boundary, it is padded with a last element. For example, if the subdivision is 5, setting the pattern to will result in a third step of before the pattern resets.
With the prob you can set a pattern of probabilities for each output ramp. Patterns consist of 0, 1, or a float between 0 and 1. When the pattern value is 0, the output of subdiv~ will be a constant 0 for that step. When the pattern value is 1, the output of subdiv~ is the normal phasor ramp. When the value is between 0 and 1, it is taken as a probability of the phasor occurring for that step. The pattern does not have to have the same length as the number of subdivisions. Example: a pattern of 0 1 0.5 will, over a cycle of three steps, never output the first time, always output the second time, and output the third step half the time. To clear the pattern (and always output every step), send the message the argument or no arguments.
When both prob probability pattern and a pattern duration multiplier pattern are in use, the prob pattern is consulted whenver a new step in the duration pattern is started.
Determines index output for when phasor output is skipped
0 = 'Hold Previous Step' ( Don't change step number )
When silentmode is set to Hold Previous Step (0), the index output of subdiv~ does not change from the previous step if the phasor output is zero.
1 = 'Output -1' ( Output -1 )
When silentmode is set to Output -1 (1), the index output of subdiv~ is -1 if the phasor output is zero.
If syncupdate is enabled, changes to the subdivision value will only take effect when either the input or output resets, according to the value of the enum.
0 = 'Off' ( No Update Synchronization )
Changes to the subdivision value take effect immediately.
1 = 'Output Reset' ( Update on Output Reset )
Changes to the subdivision value take effect when the output phasor resets.
2 = 'Input Reset' ( Update on Input Reset )
Changes to the subdivision value take effect when the input phasor resets.
Common Box Attributes
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.
Sets the type style used by the object. The options are:
bold italic Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
Sets the object's font.
Sets the object's font size (in points).
hidden [int] (default: 0)
Toggles whether an object is hidden when the patcher is locked.
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.
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.
Sets the justification for the object's text.
0 = 'left'
1 = 'center'
2 = 'right'
|phasor~||Generate sawtooth signals|
|kink~||Distort a sawtooth waveform|
|line~||Linear signal ramp generator|
|mc.snowphasor~||Control a Population of Phasors|
|pong~||Variable range signal folding|
|rate~||Time-scale the output of a phasor~|
|swing~||Subdivide a phasor into two unequal phasors|