note send

sends a note with velocities defined by 'velon' and 'veloff',starting frim 'startnote'.
Author: robert schirmer
License: who cares
Github: rbrt/midi/out/note send.axo

Inlets

bool32.risingfalling g0

frac32.positive velon

frac32.positive veloff

int32 startnote

Outlets

None

Parameters

int32 startnote

Attributes

spinner channel

spinner velon

spinner veloff

combo device

Declaration
uint8_t prev0;
uint8_t prev1;
uint8_t prev2;
uint8_t prev3;

uint8_t vel;
uint8_t velon;
uint8_t veloff;

uint8_t startnote;
Control Rate
velon = attr_velon + (inlet_velon >> 20);
veloff = attr_veloff + (inlet_veloff >> 20);
startnote = param_startnote + inlet_startnote;

if (inlet_g0 != prev0) {
  vel = inlet_g0 ? velon : veloff;
  MidiSend3((midi_device_t)attr_device, MIDI_NOTE_ON + (attr_channel - 1),
            startnote, vel);
  prev0 = inlet_g0;
}

Privacy

© 2024 Zrna Research