Explorar el Código

Fix more USB MIDI ambiguous overload issues

main
PaulStoffregen hace 6 años
padre
commit
f2e702c163
Se han modificado 3 ficheros con 1 adiciones y 39 borrados
  1. +1
    -0
      keywords.txt
  2. +0
    -12
      teensy3/usb_midi.h
  3. +0
    -27
      usb_midi/usb_api.h

+ 1
- 0
keywords.txt Ver fichero

@@ -431,6 +431,7 @@ releaseReadOnly KEYWORD2
usbMIDI KEYWORD1
sendNoteOff KEYWORD2
sendNoteOn KEYWORD2
sendAfterTouchPoly KEYWORD2
sendPolyPressure KEYWORD2
sendControlChange KEYWORD2
sendProgramChange KEYWORD2

+ 0
- 12
teensy3/usb_midi.h Ver fichero

@@ -190,10 +190,6 @@ class usb_midi_class
void sendTimeCodeQuarterFrame(uint8_t type, uint8_t value, uint8_t cable=0) __attribute__((always_inline)) __attribute__((always_inline)) {
send(0xF1, ((type & 0x07) << 4) | (value & 0x0F), 0, 0, cable);
}
//void sendTimeCodeQuarterFrame(uint8_t data, uint8_t cable=0) __attribute__((always_inline)) {
// MIDI 4.3 has this, but we can't implement with cable param
//send(0xF1, data, 0, 0, cable);
//}
void sendSongPosition(uint16_t beats, uint8_t cable=0) __attribute__((always_inline)) {
send(0xF2, beats, beats >> 7, 0, cable);
}
@@ -211,10 +207,6 @@ class usb_midi_class
sendControlChange(6, value >> 7, channel, cable);
sendControlChange(38, value, channel, cable);
}
void sendRpnValue(uint8_t msb, uint8_t lsb, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(6, msb, channel, cable);
sendControlChange(38, lsb, channel, cable);
}
void sendRpnIncrement(uint8_t amount, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(96, amount, channel, cable);
}
@@ -233,10 +225,6 @@ class usb_midi_class
sendControlChange(6, value >> 7, channel, cable);
sendControlChange(38, value, channel, cable);
}
void sendNrpnValue(uint8_t msb, uint8_t lsb, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(6, msb, channel, cable);
sendControlChange(38, lsb, channel, cable);
}
void sendNrpnIncrement(uint8_t amount, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(96, amount, channel, cable);
}

+ 0
- 27
usb_midi/usb_api.h Ver fichero

@@ -7,25 +7,6 @@

#define USB_MIDI_SYSEX_MAX 60 // maximum sysex length we can receive

/*
These were originally meant to allow programs written for
Francois Best's MIDI library to be easily used with
Teensy's usbMIDI which implements the same API. However,
the MIDI library definitions have changed, so these names
now conflict. They've never been documented (the PJRC web
page documents usbMIDI.getType() in numbers) so they are
now commented out so usbMIDI and the MIDI library can be
used together without conflict.
#define NoteOff 0
#define NoteOn 1
#define AfterTouchPoly 2
#define ControlChange 3
#define ProgramChange 4
#define AfterTouchChannel 5
#define PitchBend 6
#define SystemExclusive 7
*/

class usb_midi_class
{
public:
@@ -120,10 +101,6 @@ public:
sendControlChange(6, value >> 7, channel, cable);
sendControlChange(38, value, channel, cable);
}
void sendRpnValue(uint8_t msb, uint8_t lsb, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(6, msb, channel, cable);
sendControlChange(38, lsb, channel, cable);
}
void sendRpnIncrement(uint8_t amount, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(96, amount, channel, cable);
}
@@ -142,10 +119,6 @@ public:
sendControlChange(6, value >> 7, channel, cable);
sendControlChange(38, value, channel, cable);
}
void sendNrpnValue(uint8_t msb, uint8_t lsb, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(6, msb, channel, cable);
sendControlChange(38, lsb, channel, cable);
}
void sendNrpnIncrement(uint8_t amount, uint8_t channel, uint8_t cable=0) __attribute__((always_inline)) {
sendControlChange(96, amount, channel, cable);
}

Cargando…
Cancelar
Guardar