# Harmonizer

> Adds up to three pitch-shifted voices to the input, each with its own interval, level and pan.

Source: https://docs.tune.toys/nodes/std.harmonizer/

Harmonizer turns one note into a chord: it adds up to three copies of the input, each shifted by its own interval.

## What it does

Each voice is a [Pitch shifter](https://docs.tune.toys/nodes/std.pitch/) on one shared delay line. Its Interval sets the shift in semitones, its Level its gain and its Pan its place in the stereo field. Dry sets the input level and Wet the level of all voices together. The input is delayed by the same amount as the voices, so everything lines up. A voice at Level 0 is switched off and costs nothing.

Pan works on a two-lane (stereo) cable with the equal-power law of the [Bus](https://docs.tune.toys/nodes/std.mixer/): −1 is left, 1 is right, and the centre sends each lane the level times about 0.71. On a mono or wider cable, Pan has no effect and every lane gets the voice at its Level.

The node delays everything by half its largest Window (20 ms at the default 40 ms), and the Patch aligns parallel paths around it.

## When to use it

Use it for instant thirds and fifths on a lead line, an octave below a melody, or stacked, panned backing voices. The intervals are fixed, so they suit a melody that stays in one key or chord; set them to a scale's intervals or change them with the music. For a single shifted copy with feedback, use the [Pitch shifter](https://docs.tune.toys/nodes/std.pitch/).

## Ports

<!-- ports:start -->

| Port    | Direction | Signal | Lanes                   |
| ------- | --------- | ------ | ----------------------- |
| `audio` | Input     | Audio  | Inferred from the cable |
| `audio` | Output    | Audio  | Inferred from the cable |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

| Parameter   | Label      | Range     | Default | Unit | Scale  | Notes                                                                                                                                                             |
| ----------- | ---------- | --------- | ------- | ---- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `interval1` | Interval 1 | -24 to 24 | 4       | st   | linear | Pitch of voice 1 relative to the input, in semitones.                                                                                                             |
| `level1`    | Level 1    | 0 to 1    | 0.7     |      | linear | Gain of voice 1; 0 switches the voice off.                                                                                                                        |
| `pan1`      | Pan 1      | -1 to 1   | -0.5    |      | linear | Stereo position of voice 1 on a two-lane bundle: −1 left, 0 centre, 1 right, equal power. Ignored on other widths.                                                |
| `interval2` | Interval 2 | -24 to 24 | 7       | st   | linear | Pitch of voice 2 relative to the input, in semitones.                                                                                                             |
| `level2`    | Level 2    | 0 to 1    | 0.7     |      | linear | Gain of voice 2; 0 switches the voice off.                                                                                                                        |
| `pan2`      | Pan 2      | -1 to 1   | 0.5     |      | linear | Stereo position of voice 2 on a two-lane bundle: −1 left, 0 centre, 1 right, equal power. Ignored on other widths.                                                |
| `interval3` | Interval 3 | -24 to 24 | 12      | st   | linear | Pitch of voice 3 relative to the input, in semitones.                                                                                                             |
| `level3`    | Level 3    | 0 to 1    | 0       |      | linear | Gain of voice 3; 0 switches the voice off.                                                                                                                        |
| `pan3`      | Pan 3      | -1 to 1   | 0       |      | linear | Stereo position of voice 3 on a two-lane bundle: −1 left, 0 centre, 1 right, equal power. Ignored on other widths.                                                |
| `dry`       | Dry        | 0 to 1    | 1       |      | linear | Level of the input, delayed by the same latency as the voices.                                                                                                    |
| `wet`       | Wet        | 0 to 1    | 0.7     |      | linear | Level of the summed voices.                                                                                                                                       |
| `window_ms` | Window     | 10 to 100 | 40      | ms   | linear | Splice window. Longer windows smear transients less often and splice low notes cleanly; shorter ones respond faster. Latency is half the largest admitted window. |

<!-- parameters:end -->

### Interval 1, 2 and 3 (`interval1`, `interval2`, `interval3`)

Each voice's shift from −24 to 24 semitones: 3 is a minor third, 4 a major third, 7 a fifth, 12 an octave. Fractional values detune.

### Level 1, 2 and 3 (`level1`, `level2`, `level3`)

Each voice's gain from 0 to 1. At 0 the voice is off.

### Pan 1, 2 and 3 (`pan1`, `pan2`, `pan3`)

Each voice's place on a stereo cable, from −1 (left) to 1 (right), equal power. Ignored on other widths.

### Dry (`dry`)

The level of the input, delayed to line up with the voices.

### Wet (`wet`)

The level of all voices together.

### Window (`window_ms`)

How much audio each splice spans, 10 to 100 ms, for every voice. Longer windows suit low notes and big intervals; shorter ones keep fast notes tight. The node's latency is half the largest value the Window can reach.

## Tips

- Intervals 4 and 7 make a major triad, 3 and 7 a minor one.
- Pan the third and fifth apart and keep an octave below in the centre for width without losing the root.
- A voice at interval 0 with Level 0.5 and a small fractional detune, such as 0.08, thickens like a double.

## See also

[Pitch shifter](https://docs.tune.toys/nodes/std.pitch/), [Pitch correction](https://docs.tune.toys/nodes/std.autotune/), [Chorus](https://docs.tune.toys/nodes/std.chorus/), [Bus](https://docs.tune.toys/nodes/std.mixer/), [Multichannel audio](https://docs.tune.toys/concepts/multichannel/).
