13 KiB
group send_functions
These are the functions you use to send midi data through a device.
Summary
| Members | Descriptions |
|---|---|
public void midi_send_cc(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t val) |
Send a control change message (cc) via the given device. |
public void midi_send_noteon(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t vel) |
Send a note on message via the given device. |
public void midi_send_noteoff(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t vel) |
Send a note off message via the given device. |
public void midi_send_aftertouch(MidiDevice * device,uint8_t chan,uint8_t note_num,uint8_t amt) |
Send an after touch message via the given device. |
public void midi_send_pitchbend(MidiDevice * device,uint8_t chan,int16_t amt) |
Send a pitch bend message via the given device. |
public void midi_send_programchange(MidiDevice * device,uint8_t chan,uint8_t num) |
Send a program change message via the given device. |
public void midi_send_channelpressure(MidiDevice * device,uint8_t chan,uint8_t amt) |
Send a channel pressure message via the given device. |
public void midi_send_clock(MidiDevice * device) |
Send a clock message via the given device. |
public void midi_send_tick(MidiDevice * device) |
Send a tick message via the given device. |
public void midi_send_start(MidiDevice * device) |
Send a start message via the given device. |
public void midi_send_continue(MidiDevice * device) |
Send a continue message via the given device. |
public void midi_send_stop(MidiDevice * device) |
Send a stop message via the given device. |
public void midi_send_activesense(MidiDevice * device) |
Send an active sense message via the given device. |
public void midi_send_reset(MidiDevice * device) |
Send a reset message via the given device. |
public void midi_send_tcquarterframe(MidiDevice * device,uint8_t time) |
Send a tc quarter frame message via the given device. |
public void midi_send_songposition(MidiDevice * device,uint16_t pos) |
Send a song position message via the given device. |
public void midi_send_songselect(MidiDevice * device,uint8_t song) |
Send a song select message via the given device. |
public void midi_send_tunerequest(MidiDevice * device) |
Send a tune request message via the given device. |
public void midi_send_byte(MidiDevice * device,uint8_t b) |
Send a byte via the given device. |
public void midi_send_data(MidiDevice * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2) |
Send up to 3 bytes of data. |
public void midi_send_array(MidiDevice * device,uint16_t count,uint8_t * array) |
Send an array of formatted midi data. |
Members
public void midi_send_cc(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t val)
Send a control change message (cc) via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
numthe cc num -
valthe value of that cc num
public void midi_send_noteon(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t vel)
Send a note on message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
numthe note number -
velthe note velocity
public void midi_send_noteoff(MidiDevice * device,uint8_t chan,uint8_t num,uint8_t vel)
Send a note off message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
numthe note number -
velthe note velocity
public void midi_send_aftertouch(MidiDevice * device,uint8_t chan,uint8_t note_num,uint8_t amt)
Send an after touch message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
note_numthe note number -
amtthe after touch amount
public void midi_send_pitchbend(MidiDevice * device,uint8_t chan,int16_t amt)
Send a pitch bend message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
amtthe bend amount range: -8192..8191, 0 means no bend
public void midi_send_programchange(MidiDevice * device,uint8_t chan,uint8_t num)
Send a program change message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
numthe program to change to
public void midi_send_channelpressure(MidiDevice * device,uint8_t chan,uint8_t amt)
Send a channel pressure message via the given device.
Parameters
-
devicethe device to use for sending -
chanthe channel to send on, 0-15 -
amtthe amount of channel pressure
public void midi_send_clock(MidiDevice * device)
Send a clock message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_tick(MidiDevice * device)
Send a tick message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_start(MidiDevice * device)
Send a start message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_continue(MidiDevice * device)
Send a continue message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_stop(MidiDevice * device)
Send a stop message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_activesense(MidiDevice * device)
Send an active sense message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_reset(MidiDevice * device)
Send a reset message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_tcquarterframe(MidiDevice * device,uint8_t time)
Send a tc quarter frame message via the given device.
Parameters
-
devicethe device to use for sending -
timethe time of this quarter frame, range 0..16383
public void midi_send_songposition(MidiDevice * device,uint16_t pos)
Send a song position message via the given device.
Parameters
-
devicethe device to use for sending -
posthe song position
public void midi_send_songselect(MidiDevice * device,uint8_t song)
Send a song select message via the given device.
Parameters
-
devicethe device to use for sending -
songthe song to select
public void midi_send_tunerequest(MidiDevice * device)
Send a tune request message via the given device.
Parameters
devicethe device to use for sending
public void midi_send_byte(MidiDevice * device,uint8_t b)
Send a byte via the given device.
This is a generic method for sending data via the given midi device. This would be useful for sending sysex data or messages that are not implemented in this API, if there are any. Please contact the author if you find some so we can add them.
Parameters
-
devicethe device to use for sending -
bthe byte to send
public void midi_send_data(MidiDevice * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)
Send up to 3 bytes of data.
% 4 is applied to count so that you can use this to pass sysex through
Parameters
-
devicethe device to use for sending -
countthe count of bytes to send, %4 is applied -
byte0the first byte -
byte1the second byte, ignored if cnt % 4 != 2 -
byte2the third byte, ignored if cnt % 4 != 3
public void midi_send_array(MidiDevice * device,uint16_t count,uint8_t * array)
Send an array of formatted midi data.
Can be used for sysex.
Parameters
-
devicethe device to use for sending -
countthe count of bytes to send -
arraythe array of bytes