A newer version of Max is available. Click here to access the latest version of the Max documentation

mc.range~ Reference

Generate a multichannel signal with a range of constant values

mc.range~

Description

The mc.range~ object generates a multichannel signal filled with constant values distributed across a defined range.

Examples

Arguments

size [int]

The argument defines a maximum number of channels in the multichannel output signal.

Attributes

chans [int]

The chans attribute sets the channel count of the output multichannel signal, determining the number of channels that will be used to define the range. If chans is modified while the audio is on, extra channels are set to zero. After audio is restarted, the output channel count will be set to the value of chans.

hi [float]

Sets the high value used when calculating channel output values. Actual values relative to the lo and hi attributes are determined based on the inclusive attribute setting.

inclusive [int]

Determines how endpoint values are used when calculating values for each output channel. Possible values:

0 = 'Neither' ( Ignore Endpoints )
Uses neither the low or high endpoint values when calculating mc channel values. For example, 5 channels with a lo of 0.0 and a lo of 1.0 will generate signal values of 0.17, 0.33, 0.5, 0.67, and 0.83.

1 = 'Both' ( Use Endpoints )
Uses the low enpoint value for the first channel and high endpoint value as the last channel when calculating mc channel values. For example, 5 channels with a lo of 0.0 and a lo of 1.0 will generate signal values of 0.0, 0.25, 0.5, 0.75, and 1.0.

2 = 'Low Only' ( Use Low )
Uses the low endpoint value for the first channel and calculates all other channel values accordingly. For example, 5 channels with a lo of 0.0 and a lo of 1.0 will generate signal values of 0.0, 0.2, 0.4, 0.6, and 0.8.

3 = 'High Only' ( Use High )
Uses the high endpoint value for the last channel and calculates all other channel values accordingly. For example, 5 channels with a lo of 0.0 and a lo of 1.0 will generate signal values of 0.2, 0.4, 0.6, 0.8, and 1.0.

lo [float]

Sets the low value used when calculating channel output values. Actual values relative to the lo and hi attributes are determined based on the inclusive attribute setting.

reflection [float] (default: 1.)

The reflection attribute sets a relative location within the range where the output reaches its high value and then returns to the low value. By default, the value of reflection is 1 which has no effect on the output range. If reflection is set to a value between 0 and 1, the output reaches the high value somewhere in the middle of the output channel space, returning to the low value for the last channel in the output multichannel signal. As reflection moves toward zero, the output begins to resemble an inverted range and when reflection is set to 0, the output is completely inverted.

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. background 1 adds the object to the background layer, background 0 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]

g/s(set)

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]

g/s(set)

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]

g/s(set)

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

signal

If a multichannel signal is connected to the left inlet, the values of the first two channels determine the output range, overriding the values of the lo and hi attributes.

See Also

Name Description
mc.list~ Create a multichannel signal from a list of values
mc.evolve~ Generate a periodic multichannel function from breakpoint ranges
mc.gradient~ Generate a time-varying function over the space of a multichannel signal
multirange Graphical function breakpoint editor
MC and Complexity MC and Complexity
MC Function Generators MC Function Generators