diff --git a/README.md b/README.md index d29e8a9..0b8314f 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,11 @@ the library. // and then just call Axe.update() in the main loop and you are ready to roll. AxeSystem(); + // By default AxeFxIII will be assumed. This constructor allows another product such as FM3 to be used + // For AxeFx3 pass 0x10 (default) + // For FM3 pass 0x11 + AxeSystem(byte sysexFractalVersion); + // You must call begin with a hardware serial such as Serial1. Optionally set the // MIDI channel, defaults to OMNI. // You cannot call this more than once. (Well you can, but it will be ignored.) diff --git a/src/interface/AxeSystem.h b/src/interface/AxeSystem.h index f2d89c0..0a62c39 100644 --- a/src/interface/AxeSystem.h +++ b/src/interface/AxeSystem.h @@ -33,7 +33,12 @@ enum class UpdateMode { class AxeSystem { public: - AxeSystem() { + + const static byte FRACTAL_PRODUCT_AXEFX3 = 0x10; + const static byte FRACTAL_PRODUCT_FM3 = 0x11; + + AxeSystem(byte sysexFractalVersion = FRACTAL_PRODUCT_AXEFX3) { + _sysexFractalVersion = sysexFractalVersion; _looper.setAxeSystem(this); } diff --git a/src/interface/private/AxeSystem_Midi.cpp b/src/interface/private/AxeSystem_Midi.cpp index 86512d8..6837191 100644 --- a/src/interface/private/AxeSystem_Midi.cpp +++ b/src/interface/private/AxeSystem_Midi.cpp @@ -145,7 +145,7 @@ void AxeSystem::sendCommand(const byte command, const byte *data, const byte par sysex[length++] = SYSEX_MANUFACTURER_BYTE1; sysex[length++] = SYSEX_MANUFACTURER_BYTE2; sysex[length++] = SYSEX_MANUFACTURER_BYTE3; - sysex[length++] = SYSEX_AXE_VERSION; + sysex[length++] = _sysexFractalVersion; sysex[length++] = command; //optional data diff --git a/src/interface/private/AxeSystem_Private.h b/src/interface/private/AxeSystem_Private.h index e17b931..f9442f9 100644 --- a/src/interface/private/AxeSystem_Private.h +++ b/src/interface/private/AxeSystem_Private.h @@ -15,7 +15,6 @@ const static byte SYSEX_EFFECT_ENABLE = 0x00; const static byte SYSEX_MANUFACTURER_BYTE1 = 0x00; const static byte SYSEX_MANUFACTURER_BYTE2 = 0x01; const static byte SYSEX_MANUFACTURER_BYTE3 = 0x74; -const static byte SYSEX_AXE_VERSION = 0x10; const static byte SYSEX_QUERY_BYTE = 0x7F; const static byte SYSEX_CHECKSUM_PLACEHOLDER = 0x00; @@ -90,6 +89,7 @@ AxeLooper _looper; Version _firmwareVersion; Version _usbVersion; HardwareSerial *_serial = nullptr; +byte _sysexFractalVersion; byte _tempo; byte _bank; byte _midiChannel;