46 mpeLowerZoneLastMemberChannel = 0;
47 mpeUpperZoneLastMemberChannel = 15;
49 int32_t channelToZone(int32_t inputChannel);
50 void writeToFile(
Serializer& writer,
char const* tagName);
51 bool worthWritingToFile();
53 void moveUpperZoneOutOfWayOfLowerZone();
54 void moveLowerZoneOutOfWayOfUpperZone();
55 bool isMasterChannel(int32_t inputChannel);
56 inline bool isChannelPartOfAnMPEZone(int32_t channel) {
57 return (channel >= 1 && channel <= 14
58 && (mpeLowerZoneLastMemberChannel >= channel || mpeUpperZoneLastMemberChannel <= channel));
61 uint8_t mpeLowerZoneLastMemberChannel;
62 uint8_t mpeUpperZoneLastMemberChannel;
93enum class clock_setting { NONE, RECEIVE, SEND, BOTH };
99 virtual void writeToFlash(uint8_t* memory) = 0;
100 [[nodiscard]]
virtual char const* getDisplayName()
const = 0;
102 void dataEntryMessageReceived(
ModelStack* modelStack, int32_t channel, int32_t msb);
109 void writeReferenceToFile(
Serializer& writer,
char const* tagName =
"device");
110 void writeToFile(
Serializer& writer,
char const* tagName);
112 bool worthWritingToFile();
126 [[nodiscard]]
virtual Error
sendSysex(
const uint8_t* data, int32_t len) = 0;
138 inline void sendCC(int32_t channel, int32_t cc, int32_t value) {
sendMessage(MIDIMessage::cc(channel, cc, value)); }
139 void sendRPN(int32_t channel, int32_t rpnMSB, int32_t rpnLSB, int32_t valueMSB);
142 inline bool hasDefaultVelocityToLevelSet() {
return defaultVelocityToLevel; }
148 uint8_t mpeZoneBendRanges[2][2];
150 MIDIInputChannel inputChannels[16];
152 int32_t defaultVelocityToLevel;
156 uint8_t connectionFlags;
159 uint8_t incomingSysexBuffer[1024];
160 int32_t incomingSysexPos = 0;
165 virtual void writeReferenceAttributesToFile(Serializer& writer) = 0;
168 void writeDefinitionAttributesToFile(Serializer& writer);
virtual bool wantsToOutputMIDIOnChannel(MIDIMessage message, int32_t filter) const
Used to decide if the given message should be output on a channel.
Definition midi_device.cpp:135