mc.targetlist Reference

Format messages based on inlet number for controlling MC objects

mc.targetlist

Description

The mc.targetlist object simplifies creating the setvalue messages used to target specific instances within MC wrapper objects. The object maps the index of an inlet where a message was received to a voice index used in the resulting setvalue message.

Examples

Arguments

prepend [symbol]

Optional

A symbol argument, if present, sets a message to use in setvalue message output. For example, if the argument is tree, the resulting message output for voice index 1 and an int with a value of 10 would be setvalue 1 tree 10.

voice index [int]

Optional

You can specify one or more voice index values to be associated with each inlet. For example, if the arguments are 5 6 7 8, four inlets are created and the left inlet is associated with voice index 5, the next inlet with 6, and so on. If no numbers are supplied as arguments, two inlets are created. The left inlet is associated with voice index 1 and the right inlet with voice index 2.

inlet count [int]

Optional

To specify a number of inlets without having to type in a voice index for each one, precede an inlet count value with @chans. @chans and the inlet count must be the last typed-in arguments.

Attributes

listmode [int] (default: 0)

When enabled, the listmode attribute produces individual setvalue messages for each element in the list, as if you had sent each list element separately to successive inlets. For example, with listmode disabled, a list 5 6 7 8 received in the left inlet of an mc.targetlist object with four inlets would produce the message setvalue 1 5 6 7 8. With listmode enabled, the mc.targetlist object would produce four separate messages: setvalue 1 5, setvalue 2 6, setvalue 3 7, and setvalue 4 8.

Common Box Attributes

Messages

bang

In any inlet: The bang message is repeated to the left outlet, preceded by setvalue and the voice index associated with the inlet where the message was received.

int

In any inlet: An number is repeated to the left outlet, preceded by setvalue and the voice index associated with the inlet where the number was received.

float

In any inlet: An number is repeated to the left outlet, preceded by setvalue and the voice index associated with the inlet where the number was received.

list

In any inlet: A list is repeated to the left outlet, preceded by setvalue and the voice index associated with the inlet where the list was received.

anything

In any inlet: The message is repeated to the left outlet, preceded by setvalue and the voice index associated with the inlet where the message was received.

See Also

Name Description
MC MC
Event-handling with MC Event-handling with MC
New MC Event Objects New MC Event Objects
MC Wrapper Polyphony MC Wrapper Polyphony
mc.makelist
mc.target
mc.voiceallocator~
mc.noteallocator~