# Voices

> Give a group voices and it plays chords. Each note gets its own copy of the group, with its own state.

Source: https://docs.tune.toys/concepts/voices/

A group with voices is polyphonic: build one voice from ordinary nodes, such as an oscillator, a filter and an envelope, and the group plays up to eight notes at once.

## What it does

Set Voices on a group instance (2 to 8). When the Toy is prepared, that instance becomes one copy of its definition per voice, a note allocator in front of them and a sum behind them. Each note goes to one copy, so its oscillator, filter and envelope run on their own, and the copies' audio outputs add up into the group's output. Values, public controls, Frame controls, presets, LFOs and MIDI mappings that reach inside the group move every copy together; meters and traces inside stay per voice.

The group's definition needs exactly one MIDI input, which the allocator shares out to the voices, and audio outputs only. Audio and control inputs reach every voice unchanged, so one LFO can sweep every voice's filter. A polyphonic definition cannot contain another polyphonic group.

Inside a voice, notes arrive one at a time on an ordinary MIDI cable. Wire it to a [Oscillator](https://docs.tune.toys/nodes/std.oscillator/)'s `midi` input for pitch and to [MIDI to control](https://docs.tune.toys/nodes/midi.to-control/) for the gate, velocity, bend, pressure and CC lanes, and cable the gate lane into an [Envelope](https://docs.tune.toys/nodes/std.envelope/)'s Gate.

### Notes, sustain and stealing

The allocator follows the [Polyphonic instrument](https://docs.tune.toys/nodes/std.poly/): a repeated key from the same source and channel restarts its own voice, a new key takes the voice released longest ago, and when every voice is held it takes the oldest note. A stolen or restarted voice receives a note-off and, one sample later, its new note-on. The sustain pedal keeps released notes held until it lifts, per source and channel. Each source (a Frame piano, the computer keyboard, each MIDI device) owns its notes, and a panic, transport stop or device disconnect releases them, so no voice is left hanging. Bend, pressure and other controller messages reach every voice.

### MPE

Set the group's MPE zone in the Toy source (`"mpe": { "zone": "lower" }` or `"upper"`, with an optional `bend` range, 48 semitones by default). In a zone, each note plays on its own member channel, and that channel's pressure, CC74 and other controllers reach only the voice holding its note, so the voice's MIDI to control lanes become per-note expression. Pitch bend is combined per voice: the allocator adds the master channel's bend (±2 semitones) to the member channel's (± the zone's bend) and sends one bend scaled to the zone's range, so set the voice oscillator's Bend range to the same number. MPE configuration messages and MIDI-CI are not handled; choose the zone to match the controller.

## Cost

Each voice is a whole copy, so a group's cost grows with its voices: the inspector shows the expanded operator count beside the Voices field. A Toy holds at most 256 operators; voices that would pass it are refused with the reason.

## Tips

- Start from the **Poly Voice** template in New Toy, or select a group and choose **Make polyphonic**.
- Keep the voice small. A two-node voice at eight voices costs less than one heavy effect chain.
- Put shared effects such as reverb after the group, not inside it, so they run once.
- For a fixed oscillator-and-envelope instrument with no wiring, [Polyphonic instrument](https://docs.tune.toys/nodes/std.poly/) is lighter.

## See also

[Groups](https://docs.tune.toys/concepts/groups/), [MIDI cables](https://docs.tune.toys/concepts/midi-cables/), [MIDI](https://docs.tune.toys/concepts/midi/).
