# Transpose

> Shift note numbers by semitones and octaves, clamped to the MIDI range.

Source: https://docs.tune.toys/nodes/midi.transpose/

Transpose shifts note numbers by semitones and octaves, clamped to the MIDI range.

## What it does

Every note is moved by Semitones plus twelve times Octaves. Results are clamped to the MIDI range of 0 to 127 instead of wrapping. Notes are shifted on both note-on and note-off so they release correctly. Other messages are unchanged.

## When to use it

Use it to move a keyboard into a comfortable range, to transpose a live controller without changing its settings, or to stack with a second copy for fifths and octaves.

## Ports

<!-- ports:start -->

| Port   | Direction | Signal | Lanes            |
| ------ | --------- | ------ | ---------------- |
| `midi` | Input     | MIDI   | 16 MIDI channels |
| `midi` | Output    | MIDI   | 16 MIDI channels |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

| Parameter   | Label     | Range     | Default | Unit | Scale  | Notes                                 |
| ----------- | --------- | --------- | ------- | ---- | ------ | ------------------------------------- |
| `semitones` | Semitones | -48 to 48 | 0       | st   | linear | Semitone shift applied to every note. |
| `octaves`   | Octaves   | -4 to 4   | 0       | oct  | linear | Octave shift added to the semitones.  |

<!-- parameters:end -->

### Semitones (`semitones`)

The shift in semitones, -48 to 48.

### Octaves (`octaves`)

An extra shift in octaves, -4 to 4, added to the semitones.

## Tips

- Twelve semitones equals one octave; use whichever is clearer.
- Heavy downward shifts can push notes past the bottom of the range, where they clamp at 0.

## See also

[Velocity](https://docs.tune.toys/nodes/midi.velocity/), [MIDI channel](https://docs.tune.toys/nodes/midi.channel/), [Polyphonic instrument](https://docs.tune.toys/nodes/std.poly/), [MIDI](https://docs.tune.toys/concepts/midi/).
