Skip to main content

midi_note

Function midi_note 

Source
pub fn midi_note(
    kind: MidiNoteKind,
    note: Option<u8>,
    channel: Option<u8>,
    target_node: NodeId,
    target_param: &str,
    min: f32,
    max: f32,
    transform: Transform,
) -> Mapping
Expand description

Convenience constructor for a MIDI note mapping.

Use MidiNoteKind to select which aspect of the note event to extract:

  • Frequencymidi_to_freq(note), Note Off produces no value
  • Amplitudevelocity / 127 (On) or 0.0 (Off)
  • Gate1.0 (On) or 0.0 (Off)