13 KiB
group send_functions
These are the functions you use to send midi data through a device.
Summary
| Members | Descriptions |
|---|---|
public voidmidi_send_cc(MidiDevice* device,uint8_t chan,uint8_t num,uint8_t val) |
Send a control change message (cc) via the given device. |
public voidmidi_send_noteon(MidiDevice* device,uint8_t chan,uint8_t num,uint8_t vel) |
Send a note on message via the given device. |
public voidmidi_send_noteoff(MidiDevice* device,uint8_t chan,uint8_t num,uint8_t vel) |
Send a note off message via the given device. |
public voidmidi_send_aftertouch(MidiDevice* device,uint8_t chan,uint8_t note_num,uint8_t amt) |
Send an after touch message via the given device. |
public voidmidi_send_pitchbend(MidiDevice* device,uint8_t chan,int16_t amt) |
Send a pitch bend message via the given device. |
public voidmidi_send_programchange(MidiDevice* device,uint8_t chan,uint8_t num) |
Send a program change message via the given device. |
public voidmidi_send_channelpressure(MidiDevice* device,uint8_t chan,uint8_t amt) |
Send a channel pressure message via the given device. |
public voidmidi_send_clock(MidiDevice* device) |
Send a clock message via the given device. |
public voidmidi_send_tick(MidiDevice* device) |
Send a tick message via the given device. |
public voidmidi_send_start(MidiDevice* device) |
Send a start message via the given device. |
public voidmidi_send_continue(MidiDevice* device) |
Send a continue message via the given device. |
public voidmidi_send_stop(MidiDevice* device) |
Send a stop message via the given device. |
public voidmidi_send_activesense(MidiDevice* device) |
Send an active sense message via the given device. |
public voidmidi_send_reset(MidiDevice* device) |
Send a reset message via the given device. |
public voidmidi_send_tcquarterframe(MidiDevice* device,uint8_t time) |
Send a tc quarter frame message via the given device. |
public voidmidi_send_songposition(MidiDevice* device,uint16_t pos) |
Send a song position message via the given device. |
public voidmidi_send_songselect(MidiDevice* device,uint8_t song) |
Send a song select message via the given device. |
public voidmidi_send_tunerequest(MidiDevice* device) |
Send a tune request message via the given device. |
public voidmidi_send_byte(MidiDevice* device,uint8_t b) |
Send a byte via the given device. |
public voidmidi_send_data(MidiDevice* device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2) |
Send up to 3 bytes of data. |
public voidmidi_send_array(MidiDevice* device,uint16_t count,uint8_t * array) |
Send an array of formatted midi data. |
Members
public voidmidi_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 sendingchanthe channel to send on, 0-15numthe cc numvalthe value of that cc num
public voidmidi_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 sendingchanthe channel to send on, 0-15numthe note numbervelthe note velocity
public voidmidi_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 sendingchanthe channel to send on, 0-15numthe note numbervelthe note velocity
public voidmidi_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 sendingchanthe channel to send on, 0-15note_numthe note numberamtthe after touch amount
public voidmidi_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 sendingchanthe channel to send on, 0-15amtthe bend amount range: -8192..8191, 0 means no bend
public voidmidi_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 sendingchanthe channel to send on, 0-15numthe program to change to
public voidmidi_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 sendingchanthe channel to send on, 0-15amtthe amount of channel pressure
public voidmidi_send_clock(MidiDevice* device)
Send a clock message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_tick(MidiDevice* device)
Send a tick message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_start(MidiDevice* device)
Send a start message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_continue(MidiDevice* device)
Send a continue message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_stop(MidiDevice* device)
Send a stop message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_activesense(MidiDevice* device)
Send an active sense message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_reset(MidiDevice* device)
Send a reset message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_send_tcquarterframe(MidiDevice* device,uint8_t time)
Send a tc quarter frame message via the given device.
Parameters
devicethe device to use for sendingtimethe time of this quarter frame, range 0..16383
public voidmidi_send_songposition(MidiDevice* device,uint16_t pos)
Send a song position message via the given device.
Parameters
devicethe device to use for sendingposthe song position
public voidmidi_send_songselect(MidiDevice* device,uint8_t song)
Send a song select message via the given device.
Parameters
devicethe device to use for sendingsongthe song to select
public voidmidi_send_tunerequest(MidiDevice* device)
Send a tune request message via the given device.
Parameters
devicethe device to use for sending
public voidmidi_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 sendingbthe byte to send
public voidmidi_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 sendingcountthe count of bytes to send, %4 is appliedbyte0the first bytebyte1the second byte, ignored if cnt % 4 != 2byte2the third byte, ignored if cnt % 4 != 3
public voidmidi_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 sendingcountthe count of bytes to sendarraythe array of bytes