nslider Reference

Output numbers from a notation display



nslider or "Note Slider" is a musical-notation-based integer value slider.


A useful tool to monitor an incoming MIDI stream




bgcolor [4 floats]

Sets the background color for the object in RGBA format.

clefs [int] (default: 1)

Display Clefs

fgcolor [4 floats]

Sets the foreground color for the object in RGBA format.

mode [int] (default: 0)

Sets the nslider object's mode of operation.
Monophonic: (the default) Only one note can be selected and displayed at one time.
Polyphonic: The kslider object keeps track of note-ons and note-offs, so it mirrors which notes are currently held down on your MIDI keyboard. A key is “turned off” by sending the kslider object a key on message with a velocity of 0.

Possible values:

0 = 'Monophonic'
1 = 'Polyphonic'

parameter_enable [int]

Enables use of this object with Max for Live Parameters and allows for setting initial parameter values in the Max environment.

parameter_mappable [int] (default: 1)

When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature.

staffs [int] (default: 1)

Display Staffs

style [symbol] (default: )7.0.0

Sets the style to be applied to the object. Styles can be set using the Format palette.

Common Box Attributes

Parameter Attributes



In left inlet: Sends out the pitch and velocity values currently stored in nslider.



input [int]
The number received in the inlet is displayed graphically by nslider if it falls within its displayed range. The current velocity value (from 1 to 127) that nslider holds is sent out its right outlet, followed by the received number out the left outlet.



velocity [int]
In right inlet: The number received in the right inlet sets the output key velocity without triggering output.



input [float]
In left inlet: Converted to int.



velocity [float]
In right inlet: Converted to int.



value-pair [list]
A list of two numbers sent to the left inlet of nslider can be used to set and output the note and velocity values.



notenames [list]
Notes can also be added using the musical note name and octave, i.e., F#3. This is especially useful for forcing display of accidentals (# or b). For example, a value of 59 and the message Cb4 both produce the same note, but the number will display a B note while the message displays a C-flat.



value-pairs [list]
In left inlet: The word chord, followed by a list of MIDI note name and velocity pairs, can be used to play chords on the nslider in polyphonic mode (set by the mode 1 message). The chord message sends note-offs for currently held notes, followed by note-on commands for the specified note and velocity pairs. When the nslider object's state is saved by a preset object in polyphonic mode, the preset object will store chord messages.


In left inlet: The clear message will clear any notes on the staves, but will not trigger any output.


In left inlet: When the nslider object is in polyphonic mode (set by the mode 1 message), the flush message will send note-offs to currently held notes and clear the nslider object's display.


nslider also sends out numbers when you click or drag on it with the mouse. The velocity value is determined by the previous value received in the right inlet.
If the nslider object is in polyphonic mode, you need to click on a note twice: once to send a note-on and draws the note, and once again to send a note-off and erase the note.



value-pair [list]
In left inlet: The word set, followed by a number, changes the value displayed by nslider, without triggering output. If the set message is followed by two numbers, both the note and velocity values are set, without causing output.



nslider sends its current velocity value out its right outlet, followed by the (displayable) pitch value out its left outlet, when a number is received in its inlet or you click or drag on the object. In polyphonic mode, it will send a note value with a velocity of zero when a note is removed from the staves.

See Also

Name Description