note_tx

Midi note transmitter, midi channel as live parameter
Author: Johannes Taelman, hacked by AL
License: BSD
Github: drj/midi/note_tx.axo

Inlets

frac32.positive velocity

bool32.rising trigger

frac32.bipolar note (-64..63)

Outlets

None

Parameters

int32 midi channel

Attributes

combo device

Declaration
int ntrig;
int lastnote;
Init
ntrig = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  lastnote = (64 + (inlet_note >> 21)) & 0x7F;
  MidiSend3((midi_device_t)attr_device, MIDI_NOTE_ON + (param_channel - 1),
            lastnote, inlet_velo >> 20);
  ntrig = 1;
}
if (!(inlet_trig > 0) && ntrig) {
  MidiSend3((midi_device_t)attr_device, MIDI_NOTE_OFF + (param_channel - 1),
            lastnote, __USAT(inlet_velo >> 20, 7));
  ntrig = 0;
}

Privacy

© 2024 Zrna Research