Control to notes

Turn control lanes (pitch, gate and velocity) into MIDI notes, the inverse of MIDI to control, so control sources and sensors can play instruments.

  • MIDI
  • Since 0.2.0
  • midi
  • control
  • notes
  • gate
  • pitch
  • sensors

Open in TuneToys

Control to notes as the Patch draws it, at default values: inlets on the left, outlets on the right.

Control to notes plays MIDI notes from control lanes: a pitch lane picks the note and a gate lane starts and stops it. It is the inverse of MIDI to control, so LFOs, curves, sensors and data can play any instrument.

What it does#

The input is a control bundle read in MIDI to control's order: lane 1 is pitch, lane 2 gate and lane 3 velocity. Pitch 0 plays Low note and 1 plays High note, rounded to the nearest note. A one-lane input is a gate that plays Low note; a two-lane input is pitch and gate, at velocity 0.8. When the gate rises to 0.5 or more, a note starts; when it falls below, the note ends. With Legato on, a change of pitch while the gate is high moves the note: the new note starts and then the old one ends, which a glide or mono voice plays as one phrase.

Control runs once per audio block, so notes start and end at the beginning of the block whose lanes changed, not on an exact sample: about 2.7 ms resolution at 128 frames and 48 kHz. Removing the input releases the sounding note.

When to use it#

Use it to play an instrument from something that is not MIDI: a sensor, a drawn Curve, a Control LFO or data. Build the bundle with Combine lanes. For notes locked exactly to the beat, use a sequencer such as Step sequencer.

Ports#

PortDirectionSignalLanes
controlInputControlInferred from the cable
midiOutputMIDI16 MIDI channels

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
low_noteLow note0 to 12736linearNote played when the pitch lane is 0.
high_noteHigh note0 to 12796linearNote played when the pitch lane is 1.
channelChannel1 to 161linearMIDI channel of the notes.
legatoLegato0 to 10linearOn moves a held note when the pitch lane changes; Off keeps it until the gate falls. Choices: 0 Off, 1 On.

Low note (low_note)#

The note played when the pitch lane is 0, 0 to 127.

High note (high_note)#

The note played when the pitch lane is 1, 0 to 127. Below Low note turns the pitch lane upside down.

Channel (channel)#

The MIDI channel the notes are sent on, 1 to 16.

Legato (legato)#

Off keeps a note at its starting pitch until the gate falls. On moves it whenever the pitch lane names another note while the gate is high.

Tips#

  • Set Low note and High note to the same values as a MIDI to control node to get the notes it read back exactly.
  • A stepped pitch source, such as a Random step LFO or a curve with flat segments, plays clean notes; a smooth one with Legato on slides through every note it passes.
  • The instrument plays each note as a degree of the Toy's tuning.

See also#

MIDI to control, Combine lanes, Control LFO, Polyphonic instrument, Control lanes.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Play notes from an LFO

beginner Teaches: low_note, high_note

A slow saw LFO sets the pitch and a square LFO the gate: Control to notes turns the two lanes into notes for a voice.

Patch: Control LFO “pitch” control output connected to Combine lanes a input. Control LFO “gate” control output connected to Combine lanes b input. Combine lanes control output connected to Control to notes control input. Control to notes midi output connected to Polyphonic instrument midi input. Polyphonic instrument audio output connected to Patch outputs audio input.
Connections as text
  • Control LFO “pitch” control output connected to Combine lanes a input
  • Control LFO “gate” control output connected to Combine lanes b input
  • Combine lanes control output connected to Control to notes control input
  • Control to notes midi output connected to Polyphonic instrument midi input
  • Polyphonic instrument audio output connected to Patch outputs audio input
  • Combine makes a two-lane bundle: lane 1 pitch, lane 2 gate.
  • Each rising gate starts a note at the pitch lane, mapped from Low note to High note; each falling gate ends it.
Frame preview: Play notes from an LFOFrame “Play notes from an LFO” with 3 elements: text heading, knob High note, knob Low note.PLAY NOTES FROM AN LFO72High note48Low note
Frame preview (static). Controls show their default values.

Open in TuneToys

2. Legato from MIDI lanes

intermediate Teaches: legato, channel

MIDI to control and back: the keys become pitch, gate and velocity lanes, and Control to notes plays them again, legato if you like.

Patch: Keyboard midi output connected to MIDI to control midi input. MIDI to control control output connected to Control to notes control input. Control to notes midi output connected to Polyphonic instrument midi input. Polyphonic instrument audio output connected to Patch outputs audio input.
Connections as text
  • Keyboard midi output connected to MIDI to control midi input
  • MIDI to control control output connected to Control to notes control input
  • Control to notes midi output connected to Polyphonic instrument midi input
  • Polyphonic instrument audio output connected to Patch outputs audio input
  • MIDI to control keeps the last held note; its first three lanes are what Control to notes reads.
  • With Legato on, pressing a new key while holding one moves the note instead of restarting it.
Frame preview: Legato from MIDI lanesFrame “Legato from MIDI lanes” with 4 elements: knob Channel, text heading, segmented Legato, piano Keys.1ChannelLEGATO FROM MIDI LANESOffOnLegato
Frame preview (static). Controls show their default values.

Open in TuneToys

  • MIDI to control Turn MIDI into six control lanes: pitch, gate, velocity, bend, pressure and one CC, with last-note priority.
  • Combine lanes Concatenate two control bundles, preserving every lane without mixing.
  • Control LFO A free-running or tempo-synced low-frequency oscillator on a control lane, 0 to 1, with depth, offset, phase, skew, random shapes and a reset input.
  • Polyphonic instrument Eight owned, velocity-sensitive oscillator voices with ADSR, sustain and MPE, played from a MIDI cable in the Toy's tuning.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close