diff --git a/a00002.html b/a00002.html index 568b143..8c51b4a 100644 --- a/a00002.html +++ b/a00002.html @@ -29,7 +29,7 @@
Arduino MIDI Library -  Version 4.3 +  Version 4.3.1
@@ -114,8 +114,7 @@ Functions

Detailed Description

MIDI Library for the Arduino.

-

Project Arduino MIDI Library

Version
4.3
-
Author
Francois Best
+

Project Arduino MIDI Library

Author
Francois Best
Date
24/02/11 MIT - Copyright (c) 2015 Francois Best

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

@@ -169,8 +168,8 @@ Functions
getSysExArrayLength Code inspired from Ruin & Wesen's SysEx encoder/decoder - http://ruinwesen.com
-

Definition at line 83 of file MIDI.cpp.

-
84 {
85  unsigned count = 0;
86  byte msbStorage = 0;
87  byte byteIndex = 0;
88 
89  for (unsigned i = 0; i < inLength; ++i)
90  {
91  if ((i % 8) == 0)
92  {
93  msbStorage = inSysEx[i];
94  byteIndex = 6;
95  }
96  else
97  {
98  const byte body = inSysEx[i];
99  const byte msb = ((msbStorage >> byteIndex--) & 1) << 7;
100  outData[count++] = msb | body;
101  }
102  }
103  return count;
104 }
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 82 of file MIDI.cpp.

+
83 {
84  unsigned count = 0;
85  byte msbStorage = 0;
86  byte byteIndex = 0;
87 
88  for (unsigned i = 0; i < inLength; ++i)
89  {
90  if ((i % 8) == 0)
91  {
92  msbStorage = inSysEx[i];
93  byteIndex = 6;
94  }
95  else
96  {
97  const byte body = inSysEx[i];
98  const byte msb = ((msbStorage >> byteIndex--) & 1) << 7;
99  outData[count++] = msb | body;
100  }
101  }
102  return count;
103 }
uint8_t byte
Definition: midi_Defs.h:36
@@ -218,8 +217,8 @@ getSysExArrayLength Code inspired from Ruin & Wesen's SysEx encoder/decoder
Returns
The lenght of the encoded output buffer.
See also
decodeSysEx Code inspired from Ruin & Wesen's SysEx encoder/decoder - http://ruinwesen.com
-

Definition at line 46 of file MIDI.cpp.

-
47 {
48  unsigned outLength = 0; // Num bytes in output array.
49  byte count = 0; // Num 7bytes in a block.
50  outSysEx[0] = 0;
51 
52  for (unsigned i = 0; i < inLength; ++i)
53  {
54  const byte data = inData[i];
55  const byte msb = data >> 7;
56  const byte body = data & 0x7f;
57 
58  outSysEx[0] |= (msb << (6 - count));
59  outSysEx[1 + count] = body;
60 
61  if (count++ == 6)
62  {
63  outSysEx += 8;
64  outLength += 8;
65  outSysEx[0] = 0;
66  count = 0;
67  }
68  }
69  return outLength + count + (count != 0 ? 1 : 0);
70 }
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 45 of file MIDI.cpp.

+
46 {
47  unsigned outLength = 0; // Num bytes in output array.
48  byte count = 0; // Num 7bytes in a block.
49  outSysEx[0] = 0;
50 
51  for (unsigned i = 0; i < inLength; ++i)
52  {
53  const byte data = inData[i];
54  const byte msb = data >> 7;
55  const byte body = data & 0x7f;
56 
57  outSysEx[0] |= (msb << (6 - count));
58  outSysEx[1 + count] = body;
59 
60  if (count++ == 6)
61  {
62  outSysEx += 8;
63  outLength += 8;
64  outSysEx[0] = 0;
65  count = 0;
66  }
67  }
68  return outLength + count + (count != 0 ? 1 : 0);
69 }
uint8_t byte
Definition: midi_Defs.h:36
@@ -229,7 +228,7 @@ getSysExArrayLength Code inspired from Ruin & Wesen's SysEx encoder/decoder
-Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "midi_Defs.h"
32 #include "midi_Settings.h"
33 #include "midi_Message.h"
34 
35 // -----------------------------------------------------------------------------
36 
38 
45 template<class SerialPort, class _Settings = DefaultSettings>
47 {
48 public:
49  typedef _Settings Settings;
50 
51 public:
52  inline MidiInterface(SerialPort& inSerial);
53  inline ~MidiInterface();
54 
55 public:
56  void begin(Channel inChannel = 1);
57 
58  // -------------------------------------------------------------------------
59  // MIDI Output
60 
61 public:
62  inline void sendNoteOn(DataByte inNoteNumber,
63  DataByte inVelocity,
64  Channel inChannel);
65 
66  inline void sendNoteOff(DataByte inNoteNumber,
67  DataByte inVelocity,
68  Channel inChannel);
69 
70  inline void sendProgramChange(DataByte inProgramNumber,
71  Channel inChannel);
72 
73  inline void sendControlChange(DataByte inControlNumber,
74  DataByte inControlValue,
75  Channel inChannel);
76 
77  inline void sendPitchBend(int inPitchValue, Channel inChannel);
78  inline void sendPitchBend(double inPitchValue, Channel inChannel);
79 
80  inline void sendPolyPressure(DataByte inNoteNumber,
81  DataByte inPressure,
82  Channel inChannel) __attribute__ ((deprecated));
83 
84  inline void sendAfterTouch(DataByte inPressure,
85  Channel inChannel);
86  inline void sendAfterTouch(DataByte inNoteNumber,
87  DataByte inPressure,
88  Channel inChannel);
89 
90  inline void sendSysEx(unsigned inLength,
91  const byte* inArray,
92  bool inArrayContainsBoundaries = false);
93 
94  inline void sendTimeCodeQuarterFrame(DataByte inTypeNibble,
95  DataByte inValuesNibble);
96  inline void sendTimeCodeQuarterFrame(DataByte inData);
97 
98  inline void sendSongPosition(unsigned inBeats);
99  inline void sendSongSelect(DataByte inSongNumber);
100  inline void sendTuneRequest();
101  inline void sendRealTime(MidiType inType);
102 
103  inline void beginRpn(unsigned inNumber,
104  Channel inChannel);
105  inline void sendRpnValue(unsigned inValue,
106  Channel inChannel);
107  inline void sendRpnValue(byte inMsb,
108  byte inLsb,
109  Channel inChannel);
110  inline void sendRpnIncrement(byte inAmount,
111  Channel inChannel);
112  inline void sendRpnDecrement(byte inAmount,
113  Channel inChannel);
114  inline void endRpn(Channel inChannel);
115 
116  inline void beginNrpn(unsigned inNumber,
117  Channel inChannel);
118  inline void sendNrpnValue(unsigned inValue,
119  Channel inChannel);
120  inline void sendNrpnValue(byte inMsb,
121  byte inLsb,
122  Channel inChannel);
123  inline void sendNrpnIncrement(byte inAmount,
124  Channel inChannel);
125  inline void sendNrpnDecrement(byte inAmount,
126  Channel inChannel);
127  inline void endNrpn(Channel inChannel);
128 
129 public:
130  void send(MidiType inType,
131  DataByte inData1,
132  DataByte inData2,
133  Channel inChannel);
134 
135  // -------------------------------------------------------------------------
136  // MIDI Input
137 
138 public:
139  inline bool read();
140  inline bool read(Channel inChannel);
141 
142 public:
143  inline MidiType getType() const;
144  inline Channel getChannel() const;
145  inline DataByte getData1() const;
146  inline DataByte getData2() const;
147  inline const byte* getSysExArray() const;
148  inline unsigned getSysExArrayLength() const;
149  inline bool check() const;
150 
151 public:
152  inline Channel getInputChannel() const;
153  inline void setInputChannel(Channel inChannel);
154 
155 public:
156  static inline MidiType getTypeFromStatusByte(byte inStatus);
157  static inline Channel getChannelFromStatusByte(byte inStatus);
158  static inline bool isChannelMessage(MidiType inType);
159 
160  // -------------------------------------------------------------------------
161  // Input Callbacks
162 
163 public:
164  inline void setHandleNoteOff(void (*fptr)(byte channel, byte note, byte velocity));
165  inline void setHandleNoteOn(void (*fptr)(byte channel, byte note, byte velocity));
166  inline void setHandleAfterTouchPoly(void (*fptr)(byte channel, byte note, byte pressure));
167  inline void setHandleControlChange(void (*fptr)(byte channel, byte number, byte value));
168  inline void setHandleProgramChange(void (*fptr)(byte channel, byte number));
169  inline void setHandleAfterTouchChannel(void (*fptr)(byte channel, byte pressure));
170  inline void setHandlePitchBend(void (*fptr)(byte channel, int bend));
171  inline void setHandleSystemExclusive(void (*fptr)(byte * array, unsigned size));
172  inline void setHandleTimeCodeQuarterFrame(void (*fptr)(byte data));
173  inline void setHandleSongPosition(void (*fptr)(unsigned beats));
174  inline void setHandleSongSelect(void (*fptr)(byte songnumber));
175  inline void setHandleTuneRequest(void (*fptr)(void));
176  inline void setHandleClock(void (*fptr)(void));
177  inline void setHandleStart(void (*fptr)(void));
178  inline void setHandleContinue(void (*fptr)(void));
179  inline void setHandleStop(void (*fptr)(void));
180  inline void setHandleActiveSensing(void (*fptr)(void));
181  inline void setHandleSystemReset(void (*fptr)(void));
182 
183  inline void disconnectCallbackFromType(MidiType inType);
184 
185 private:
186  void launchCallback();
187 
188  void (*mNoteOffCallback)(byte channel, byte note, byte velocity);
189  void (*mNoteOnCallback)(byte channel, byte note, byte velocity);
190  void (*mAfterTouchPolyCallback)(byte channel, byte note, byte velocity);
191  void (*mControlChangeCallback)(byte channel, byte, byte);
192  void (*mProgramChangeCallback)(byte channel, byte);
193  void (*mAfterTouchChannelCallback)(byte channel, byte);
194  void (*mPitchBendCallback)(byte channel, int);
195  void (*mSystemExclusiveCallback)(byte * array, unsigned size);
196  void (*mTimeCodeQuarterFrameCallback)(byte data);
197  void (*mSongPositionCallback)(unsigned beats);
198  void (*mSongSelectCallback)(byte songnumber);
199  void (*mTuneRequestCallback)(void);
200  void (*mClockCallback)(void);
201  void (*mStartCallback)(void);
202  void (*mContinueCallback)(void);
203  void (*mStopCallback)(void);
204  void (*mActiveSensingCallback)(void);
205  void (*mSystemResetCallback)(void);
206 
207  // -------------------------------------------------------------------------
208  // MIDI Soft Thru
209 
210 public:
211  inline Thru::Mode getFilterMode() const;
212  inline bool getThruState() const;
213 
214  inline void turnThruOn(Thru::Mode inThruFilterMode = Thru::Full);
215  inline void turnThruOff();
216  inline void setThruFilterMode(Thru::Mode inThruFilterMode);
217 
218 private:
219  void thruFilter(byte inChannel);
220 
221 private:
222  bool parse();
223  inline void handleNullVelocityNoteOnAsNoteOff();
224  inline bool inputFilter(Channel inChannel);
225  inline void resetInput();
226 
227 private:
229 
230 private:
231  SerialPort& mSerial;
232 
233 private:
234  Channel mInputChannel;
235  StatusByte mRunningStatus_RX;
236  StatusByte mRunningStatus_TX;
237  byte mPendingMessage[3];
238  unsigned mPendingMessageExpectedLenght;
239  unsigned mPendingMessageIndex;
240  unsigned mCurrentRpnNumber;
241  unsigned mCurrentNrpnNumber;
242  bool mThruActivated : 1;
243  Thru::Mode mThruFilterMode : 7;
244  MidiMessage mMessage;
245 
246 
247 private:
248  inline StatusByte getStatus(MidiType inType,
249  Channel inChannel) const;
250 };
251 
252 // -----------------------------------------------------------------------------
253 
254 unsigned encodeSysEx(const byte* inData, byte* outSysEx, unsigned inLenght);
255 unsigned decodeSysEx(const byte* inSysEx, byte* outData, unsigned inLenght);
256 
258 
259 #include "MIDI.hpp"
void setHandleProgramChange(void(*fptr)(byte channel, byte number))
Definition: MIDI.hpp:1145
-
void disconnectCallbackFromType(MidiType inType)
Detach an external function from the given type.
Definition: MIDI.hpp:1167
-
void setHandleNoteOn(void(*fptr)(byte channel, byte note, byte velocity))
Definition: MIDI.hpp:1142
-
void sendSongSelect(DataByte inSongNumber)
Send a Song Select message.
Definition: MIDI.hpp:419
-
void setThruFilterMode(Thru::Mode inThruFilterMode)
Set the filter for thru mirroring.
Definition: MIDI.hpp:1253
-
void sendSongPosition(unsigned inBeats)
Send a Song Position Pointer message.
Definition: MIDI.hpp:405
-
void turnThruOn(Thru::Mode inThruFilterMode=Thru::Full)
Definition: MIDI.hpp:1272
-
void beginRpn(unsigned inNumber, Channel inChannel)
Start a Registered Parameter Number frame.
Definition: MIDI.hpp:463
-
void sendProgramChange(DataByte inProgramNumber, Channel inChannel)
Send a Program Change message.
Definition: MIDI.hpp:226
-
MidiType getType() const
Get the last received message&#39;s type.
Definition: MIDI.hpp:1011
-
DataByte getData2() const
Get the second data byte of the last received message.
Definition: MIDI.hpp:1036
-
byte StatusByte
Definition: midi_Defs.h:58
+Go to the documentation of this file.
1 
28 #pragma once
29 
30 #include "midi_Defs.h"
31 #include "midi_Settings.h"
32 #include "midi_Message.h"
33 
34 // -----------------------------------------------------------------------------
35 
37 
44 template<class SerialPort, class _Settings = DefaultSettings>
46 {
47 public:
48  typedef _Settings Settings;
49 
50 public:
51  inline MidiInterface(SerialPort& inSerial);
52  inline ~MidiInterface();
53 
54 public:
55  void begin(Channel inChannel = 1);
56 
57  // -------------------------------------------------------------------------
58  // MIDI Output
59 
60 public:
61  inline void sendNoteOn(DataByte inNoteNumber,
62  DataByte inVelocity,
63  Channel inChannel);
64 
65  inline void sendNoteOff(DataByte inNoteNumber,
66  DataByte inVelocity,
67  Channel inChannel);
68 
69  inline void sendProgramChange(DataByte inProgramNumber,
70  Channel inChannel);
71 
72  inline void sendControlChange(DataByte inControlNumber,
73  DataByte inControlValue,
74  Channel inChannel);
75 
76  inline void sendPitchBend(int inPitchValue, Channel inChannel);
77  inline void sendPitchBend(double inPitchValue, Channel inChannel);
78 
79  inline void sendPolyPressure(DataByte inNoteNumber,
80  DataByte inPressure,
81  Channel inChannel) __attribute__ ((deprecated));
82 
83  inline void sendAfterTouch(DataByte inPressure,
84  Channel inChannel);
85  inline void sendAfterTouch(DataByte inNoteNumber,
86  DataByte inPressure,
87  Channel inChannel);
88 
89  inline void sendSysEx(unsigned inLength,
90  const byte* inArray,
91  bool inArrayContainsBoundaries = false);
92 
93  inline void sendTimeCodeQuarterFrame(DataByte inTypeNibble,
94  DataByte inValuesNibble);
95  inline void sendTimeCodeQuarterFrame(DataByte inData);
96 
97  inline void sendSongPosition(unsigned inBeats);
98  inline void sendSongSelect(DataByte inSongNumber);
99  inline void sendTuneRequest();
100  inline void sendRealTime(MidiType inType);
101 
102  inline void beginRpn(unsigned inNumber,
103  Channel inChannel);
104  inline void sendRpnValue(unsigned inValue,
105  Channel inChannel);
106  inline void sendRpnValue(byte inMsb,
107  byte inLsb,
108  Channel inChannel);
109  inline void sendRpnIncrement(byte inAmount,
110  Channel inChannel);
111  inline void sendRpnDecrement(byte inAmount,
112  Channel inChannel);
113  inline void endRpn(Channel inChannel);
114 
115  inline void beginNrpn(unsigned inNumber,
116  Channel inChannel);
117  inline void sendNrpnValue(unsigned inValue,
118  Channel inChannel);
119  inline void sendNrpnValue(byte inMsb,
120  byte inLsb,
121  Channel inChannel);
122  inline void sendNrpnIncrement(byte inAmount,
123  Channel inChannel);
124  inline void sendNrpnDecrement(byte inAmount,
125  Channel inChannel);
126  inline void endNrpn(Channel inChannel);
127 
128 public:
129  void send(MidiType inType,
130  DataByte inData1,
131  DataByte inData2,
132  Channel inChannel);
133 
134  // -------------------------------------------------------------------------
135  // MIDI Input
136 
137 public:
138  inline bool read();
139  inline bool read(Channel inChannel);
140 
141 public:
142  inline MidiType getType() const;
143  inline Channel getChannel() const;
144  inline DataByte getData1() const;
145  inline DataByte getData2() const;
146  inline const byte* getSysExArray() const;
147  inline unsigned getSysExArrayLength() const;
148  inline bool check() const;
149 
150 public:
151  inline Channel getInputChannel() const;
152  inline void setInputChannel(Channel inChannel);
153 
154 public:
155  static inline MidiType getTypeFromStatusByte(byte inStatus);
156  static inline Channel getChannelFromStatusByte(byte inStatus);
157  static inline bool isChannelMessage(MidiType inType);
158 
159  // -------------------------------------------------------------------------
160  // Input Callbacks
161 
162 public:
163  inline void setHandleNoteOff(void (*fptr)(byte channel, byte note, byte velocity));
164  inline void setHandleNoteOn(void (*fptr)(byte channel, byte note, byte velocity));
165  inline void setHandleAfterTouchPoly(void (*fptr)(byte channel, byte note, byte pressure));
166  inline void setHandleControlChange(void (*fptr)(byte channel, byte number, byte value));
167  inline void setHandleProgramChange(void (*fptr)(byte channel, byte number));
168  inline void setHandleAfterTouchChannel(void (*fptr)(byte channel, byte pressure));
169  inline void setHandlePitchBend(void (*fptr)(byte channel, int bend));
170  inline void setHandleSystemExclusive(void (*fptr)(byte * array, unsigned size));
171  inline void setHandleTimeCodeQuarterFrame(void (*fptr)(byte data));
172  inline void setHandleSongPosition(void (*fptr)(unsigned beats));
173  inline void setHandleSongSelect(void (*fptr)(byte songnumber));
174  inline void setHandleTuneRequest(void (*fptr)(void));
175  inline void setHandleClock(void (*fptr)(void));
176  inline void setHandleStart(void (*fptr)(void));
177  inline void setHandleContinue(void (*fptr)(void));
178  inline void setHandleStop(void (*fptr)(void));
179  inline void setHandleActiveSensing(void (*fptr)(void));
180  inline void setHandleSystemReset(void (*fptr)(void));
181 
182  inline void disconnectCallbackFromType(MidiType inType);
183 
184 private:
185  void launchCallback();
186 
187  void (*mNoteOffCallback)(byte channel, byte note, byte velocity);
188  void (*mNoteOnCallback)(byte channel, byte note, byte velocity);
189  void (*mAfterTouchPolyCallback)(byte channel, byte note, byte velocity);
190  void (*mControlChangeCallback)(byte channel, byte, byte);
191  void (*mProgramChangeCallback)(byte channel, byte);
192  void (*mAfterTouchChannelCallback)(byte channel, byte);
193  void (*mPitchBendCallback)(byte channel, int);
194  void (*mSystemExclusiveCallback)(byte * array, unsigned size);
195  void (*mTimeCodeQuarterFrameCallback)(byte data);
196  void (*mSongPositionCallback)(unsigned beats);
197  void (*mSongSelectCallback)(byte songnumber);
198  void (*mTuneRequestCallback)(void);
199  void (*mClockCallback)(void);
200  void (*mStartCallback)(void);
201  void (*mContinueCallback)(void);
202  void (*mStopCallback)(void);
203  void (*mActiveSensingCallback)(void);
204  void (*mSystemResetCallback)(void);
205 
206  // -------------------------------------------------------------------------
207  // MIDI Soft Thru
208 
209 public:
210  inline Thru::Mode getFilterMode() const;
211  inline bool getThruState() const;
212 
213  inline void turnThruOn(Thru::Mode inThruFilterMode = Thru::Full);
214  inline void turnThruOff();
215  inline void setThruFilterMode(Thru::Mode inThruFilterMode);
216 
217 private:
218  void thruFilter(byte inChannel);
219 
220 private:
221  bool parse();
222  inline void handleNullVelocityNoteOnAsNoteOff();
223  inline bool inputFilter(Channel inChannel);
224  inline void resetInput();
225 
226 private:
228 
229 private:
230  SerialPort& mSerial;
231 
232 private:
233  Channel mInputChannel;
234  StatusByte mRunningStatus_RX;
235  StatusByte mRunningStatus_TX;
236  byte mPendingMessage[3];
237  unsigned mPendingMessageExpectedLenght;
238  unsigned mPendingMessageIndex;
239  unsigned mCurrentRpnNumber;
240  unsigned mCurrentNrpnNumber;
241  bool mThruActivated : 1;
242  Thru::Mode mThruFilterMode : 7;
243  MidiMessage mMessage;
244 
245 
246 private:
247  inline StatusByte getStatus(MidiType inType,
248  Channel inChannel) const;
249 };
250 
251 // -----------------------------------------------------------------------------
252 
253 unsigned encodeSysEx(const byte* inData, byte* outSysEx, unsigned inLenght);
254 unsigned decodeSysEx(const byte* inSysEx, byte* outData, unsigned inLenght);
255 
257 
258 #include "MIDI.hpp"
void setHandleProgramChange(void(*fptr)(byte channel, byte number))
Definition: MIDI.hpp:1144
+
void disconnectCallbackFromType(MidiType inType)
Detach an external function from the given type.
Definition: MIDI.hpp:1166
+
void setHandleNoteOn(void(*fptr)(byte channel, byte note, byte velocity))
Definition: MIDI.hpp:1141
+
void sendSongSelect(DataByte inSongNumber)
Send a Song Select message.
Definition: MIDI.hpp:418
+
void setThruFilterMode(Thru::Mode inThruFilterMode)
Set the filter for thru mirroring.
Definition: MIDI.hpp:1252
+
void sendSongPosition(unsigned inBeats)
Send a Song Position Pointer message.
Definition: MIDI.hpp:404
+
void turnThruOn(Thru::Mode inThruFilterMode=Thru::Full)
Definition: MIDI.hpp:1271
+
void beginRpn(unsigned inNumber, Channel inChannel)
Start a Registered Parameter Number frame.
Definition: MIDI.hpp:462
+
void sendProgramChange(DataByte inProgramNumber, Channel inChannel)
Send a Program Change message.
Definition: MIDI.hpp:225
+
MidiType getType() const
Get the last received message&#39;s type.
Definition: MIDI.hpp:1010
+
DataByte getData2() const
Get the second data byte of the last received message.
Definition: MIDI.hpp:1035
+
byte StatusByte
Definition: midi_Defs.h:57
MIDI Library for the Arduino - Settings.
-
#define BEGIN_MIDI_NAMESPACE
-
Mode
Definition: midi_Defs.h:94
-
Channel getChannel() const
Get the channel of the message stored in the structure.
Definition: MIDI.hpp:1022
-
void setHandleSystemExclusive(void(*fptr)(byte *array, unsigned size))
Definition: MIDI.hpp:1148
-
#define END_MIDI_NAMESPACE
-
void setHandleSongSelect(void(*fptr)(byte songnumber))
Definition: MIDI.hpp:1151
-
unsigned getSysExArrayLength() const
Get the lenght of the System Exclusive array.
Definition: MIDI.hpp:1057
-
bool read()
Read messages from the serial port using the main input channel.
Definition: MIDI.hpp:644
-
DataByte getData1() const
Get the first data byte of the last received message.
Definition: MIDI.hpp:1029
-
void setHandleClock(void(*fptr)(void))
Definition: MIDI.hpp:1153
-
void beginNrpn(unsigned inNumber, Channel inChannel)
Start a Non-Registered Parameter Number frame.
Definition: MIDI.hpp:543
-
void begin(Channel inChannel=1)
Call the begin method in the setup() function of the Arduino.
Definition: MIDI.hpp:85
-
void sendRealTime(MidiType inType)
Send a Real Time (one byte) message.
Definition: MIDI.hpp:437
-
static Channel getChannelFromStatusByte(byte inStatus)
Returns channel in the range 1-16.
Definition: MIDI.hpp:1118
-
void setHandleStart(void(*fptr)(void))
Definition: MIDI.hpp:1154
-
byte Channel
Definition: midi_Defs.h:60
-
void endRpn(Channel inChannel)
Terminate an RPN frame. This will send a Null Function to deselect the currently selected RPN...
Definition: MIDI.hpp:529
-
void setInputChannel(Channel inChannel)
Set the value for the input MIDI channel.
Definition: MIDI.hpp:1082
-
void setHandleSystemReset(void(*fptr)(void))
Definition: MIDI.hpp:1158
-
bool getThruState() const
Definition: MIDI.hpp:1266
-
Channel getInputChannel() const
Definition: MIDI.hpp:1072
-
void endNrpn(Channel inChannel)
Terminate an NRPN frame. This will send a Null Function to deselect the currently selected NRPN...
Definition: MIDI.hpp:609
-
enum __attribute__((deprecated)) MidiFilterMode
Definition: midi_Defs.h:106
-
void turnThruOff()
Definition: MIDI.hpp:1279
-
void sendAfterTouch(DataByte inPressure, Channel inChannel)
Send a MonoPhonic AfterTouch message (applies to all notes)
Definition: MIDI.hpp:266
-
void sendPolyPressure(DataByte inNoteNumber, DataByte inPressure, Channel inChannel) __attribute__((deprecated))
Send a Polyphonic AfterTouch message (applies to a specified note)
Definition: MIDI.hpp:254
-
void sendRpnDecrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:518
-
void sendNrpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected NRPN number.
Definition: MIDI.hpp:561
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
-
void sendTimeCodeQuarterFrame(DataByte inTypeNibble, DataByte inValuesNibble)
Send a MIDI Time Code Quarter Frame.
Definition: MIDI.hpp:376
-
void sendNrpnDecrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:598
-
void setHandleSongPosition(void(*fptr)(unsigned beats))
Definition: MIDI.hpp:1150
+
#define BEGIN_MIDI_NAMESPACE
+
Mode
Definition: midi_Defs.h:93
+
Channel getChannel() const
Get the channel of the message stored in the structure.
Definition: MIDI.hpp:1021
+
void setHandleSystemExclusive(void(*fptr)(byte *array, unsigned size))
Definition: MIDI.hpp:1147
+
#define END_MIDI_NAMESPACE
+
void setHandleSongSelect(void(*fptr)(byte songnumber))
Definition: MIDI.hpp:1150
+
unsigned getSysExArrayLength() const
Get the lenght of the System Exclusive array.
Definition: MIDI.hpp:1056
+
bool read()
Read messages from the serial port using the main input channel.
Definition: MIDI.hpp:643
+
DataByte getData1() const
Get the first data byte of the last received message.
Definition: MIDI.hpp:1028
+
void setHandleClock(void(*fptr)(void))
Definition: MIDI.hpp:1152
+
void beginNrpn(unsigned inNumber, Channel inChannel)
Start a Non-Registered Parameter Number frame.
Definition: MIDI.hpp:542
+
void begin(Channel inChannel=1)
Call the begin method in the setup() function of the Arduino.
Definition: MIDI.hpp:84
+
void sendRealTime(MidiType inType)
Send a Real Time (one byte) message.
Definition: MIDI.hpp:436
+
static Channel getChannelFromStatusByte(byte inStatus)
Returns channel in the range 1-16.
Definition: MIDI.hpp:1117
+
void setHandleStart(void(*fptr)(void))
Definition: MIDI.hpp:1153
+
byte Channel
Definition: midi_Defs.h:59
+
void endRpn(Channel inChannel)
Terminate an RPN frame. This will send a Null Function to deselect the currently selected RPN...
Definition: MIDI.hpp:528
+
void setInputChannel(Channel inChannel)
Set the value for the input MIDI channel.
Definition: MIDI.hpp:1081
+
void setHandleSystemReset(void(*fptr)(void))
Definition: MIDI.hpp:1157
+
bool getThruState() const
Definition: MIDI.hpp:1265
+
Channel getInputChannel() const
Definition: MIDI.hpp:1071
+
void endNrpn(Channel inChannel)
Terminate an NRPN frame. This will send a Null Function to deselect the currently selected NRPN...
Definition: MIDI.hpp:608
+
enum __attribute__((deprecated)) MidiFilterMode
Definition: midi_Defs.h:105
+
void turnThruOff()
Definition: MIDI.hpp:1278
+
void sendAfterTouch(DataByte inPressure, Channel inChannel)
Send a MonoPhonic AfterTouch message (applies to all notes)
Definition: MIDI.hpp:265
+
void sendPolyPressure(DataByte inNoteNumber, DataByte inPressure, Channel inChannel) __attribute__((deprecated))
Send a Polyphonic AfterTouch message (applies to a specified note)
Definition: MIDI.hpp:253
+
void sendRpnDecrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:517
+
void sendNrpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected NRPN number.
Definition: MIDI.hpp:560
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
+
void sendTimeCodeQuarterFrame(DataByte inTypeNibble, DataByte inValuesNibble)
Send a MIDI Time Code Quarter Frame.
Definition: MIDI.hpp:375
+
void sendNrpnDecrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:597
+
void setHandleSongPosition(void(*fptr)(unsigned beats))
Definition: MIDI.hpp:1149
MIDI Library for the Arduino - Inline implementations.
-
MidiType
Definition: midi_Defs.h:66
-
unsigned encodeSysEx(const byte *inData, byte *outSysEx, unsigned inLenght)
Encode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
Definition: MIDI.cpp:46
-
_Settings Settings
Definition: MIDI.h:49
-
Thru::Mode getFilterMode() const
Definition: MIDI.hpp:1260
-
void sendPitchBend(int inPitchValue, Channel inChannel)
Send a Pitch Bend message using a signed integer value.
Definition: MIDI.hpp:293
-
static MidiType getTypeFromStatusByte(byte inStatus)
Extract an enumerated MIDI type from a status byte.
Definition: MIDI.hpp:1095
-
void setHandleActiveSensing(void(*fptr)(void))
Definition: MIDI.hpp:1157
-
MidiInterface(SerialPort &inSerial)
Constructor for MidiInterface.
Definition: MIDI.hpp:35
+
MidiType
Definition: midi_Defs.h:65
+
unsigned encodeSysEx(const byte *inData, byte *outSysEx, unsigned inLenght)
Encode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
Definition: MIDI.cpp:45
+
_Settings Settings
Definition: MIDI.h:48
+
Thru::Mode getFilterMode() const
Definition: MIDI.hpp:1259
+
void sendPitchBend(int inPitchValue, Channel inChannel)
Send a Pitch Bend message using a signed integer value.
Definition: MIDI.hpp:292
+
static MidiType getTypeFromStatusByte(byte inStatus)
Extract an enumerated MIDI type from a status byte.
Definition: MIDI.hpp:1094
+
void setHandleActiveSensing(void(*fptr)(void))
Definition: MIDI.hpp:1156
+
MidiInterface(SerialPort &inSerial)
Constructor for MidiInterface.
Definition: MIDI.hpp:34
MIDI Library for the Arduino - Message struct definition.
-
static bool isChannelMessage(MidiType inType)
Definition: MIDI.hpp:1124
-
byte DataByte
Definition: midi_Defs.h:59
-
uint8_t byte
Definition: midi_Defs.h:37
-
void setHandleTimeCodeQuarterFrame(void(*fptr)(byte data))
Definition: MIDI.hpp:1149
-
void sendTuneRequest()
Send a Tune Request message.
Definition: MIDI.hpp:359
-
void setHandleContinue(void(*fptr)(void))
Definition: MIDI.hpp:1155
-
void sendNrpnIncrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:588
+
static bool isChannelMessage(MidiType inType)
Definition: MIDI.hpp:1123
+
byte DataByte
Definition: midi_Defs.h:58
+
uint8_t byte
Definition: midi_Defs.h:36
+
void setHandleTimeCodeQuarterFrame(void(*fptr)(byte data))
Definition: MIDI.hpp:1148
+
void sendTuneRequest()
Send a Tune Request message.
Definition: MIDI.hpp:358
+
void setHandleContinue(void(*fptr)(void))
Definition: MIDI.hpp:1154
+
void sendNrpnIncrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:587
MIDI Library for the Arduino - Definitions.
-
void sendRpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected RPN number.
Definition: MIDI.hpp:481
-
unsigned decodeSysEx(const byte *inSysEx, byte *outData, unsigned inLenght)
Decode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
Definition: MIDI.cpp:83
+
void sendRpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected RPN number.
Definition: MIDI.hpp:480
+
unsigned decodeSysEx(const byte *inSysEx, byte *outData, unsigned inLenght)
Decode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
Definition: MIDI.cpp:82
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
-
void sendSysEx(unsigned inLength, const byte *inArray, bool inArrayContainsBoundaries=false)
Generate and send a System Exclusive frame.
Definition: MIDI.hpp:326
-
void setHandleNoteOff(void(*fptr)(byte channel, byte note, byte velocity))
Definition: MIDI.hpp:1141
-
bool check() const
Check if a valid message is stored in the structure.
Definition: MIDI.hpp:1064
-
void setHandlePitchBend(void(*fptr)(byte channel, int bend))
Definition: MIDI.hpp:1147
-
void setHandleStop(void(*fptr)(void))
Definition: MIDI.hpp:1156
-
void sendNoteOn(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note On message.
Definition: MIDI.hpp:195
-
const byte * getSysExArray() const
Get the System Exclusive byte array.
Definition: MIDI.hpp:1046
-
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:97
-
void setHandleTuneRequest(void(*fptr)(void))
Definition: MIDI.hpp:1152
-
~MidiInterface()
Destructor for MidiInterface.
Definition: MIDI.hpp:72
-
void setHandleControlChange(void(*fptr)(byte channel, byte number, byte value))
Definition: MIDI.hpp:1144
-
void sendNoteOff(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note Off message.
Definition: MIDI.hpp:214
-
The main class for MIDI handling. It is templated over the type of serial port to provide abstraction...
Definition: MIDI.h:46
-
void setHandleAfterTouchChannel(void(*fptr)(byte channel, byte pressure))
Definition: MIDI.hpp:1146
-
void sendRpnIncrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:508
-
void setHandleAfterTouchPoly(void(*fptr)(byte channel, byte note, byte pressure))
Definition: MIDI.hpp:1143
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
+
void sendSysEx(unsigned inLength, const byte *inArray, bool inArrayContainsBoundaries=false)
Generate and send a System Exclusive frame.
Definition: MIDI.hpp:325
+
void setHandleNoteOff(void(*fptr)(byte channel, byte note, byte velocity))
Definition: MIDI.hpp:1140
+
bool check() const
Check if a valid message is stored in the structure.
Definition: MIDI.hpp:1063
+
void setHandlePitchBend(void(*fptr)(byte channel, int bend))
Definition: MIDI.hpp:1146
+
void setHandleStop(void(*fptr)(void))
Definition: MIDI.hpp:1155
+
void sendNoteOn(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note On message.
Definition: MIDI.hpp:194
+
const byte * getSysExArray() const
Get the System Exclusive byte array.
Definition: MIDI.hpp:1045
+
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:96
+
void setHandleTuneRequest(void(*fptr)(void))
Definition: MIDI.hpp:1151
+
~MidiInterface()
Destructor for MidiInterface.
Definition: MIDI.hpp:71
+
void setHandleControlChange(void(*fptr)(byte channel, byte number, byte value))
Definition: MIDI.hpp:1143
+
void sendNoteOff(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note Off message.
Definition: MIDI.hpp:213
+
The main class for MIDI handling. It is templated over the type of serial port to provide abstraction...
Definition: MIDI.h:45
+
void setHandleAfterTouchChannel(void(*fptr)(byte channel, byte pressure))
Definition: MIDI.hpp:1145
+
void sendRpnIncrement(byte inAmount, Channel inChannel)
Definition: MIDI.hpp:507
+
void setHandleAfterTouchPoly(void(*fptr)(byte channel, byte note, byte pressure))
Definition: MIDI.hpp:1142
-

Definition at line 49 of file midi_Defs.h.

+

Definition at line 48 of file midi_Defs.h.

@@ -343,7 +342,7 @@ Functions
MIDI_CREATE_INSTANCE
-

Definition at line 236 of file midi_Defs.h.

+

Definition at line 235 of file midi_Defs.h.

@@ -364,7 +363,7 @@ Functions

Create an instance of the library with default name, serial port and settings, for compatibility with sketches written with pre-v4.2 MIDI Lib, or if you don't bother using custom names, serial port or settings.

-

Definition at line 227 of file midi_Defs.h.

+

Definition at line 226 of file midi_Defs.h.

@@ -402,7 +401,7 @@ Functions

Create an instance of the library attached to a serial port. You can use HardwareSerial or SoftwareSerial for the serial port. Example: MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, midi2); Then call midi2.begin(), midi2.read() etc..

-

Definition at line 215 of file midi_Defs.h.

+

Definition at line 214 of file midi_Defs.h.

@@ -418,7 +417,7 @@ Functions
-

Definition at line 42 of file midi_Defs.h.

+

Definition at line 41 of file midi_Defs.h.

@@ -434,7 +433,7 @@ Functions
-

Definition at line 43 of file midi_Defs.h.

+

Definition at line 42 of file midi_Defs.h.

@@ -450,7 +449,7 @@ Functions
-

Definition at line 44 of file midi_Defs.h.

+

Definition at line 43 of file midi_Defs.h.

@@ -466,7 +465,7 @@ Functions
-

Definition at line 45 of file midi_Defs.h.

+

Definition at line 44 of file midi_Defs.h.

@@ -482,7 +481,7 @@ Functions
-

Definition at line 53 of file midi_Defs.h.

+

Definition at line 52 of file midi_Defs.h.

@@ -498,7 +497,7 @@ Functions
-

Definition at line 52 of file midi_Defs.h.

+

Definition at line 51 of file midi_Defs.h.

@@ -515,7 +514,7 @@ Functions
-

Definition at line 37 of file midi_Defs.h.

+

Definition at line 36 of file midi_Defs.h.

@@ -531,7 +530,7 @@ Functions
-

Definition at line 60 of file midi_Defs.h.

+

Definition at line 59 of file midi_Defs.h.

@@ -547,7 +546,7 @@ Functions
-

Definition at line 59 of file midi_Defs.h.

+

Definition at line 58 of file midi_Defs.h.

@@ -563,7 +562,7 @@ Functions
-

Definition at line 61 of file midi_Defs.h.

+

Definition at line 60 of file midi_Defs.h.

@@ -579,7 +578,7 @@ Functions
-

Definition at line 58 of file midi_Defs.h.

+

Definition at line 57 of file midi_Defs.h.

@@ -676,64 +675,64 @@ Functions PolyModeOn  -

Definition at line 120 of file midi_Defs.h.

-
121 {
122  // High resolution Continuous Controllers MSB (+32 for LSB) ----------------
123  BankSelect = 0,
124  ModulationWheel = 1,
125  BreathController = 2,
126  // CC3 undefined
127  FootController = 4,
128  PortamentoTime = 5,
129  DataEntryMSB = 6,
130  ChannelVolume = 7,
131  Balance = 8,
132  // CC9 undefined
133  Pan = 10,
134  ExpressionController = 11,
135  EffectControl1 = 12,
136  EffectControl2 = 13,
137  // CC14 undefined
138  // CC15 undefined
139  GeneralPurposeController1 = 16,
140  GeneralPurposeController2 = 17,
141  GeneralPurposeController3 = 18,
142  GeneralPurposeController4 = 19,
143 
144  DataEntryLSB = 38,
145 
146  // Switches ----------------------------------------------------------------
147  Sustain = 64,
148  Portamento = 65,
149  Sostenuto = 66,
150  SoftPedal = 67,
151  Legato = 68,
152  Hold = 69,
153 
154  // Low resolution continuous controllers -----------------------------------
155  SoundController1 = 70,
156  SoundController2 = 71,
157  SoundController3 = 72,
158  SoundController4 = 73,
159  SoundController5 = 74,
160  SoundController6 = 75,
161  SoundController7 = 76,
162  SoundController8 = 77,
163  SoundController9 = 78,
164  SoundController10 = 79,
165  GeneralPurposeController5 = 80,
166  GeneralPurposeController6 = 81,
167  GeneralPurposeController7 = 82,
168  GeneralPurposeController8 = 83,
169  PortamentoControl = 84,
170  // CC85 to CC90 undefined
171  Effects1 = 91,
172  Effects2 = 92,
173  Effects3 = 93,
174  Effects4 = 94,
175  Effects5 = 95,
176  DataIncrement = 96,
177  DataDecrement = 97,
178  NRPNLSB = 98,
179  NRPNMSB = 99,
180  RPNLSB = 100,
181  RPNMSB = 101,
182 
183  // Channel Mode messages ---------------------------------------------------
184  AllSoundOff = 120,
185  ResetAllControllers = 121,
186  LocalControl = 122,
187  AllNotesOff = 123,
188  OmniModeOff = 124,
189  OmniModeOn = 125,
190  MonoModeOn = 126,
191  PolyModeOn = 127
192 };
Definition: midi_Defs.h:125
-
Definition: midi_Defs.h:139
-
Definition: midi_Defs.h:129
-
Definition: midi_Defs.h:134
-
Non-Registered Parameter Number (MSB)
Definition: midi_Defs.h:179
-
Reverb send level.
Definition: midi_Defs.h:171
-
Definition: midi_Defs.h:128
-
Definition: midi_Defs.h:186
-
Definition: midi_Defs.h:127
-
Definition: midi_Defs.h:140
-
Definition: midi_Defs.h:189
-
Definition: midi_Defs.h:148
-
Definition: midi_Defs.h:165
-
Definition: midi_Defs.h:167
-
Definition: midi_Defs.h:176
-
Definition: midi_Defs.h:131
-
Synth: Sound Variation FX: Exciter On/Off.
Definition: midi_Defs.h:155
-
Definition: midi_Defs.h:136
-
Definition: midi_Defs.h:177
-
Non-Registered Parameter Number (LSB)
Definition: midi_Defs.h:178
-
Definition: midi_Defs.h:130
-
Synth: Release Time FX: Distortion On/Off.
Definition: midi_Defs.h:157
-
Synth: Attack Time FX: EQ On/Off.
Definition: midi_Defs.h:158
-
Definition: midi_Defs.h:149
-
Definition: midi_Defs.h:184
-
Registered Parameter Number (MSB)
Definition: midi_Defs.h:181
-
Definition: midi_Defs.h:191
-
Chorus send level.
Definition: midi_Defs.h:173
-
Definition: midi_Defs.h:152
-
Definition: midi_Defs.h:141
-
Definition: midi_Defs.h:124
-
Synth: Harmonic Content FX: Compressor On/Off.
Definition: midi_Defs.h:156
-
Definition: midi_Defs.h:190
-
Definition: midi_Defs.h:188
-
Definition: midi_Defs.h:150
-
Celeste depth.
Definition: midi_Defs.h:174
-
Synth: Vibrato Rate FX: Delay On/Off.
Definition: midi_Defs.h:161
-
Definition: midi_Defs.h:142
-
Definition: midi_Defs.h:166
-
Definition: midi_Defs.h:135
-
Tremolo depth.
Definition: midi_Defs.h:172
-
Definition: midi_Defs.h:144
-
Synth: Decay Time FX: Reverb On/Off.
Definition: midi_Defs.h:160
-
Phaser depth.
Definition: midi_Defs.h:175
-
Definition: midi_Defs.h:151
-
Synth: Brightness FX: Expander On/Off.
Definition: midi_Defs.h:159
-
Definition: midi_Defs.h:168
-
Definition: midi_Defs.h:147
-
Definition: midi_Defs.h:133
-
Synth: Undefined FX: Special Effects On/Off.
Definition: midi_Defs.h:164
-
Synth: Vibrato Depth FX: Pitch Transpose On/Off.
Definition: midi_Defs.h:162
-
Definition: midi_Defs.h:185
-
Definition: midi_Defs.h:123
-
Definition: midi_Defs.h:169
-
Registered Parameter Number (LSB)
Definition: midi_Defs.h:180
-
Synth: Vibrato Delay FX: Flange/Chorus On/Off.
Definition: midi_Defs.h:163
-
Definition: midi_Defs.h:187
+

Definition at line 119 of file midi_Defs.h.

+
120 {
121  // High resolution Continuous Controllers MSB (+32 for LSB) ----------------
122  BankSelect = 0,
123  ModulationWheel = 1,
124  BreathController = 2,
125  // CC3 undefined
126  FootController = 4,
127  PortamentoTime = 5,
128  DataEntryMSB = 6,
129  ChannelVolume = 7,
130  Balance = 8,
131  // CC9 undefined
132  Pan = 10,
134  EffectControl1 = 12,
135  EffectControl2 = 13,
136  // CC14 undefined
137  // CC15 undefined
142 
143  DataEntryLSB = 38,
144 
145  // Switches ----------------------------------------------------------------
146  Sustain = 64,
147  Portamento = 65,
148  Sostenuto = 66,
149  SoftPedal = 67,
150  Legato = 68,
151  Hold = 69,
152 
153  // Low resolution continuous controllers -----------------------------------
154  SoundController1 = 70,
155  SoundController2 = 71,
156  SoundController3 = 72,
157  SoundController4 = 73,
158  SoundController5 = 74,
159  SoundController6 = 75,
160  SoundController7 = 76,
161  SoundController8 = 77,
162  SoundController9 = 78,
163  SoundController10 = 79,
168  PortamentoControl = 84,
169  // CC85 to CC90 undefined
170  Effects1 = 91,
171  Effects2 = 92,
172  Effects3 = 93,
173  Effects4 = 94,
174  Effects5 = 95,
175  DataIncrement = 96,
176  DataDecrement = 97,
177  NRPNLSB = 98,
178  NRPNMSB = 99,
179  RPNLSB = 100,
180  RPNMSB = 101,
181 
182  // Channel Mode messages ---------------------------------------------------
183  AllSoundOff = 120,
184  ResetAllControllers = 121,
185  LocalControl = 122,
186  AllNotesOff = 123,
187  OmniModeOff = 124,
188  OmniModeOn = 125,
189  MonoModeOn = 126,
190  PolyModeOn = 127
191 };
+ + + +
Non-Registered Parameter Number (MSB)
Definition: midi_Defs.h:178
+
Reverb send level.
Definition: midi_Defs.h:170
+ + + + + + + + + + +
Synth: Sound Variation FX: Exciter On/Off.
Definition: midi_Defs.h:154
+ + +
Non-Registered Parameter Number (LSB)
Definition: midi_Defs.h:177
+ +
Synth: Release Time FX: Distortion On/Off.
Definition: midi_Defs.h:156
+
Synth: Attack Time FX: EQ On/Off.
Definition: midi_Defs.h:157
+ + +
Registered Parameter Number (MSB)
Definition: midi_Defs.h:180
+ +
Chorus send level.
Definition: midi_Defs.h:172
+ + + +
Synth: Harmonic Content FX: Compressor On/Off.
Definition: midi_Defs.h:155
+ + + +
Celeste depth.
Definition: midi_Defs.h:173
+
Synth: Vibrato Rate FX: Delay On/Off.
Definition: midi_Defs.h:160
+ + + +
Tremolo depth.
Definition: midi_Defs.h:171
+ +
Synth: Decay Time FX: Reverb On/Off.
Definition: midi_Defs.h:159
+
Phaser depth.
Definition: midi_Defs.h:174
+ +
Synth: Brightness FX: Expander On/Off.
Definition: midi_Defs.h:158
+ + +
Definition: midi_Defs.h:132
+
Synth: Undefined FX: Special Effects On/Off.
Definition: midi_Defs.h:163
+
Synth: Vibrato Depth FX: Pitch Transpose On/Off.
Definition: midi_Defs.h:161
+ + + +
Registered Parameter Number (LSB)
Definition: midi_Defs.h:179
+
Synth: Vibrato Delay FX: Flange/Chorus On/Off.
Definition: midi_Defs.h:162
+
@@ -790,26 +789,26 @@ Functions -

Definition at line 66 of file midi_Defs.h.

-
67 {
68  InvalidType = 0x00,
69  NoteOff = 0x80,
70  NoteOn = 0x90,
71  AfterTouchPoly = 0xA0,
72  ControlChange = 0xB0,
73  ProgramChange = 0xC0,
74  AfterTouchChannel = 0xD0,
75  PitchBend = 0xE0,
76  SystemExclusive = 0xF0,
77  TimeCodeQuarterFrame = 0xF1,
78  SongPosition = 0xF2,
79  SongSelect = 0xF3,
80  TuneRequest = 0xF6,
81  Clock = 0xF8,
82  Start = 0xFA,
83  Continue = 0xFB,
84  Stop = 0xFC,
85  ActiveSensing = 0xFE,
86  SystemReset = 0xFF,
87 };
System Common - Song Position Pointer.
Definition: midi_Defs.h:78
-
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
System Common - Song Select.
Definition: midi_Defs.h:79
-
System Exclusive.
Definition: midi_Defs.h:76
-
System Real Time - Stop.
Definition: midi_Defs.h:84
-
System Real Time - Timing Clock.
Definition: midi_Defs.h:81
-
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:77
-
For notifying errors.
Definition: midi_Defs.h:68
-
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
Program Change.
Definition: midi_Defs.h:73
-
System Real Time - Continue.
Definition: midi_Defs.h:83
-
System Real Time - Start.
Definition: midi_Defs.h:82
-
Note On.
Definition: midi_Defs.h:70
-
Control Change / Channel Mode.
Definition: midi_Defs.h:72
-
System Common - Tune Request.
Definition: midi_Defs.h:80
-
Pitch Bend.
Definition: midi_Defs.h:75
-
System Real Time - Active Sensing.
Definition: midi_Defs.h:85
-
Note Off.
Definition: midi_Defs.h:69
-
System Real Time - System Reset.
Definition: midi_Defs.h:86
+

Definition at line 65 of file midi_Defs.h.

+
66 {
67  InvalidType = 0x00,
68  NoteOff = 0x80,
69  NoteOn = 0x90,
70  AfterTouchPoly = 0xA0,
71  ControlChange = 0xB0,
72  ProgramChange = 0xC0,
73  AfterTouchChannel = 0xD0,
74  PitchBend = 0xE0,
75  SystemExclusive = 0xF0,
76  TimeCodeQuarterFrame = 0xF1,
77  SongPosition = 0xF2,
78  SongSelect = 0xF3,
79  TuneRequest = 0xF6,
80  Clock = 0xF8,
81  Start = 0xFA,
82  Continue = 0xFB,
83  Stop = 0xFC,
84  ActiveSensing = 0xFE,
85  SystemReset = 0xFF,
86 };
System Common - Song Position Pointer.
Definition: midi_Defs.h:77
+
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
System Common - Song Select.
Definition: midi_Defs.h:78
+
System Exclusive.
Definition: midi_Defs.h:75
+
System Real Time - Stop.
Definition: midi_Defs.h:83
+
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
+
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:76
+
For notifying errors.
Definition: midi_Defs.h:67
+
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
Program Change.
Definition: midi_Defs.h:72
+
System Real Time - Continue.
Definition: midi_Defs.h:82
+
System Real Time - Start.
Definition: midi_Defs.h:81
+
Note On.
Definition: midi_Defs.h:69
+
Control Change / Channel Mode.
Definition: midi_Defs.h:71
+
System Common - Tune Request.
Definition: midi_Defs.h:79
+
Pitch Bend.
Definition: midi_Defs.h:74
+
System Real Time - Active Sensing.
Definition: midi_Defs.h:84
+
Note Off.
Definition: midi_Defs.h:68
+
System Real Time - System Reset.
Definition: midi_Defs.h:85
@@ -831,11 +830,11 @@ Functions

Deprecated: use Thru::Mode instead. Will be removed in v5.0.

-

Definition at line 106 of file midi_Defs.h.

-
107 {
108  Off = Thru::Off,
109  Full = Thru::Full,
110  SameChannel = Thru::SameChannel,
111  DifferentChannel = Thru::DifferentChannel,
112 };
Thru disabled (nothing passes through).
Definition: midi_Defs.h:96
-
Only the messages on the Input Channel will be sent back.
Definition: midi_Defs.h:98
-
All the messages but the ones on the Input Channel will be sent back.
Definition: midi_Defs.h:99
-
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:97
+

Definition at line 105 of file midi_Defs.h.

+
106 {
107  Off = Thru::Off,
108  Full = Thru::Full,
109  SameChannel = Thru::SameChannel,
110  DifferentChannel = Thru::DifferentChannel,
111 };
Thru disabled (nothing passes through).
Definition: midi_Defs.h:95
+
Only the messages on the Input Channel will be sent back.
Definition: midi_Defs.h:97
+
All the messages but the ones on the Input Channel will be sent back.
Definition: midi_Defs.h:98
+
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:96
@@ -845,7 +844,7 @@ Functions
-Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "midi_Namespace.h"
32 
33 #if ARDUINO
34 #include <Arduino.h>
35 #else
36 #include <inttypes.h>
37 typedef uint8_t byte;
38 #endif
39 
41 
42 #define MIDI_LIBRARY_VERSION 0x040300
43 #define MIDI_LIBRARY_VERSION_MAJOR 4
44 #define MIDI_LIBRARY_VERSION_MINOR 3
45 #define MIDI_LIBRARY_VERSION_PATCH 0
46 
47 // -----------------------------------------------------------------------------
48 
49 #define MIDI_CHANNEL_OMNI 0
50 #define MIDI_CHANNEL_OFF 17 // and over
51 
52 #define MIDI_PITCHBEND_MIN -8192
53 #define MIDI_PITCHBEND_MAX 8191
54 
55 // -----------------------------------------------------------------------------
56 // Type definitions
57 
58 typedef byte StatusByte;
59 typedef byte DataByte;
60 typedef byte Channel;
61 typedef byte FilterMode;
62 
63 // -----------------------------------------------------------------------------
64 
67 {
68  InvalidType = 0x00,
69  NoteOff = 0x80,
70  NoteOn = 0x90,
71  AfterTouchPoly = 0xA0,
72  ControlChange = 0xB0,
73  ProgramChange = 0xC0,
75  PitchBend = 0xE0,
76  SystemExclusive = 0xF0,
78  SongPosition = 0xF2,
79  SongSelect = 0xF3,
80  TuneRequest = 0xF6,
81  Clock = 0xF8,
82  Start = 0xFA,
83  Continue = 0xFB,
84  Stop = 0xFC,
85  ActiveSensing = 0xFE,
86  SystemReset = 0xFF,
87 };
88 
89 // -----------------------------------------------------------------------------
90 
92 struct Thru
93 {
94  enum Mode
95  {
96  Off = 0,
97  Full = 1,
100  };
101 };
102 
106 enum __attribute__ ((deprecated)) MidiFilterMode
107 {
108  Off = Thru::Off,
109  Full = Thru::Full,
112 };
113 
114 // -----------------------------------------------------------------------------
115 
121 {
122  // High resolution Continuous Controllers MSB (+32 for LSB) ----------------
126  // CC3 undefined
131  Balance = 8,
132  // CC9 undefined
133  Pan = 10,
137  // CC14 undefined
138  // CC15 undefined
143 
145 
146  // Switches ----------------------------------------------------------------
147  Sustain = 64,
149  Sostenuto = 66,
150  SoftPedal = 67,
151  Legato = 68,
152  Hold = 69,
153 
154  // Low resolution continuous controllers -----------------------------------
170  // CC85 to CC90 undefined
171  Effects1 = 91,
172  Effects2 = 92,
173  Effects3 = 93,
174  Effects4 = 94,
175  Effects5 = 95,
178  NRPNLSB = 98,
179  NRPNMSB = 99,
180  RPNLSB = 100,
181  RPNMSB = 101,
182 
183  // Channel Mode messages ---------------------------------------------------
184  AllSoundOff = 120,
187  AllNotesOff = 123,
188  OmniModeOff = 124,
189  OmniModeOn = 125,
190  MonoModeOn = 126,
192 };
193 
194 struct RPN
195 {
197  {
198  PitchBendSensitivity = 0x0000,
199  ChannelFineTuning = 0x0001,
200  ChannelCoarseTuning = 0x0002,
201  SelectTuningProgram = 0x0003,
202  SelectTuningBank = 0x0004,
203  ModulationDepthRange = 0x0005,
204  NullFunction = (0x7f << 7) + 0x7f,
205  };
206 };
207 
208 // -----------------------------------------------------------------------------
209 
215 #define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
216  midi::MidiInterface<Type> Name((Type&)SerialPort);
217 
218 #if defined(ARDUINO_SAM_DUE) || defined(USBCON)
219  // Leonardo, Due and other USB boards use Serial1 by default.
220  #define MIDI_CREATE_DEFAULT_INSTANCE() \
221  MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
222 #else
223 
227  #define MIDI_CREATE_DEFAULT_INSTANCE() \
228  MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);
229 #endif
230 
236 #define MIDI_CREATE_CUSTOM_INSTANCE(Type, SerialPort, Name, Settings) \
237  midi::MidiInterface<Type, Settings> Name((Type&)SerialPort);
238 
System Common - Song Position Pointer.
Definition: midi_Defs.h:78
- - -
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
System Common - Song Select.
Definition: midi_Defs.h:79
- -
Definition: midi_Defs.h:194
- -
Non-Registered Parameter Number (MSB)
Definition: midi_Defs.h:179
-
Reverb send level.
Definition: midi_Defs.h:171
-
System Exclusive.
Definition: midi_Defs.h:76
-
System Real Time - Stop.
Definition: midi_Defs.h:84
- -
System Real Time - Timing Clock.
Definition: midi_Defs.h:81
- - - - -
byte StatusByte
Definition: midi_Defs.h:58
-
#define BEGIN_MIDI_NAMESPACE
- -
Mode
Definition: midi_Defs.h:94
-
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:77
-
Thru disabled (nothing passes through).
Definition: midi_Defs.h:96
- - - -
#define END_MIDI_NAMESPACE
- -
For notifying errors.
Definition: midi_Defs.h:68
-
RegisteredParameterNumbers
Definition: midi_Defs.h:196
-
Only the messages on the Input Channel will be sent back.
Definition: midi_Defs.h:98
-
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
Program Change.
Definition: midi_Defs.h:73
-
Synth: Sound Variation FX: Exciter On/Off.
Definition: midi_Defs.h:155
- - -
Non-Registered Parameter Number (LSB)
Definition: midi_Defs.h:178
- -
byte Channel
Definition: midi_Defs.h:60
-
System Real Time - Continue.
Definition: midi_Defs.h:83
-
Synth: Release Time FX: Distortion On/Off.
Definition: midi_Defs.h:157
-
Synth: Attack Time FX: EQ On/Off.
Definition: midi_Defs.h:158
- -
System Real Time - Start.
Definition: midi_Defs.h:82
- +Go to the documentation of this file.
1 
28 #pragma once
29 
30 #include "midi_Namespace.h"
31 
32 #if ARDUINO
33 #include <Arduino.h>
34 #else
35 #include <inttypes.h>
36 typedef uint8_t byte;
37 #endif
38 
40 
41 #define MIDI_LIBRARY_VERSION 0x040300
42 #define MIDI_LIBRARY_VERSION_MAJOR 4
43 #define MIDI_LIBRARY_VERSION_MINOR 3
44 #define MIDI_LIBRARY_VERSION_PATCH 0
45 
46 // -----------------------------------------------------------------------------
47 
48 #define MIDI_CHANNEL_OMNI 0
49 #define MIDI_CHANNEL_OFF 17 // and over
50 
51 #define MIDI_PITCHBEND_MIN -8192
52 #define MIDI_PITCHBEND_MAX 8191
53 
54 // -----------------------------------------------------------------------------
55 // Type definitions
56 
57 typedef byte StatusByte;
58 typedef byte DataByte;
59 typedef byte Channel;
60 typedef byte FilterMode;
61 
62 // -----------------------------------------------------------------------------
63 
66 {
67  InvalidType = 0x00,
68  NoteOff = 0x80,
69  NoteOn = 0x90,
70  AfterTouchPoly = 0xA0,
71  ControlChange = 0xB0,
72  ProgramChange = 0xC0,
74  PitchBend = 0xE0,
75  SystemExclusive = 0xF0,
77  SongPosition = 0xF2,
78  SongSelect = 0xF3,
79  TuneRequest = 0xF6,
80  Clock = 0xF8,
81  Start = 0xFA,
82  Continue = 0xFB,
83  Stop = 0xFC,
84  ActiveSensing = 0xFE,
85  SystemReset = 0xFF,
86 };
87 
88 // -----------------------------------------------------------------------------
89 
91 struct Thru
92 {
93  enum Mode
94  {
95  Off = 0,
96  Full = 1,
99  };
100 };
101 
105 enum __attribute__ ((deprecated)) MidiFilterMode
106 {
107  Off = Thru::Off,
108  Full = Thru::Full,
111 };
112 
113 // -----------------------------------------------------------------------------
114 
120 {
121  // High resolution Continuous Controllers MSB (+32 for LSB) ----------------
125  // CC3 undefined
130  Balance = 8,
131  // CC9 undefined
132  Pan = 10,
136  // CC14 undefined
137  // CC15 undefined
142 
144 
145  // Switches ----------------------------------------------------------------
146  Sustain = 64,
148  Sostenuto = 66,
149  SoftPedal = 67,
150  Legato = 68,
151  Hold = 69,
152 
153  // Low resolution continuous controllers -----------------------------------
169  // CC85 to CC90 undefined
170  Effects1 = 91,
171  Effects2 = 92,
172  Effects3 = 93,
173  Effects4 = 94,
174  Effects5 = 95,
177  NRPNLSB = 98,
178  NRPNMSB = 99,
179  RPNLSB = 100,
180  RPNMSB = 101,
181 
182  // Channel Mode messages ---------------------------------------------------
183  AllSoundOff = 120,
186  AllNotesOff = 123,
187  OmniModeOff = 124,
188  OmniModeOn = 125,
189  MonoModeOn = 126,
191 };
192 
193 struct RPN
194 {
196  {
197  PitchBendSensitivity = 0x0000,
198  ChannelFineTuning = 0x0001,
199  ChannelCoarseTuning = 0x0002,
200  SelectTuningProgram = 0x0003,
201  SelectTuningBank = 0x0004,
202  ModulationDepthRange = 0x0005,
203  NullFunction = (0x7f << 7) + 0x7f,
204  };
205 };
206 
207 // -----------------------------------------------------------------------------
208 
214 #define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
215  midi::MidiInterface<Type> Name((Type&)SerialPort);
216 
217 #if defined(ARDUINO_SAM_DUE) || defined(USBCON)
218  // Leonardo, Due and other USB boards use Serial1 by default.
219  #define MIDI_CREATE_DEFAULT_INSTANCE() \
220  MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
221 #else
222 
226  #define MIDI_CREATE_DEFAULT_INSTANCE() \
227  MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);
228 #endif
229 
235 #define MIDI_CREATE_CUSTOM_INSTANCE(Type, SerialPort, Name, Settings) \
236  midi::MidiInterface<Type, Settings> Name((Type&)SerialPort);
237 
System Common - Song Position Pointer.
Definition: midi_Defs.h:77
+ + +
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
System Common - Song Select.
Definition: midi_Defs.h:78
+ +
Definition: midi_Defs.h:193
+ +
Non-Registered Parameter Number (MSB)
Definition: midi_Defs.h:178
+
Reverb send level.
Definition: midi_Defs.h:170
+
System Exclusive.
Definition: midi_Defs.h:75
+
System Real Time - Stop.
Definition: midi_Defs.h:83
+ +
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
+ + + + +
byte StatusByte
Definition: midi_Defs.h:57
+
#define BEGIN_MIDI_NAMESPACE
+ +
Mode
Definition: midi_Defs.h:93
+
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:76
+
Thru disabled (nothing passes through).
Definition: midi_Defs.h:95
+ + + +
#define END_MIDI_NAMESPACE
+ +
For notifying errors.
Definition: midi_Defs.h:67
+
RegisteredParameterNumbers
Definition: midi_Defs.h:195
+
Only the messages on the Input Channel will be sent back.
Definition: midi_Defs.h:97
+
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
Program Change.
Definition: midi_Defs.h:72
+
Synth: Sound Variation FX: Exciter On/Off.
Definition: midi_Defs.h:154
+ + +
Non-Registered Parameter Number (LSB)
Definition: midi_Defs.h:177
+ +
byte Channel
Definition: midi_Defs.h:59
+
System Real Time - Continue.
Definition: midi_Defs.h:82
+
Synth: Release Time FX: Distortion On/Off.
Definition: midi_Defs.h:156
+
Synth: Attack Time FX: EQ On/Off.
Definition: midi_Defs.h:157
+ +
System Real Time - Start.
Definition: midi_Defs.h:81
+
MIDI Library for the Arduino - Namespace declaration.
-
Registered Parameter Number (MSB)
Definition: midi_Defs.h:181
- -
enum __attribute__((deprecated)) MidiFilterMode
Definition: midi_Defs.h:106
-
Chorus send level.
Definition: midi_Defs.h:173
- - - -
Synth: Harmonic Content FX: Compressor On/Off.
Definition: midi_Defs.h:156
- -
byte FilterMode
Definition: midi_Defs.h:61
-
Note On.
Definition: midi_Defs.h:70
-
MidiType
Definition: midi_Defs.h:66
-
Control Change / Channel Mode.
Definition: midi_Defs.h:72
- -
System Common - Tune Request.
Definition: midi_Defs.h:80
-
Definition: midi_Defs.h:92
- -
Pitch Bend.
Definition: midi_Defs.h:75
-
byte DataByte
Definition: midi_Defs.h:59
-
uint8_t byte
Definition: midi_Defs.h:37
-
Celeste depth.
Definition: midi_Defs.h:174
-
Synth: Vibrato Rate FX: Delay On/Off.
Definition: midi_Defs.h:161
- - - -
Tremolo depth.
Definition: midi_Defs.h:172
- -
Synth: Decay Time FX: Reverb On/Off.
Definition: midi_Defs.h:160
-
All the messages but the ones on the Input Channel will be sent back.
Definition: midi_Defs.h:99
-
Phaser depth.
Definition: midi_Defs.h:175
- -
Synth: Brightness FX: Expander On/Off.
Definition: midi_Defs.h:159
-
System Real Time - Active Sensing.
Definition: midi_Defs.h:85
-
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:97
-
MidiControlChangeNumber
Enumeration of Control Change command numbers. See the detailed controllers numbers & description her...
Definition: midi_Defs.h:120
- - -
Note Off.
Definition: midi_Defs.h:69
-
System Real Time - System Reset.
Definition: midi_Defs.h:86
-
Definition: midi_Defs.h:133
-
Synth: Undefined FX: Special Effects On/Off.
Definition: midi_Defs.h:164
-
Synth: Vibrato Depth FX: Pitch Transpose On/Off.
Definition: midi_Defs.h:162
- - - -
Registered Parameter Number (LSB)
Definition: midi_Defs.h:180
-
Synth: Vibrato Delay FX: Flange/Chorus On/Off.
Definition: midi_Defs.h:163
- +
Registered Parameter Number (MSB)
Definition: midi_Defs.h:180
+ +
enum __attribute__((deprecated)) MidiFilterMode
Definition: midi_Defs.h:105
+
Chorus send level.
Definition: midi_Defs.h:172
+ + + +
Synth: Harmonic Content FX: Compressor On/Off.
Definition: midi_Defs.h:155
+ +
byte FilterMode
Definition: midi_Defs.h:60
+
Note On.
Definition: midi_Defs.h:69
+
MidiType
Definition: midi_Defs.h:65
+
Control Change / Channel Mode.
Definition: midi_Defs.h:71
+ +
System Common - Tune Request.
Definition: midi_Defs.h:79
+
Definition: midi_Defs.h:91
+ +
Pitch Bend.
Definition: midi_Defs.h:74
+
byte DataByte
Definition: midi_Defs.h:58
+
uint8_t byte
Definition: midi_Defs.h:36
+
Celeste depth.
Definition: midi_Defs.h:173
+
Synth: Vibrato Rate FX: Delay On/Off.
Definition: midi_Defs.h:160
+ + + +
Tremolo depth.
Definition: midi_Defs.h:171
+ +
Synth: Decay Time FX: Reverb On/Off.
Definition: midi_Defs.h:159
+
All the messages but the ones on the Input Channel will be sent back.
Definition: midi_Defs.h:98
+
Phaser depth.
Definition: midi_Defs.h:174
+ +
Synth: Brightness FX: Expander On/Off.
Definition: midi_Defs.h:158
+
System Real Time - Active Sensing.
Definition: midi_Defs.h:84
+
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:96
+
MidiControlChangeNumber
Enumeration of Control Change command numbers. See the detailed controllers numbers & description her...
Definition: midi_Defs.h:119
+ + +
Note Off.
Definition: midi_Defs.h:68
+
System Real Time - System Reset.
Definition: midi_Defs.h:85
+
Definition: midi_Defs.h:132
+
Synth: Undefined FX: Special Effects On/Off.
Definition: midi_Defs.h:163
+
Synth: Vibrato Depth FX: Pitch Transpose On/Off.
Definition: midi_Defs.h:161
+ + + +
Registered Parameter Number (LSB)
Definition: midi_Defs.h:179
+
Synth: Vibrato Delay FX: Flange/Chorus On/Off.
Definition: midi_Defs.h:162
+
-

Definition at line 33 of file midi_Namespace.h.

+

Definition at line 32 of file midi_Namespace.h.

@@ -158,7 +157,7 @@ Macros
-

Definition at line 31 of file midi_Namespace.h.

+

Definition at line 30 of file midi_Namespace.h.

@@ -174,7 +173,7 @@ Macros
-

Definition at line 35 of file midi_Namespace.h.

+

Definition at line 34 of file midi_Namespace.h.

@@ -184,7 +183,7 @@ Macros
-Go to the documentation of this file.
1 
29 #pragma once
30 
31 #define MIDI_NAMESPACE midi
32 #define BEGIN_MIDI_NAMESPACE namespace MIDI_NAMESPACE {
33 #define END_MIDI_NAMESPACE }
34 
35 #define USING_NAMESPACE_MIDI using namespace MIDI_NAMESPACE;
36 
38 
#define BEGIN_MIDI_NAMESPACE
-
#define END_MIDI_NAMESPACE
+Go to the documentation of this file.
1 
28 #pragma once
29 
30 #define MIDI_NAMESPACE midi
31 #define BEGIN_MIDI_NAMESPACE namespace MIDI_NAMESPACE {
32 #define END_MIDI_NAMESPACE }
33 
34 #define USING_NAMESPACE_MIDI using namespace MIDI_NAMESPACE;
35 
37 
#define BEGIN_MIDI_NAMESPACE
+
#define END_MIDI_NAMESPACE
@@ -415,16 +415,16 @@ template<class SerialPort , class Settings >

This is an internal method, use it only if you need to send raw data from your code, at your own risks.

-

Definition at line 134 of file MIDI.hpp.

-
138 {
139  // Then test if channel is valid
140  if (inChannel >= MIDI_CHANNEL_OFF ||
141  inChannel == MIDI_CHANNEL_OMNI ||
142  inType < 0x80)
143  {
144  return; // Don't send anything
145  }
146 
147  if (inType <= PitchBend) // Channel messages
148  {
149  // Protection: remove MSBs on data
150  inData1 &= 0x7f;
151  inData2 &= 0x7f;
152 
153  const StatusByte status = getStatus(inType, inChannel);
154 
155  if (Settings::UseRunningStatus)
156  {
157  if (mRunningStatus_TX != status)
158  {
159  // New message, memorise and send header
160  mRunningStatus_TX = status;
161  mSerial.write(mRunningStatus_TX);
162  }
163  }
164  else
165  {
166  // Don't care about running status, send the status byte.
167  mSerial.write(status);
168  }
169 
170  // Then send data
171  mSerial.write(inData1);
172  if (inType != ProgramChange && inType != AfterTouchChannel)
173  {
174  mSerial.write(inData2);
175  }
176  }
177  else if (inType >= Clock && inType <= SystemReset)
178  {
179  sendRealTime(inType); // System Real-time and 1 byte.
180  }
181 }
System Real Time - Timing Clock.
Definition: midi_Defs.h:81
-
byte StatusByte
Definition: midi_Defs.h:58
-
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
Program Change.
Definition: midi_Defs.h:73
-
void sendRealTime(MidiType inType)
Send a Real Time (one byte) message.
Definition: MIDI.hpp:437
-
#define MIDI_CHANNEL_OMNI
Definition: midi_Defs.h:49
-
Pitch Bend.
Definition: midi_Defs.h:75
-
System Real Time - System Reset.
Definition: midi_Defs.h:86
-
#define MIDI_CHANNEL_OFF
Definition: midi_Defs.h:50
+

Definition at line 133 of file MIDI.hpp.

+
137 {
138  // Then test if channel is valid
139  if (inChannel >= MIDI_CHANNEL_OFF ||
140  inChannel == MIDI_CHANNEL_OMNI ||
141  inType < 0x80)
142  {
143  return; // Don't send anything
144  }
145 
146  if (inType <= PitchBend) // Channel messages
147  {
148  // Protection: remove MSBs on data
149  inData1 &= 0x7f;
150  inData2 &= 0x7f;
151 
152  const StatusByte status = getStatus(inType, inChannel);
153 
154  if (Settings::UseRunningStatus)
155  {
156  if (mRunningStatus_TX != status)
157  {
158  // New message, memorise and send header
159  mRunningStatus_TX = status;
160  mSerial.write(mRunningStatus_TX);
161  }
162  }
163  else
164  {
165  // Don't care about running status, send the status byte.
166  mSerial.write(status);
167  }
168 
169  // Then send data
170  mSerial.write(inData1);
171  if (inType != ProgramChange && inType != AfterTouchChannel)
172  {
173  mSerial.write(inData2);
174  }
175  }
176  else if (inType >= Clock && inType <= SystemReset)
177  {
178  sendRealTime(inType); // System Real-time and 1 byte.
179  }
180 }
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
+
byte StatusByte
Definition: midi_Defs.h:57
+
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
Program Change.
Definition: midi_Defs.h:72
+
void sendRealTime(MidiType inType)
Send a Real Time (one byte) message.
Definition: MIDI.hpp:436
+
#define MIDI_CHANNEL_OMNI
Definition: midi_Defs.h:48
+
Pitch Bend.
Definition: midi_Defs.h:74
+
System Real Time - System Reset.
Definition: midi_Defs.h:85
+
#define MIDI_CHANNEL_OFF
Definition: midi_Defs.h:49
@@ -473,9 +473,9 @@ template<class SerialPort , class Settings > -

Definition at line 266 of file MIDI.hpp.

-
268 {
269  send(AfterTouchChannel, inPressure, 0, inChannel);
270 }
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 265 of file MIDI.hpp.

+
267 {
268  send(AfterTouchChannel, inPressure, 0, inChannel);
269 }
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -532,9 +532,9 @@ template<class SerialPort , class Settings >
See also
Replaces sendPolyPressure (which is now deprecated).
-

Definition at line 279 of file MIDI.hpp.

-
282 {
283  send(AfterTouchPoly, inNoteNumber, inPressure, inChannel);
284 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 278 of file MIDI.hpp.

+
281 {
282  send(AfterTouchPoly, inNoteNumber, inPressure, inChannel);
283 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -591,9 +591,9 @@ template<class SerialPort , class Settings >
See also
MidiControlChangeNumber
-

Definition at line 239 of file MIDI.hpp.

-
242 {
243  send(ControlChange, inControlNumber, inControlValue, inChannel);
244 }
Control Change / Channel Mode.
Definition: midi_Defs.h:72
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 238 of file MIDI.hpp.

+
241 {
242  send(ControlChange, inControlNumber, inControlValue, inChannel);
243 }
Control Change / Channel Mode.
Definition: midi_Defs.h:71
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -650,9 +650,9 @@ template<class SerialPort , class Settings >

Note: you can send NoteOn with zero velocity to make a NoteOff, this is based on the Running Status principle, to avoid sending status messages and thus sending only NoteOn data. sendNoteOff will always send a real NoteOff message. Take a look at the values, names and frequencies of notes here: http://www.phys.unsw.edu.au/jw/notes.html

-

Definition at line 214 of file MIDI.hpp.

-
217 {
218  send(NoteOff, inNoteNumber, inVelocity, inChannel);
219 }
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
-
Note Off.
Definition: midi_Defs.h:69
+

Definition at line 213 of file MIDI.hpp.

+
216 {
217  send(NoteOff, inNoteNumber, inVelocity, inChannel);
218 }
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
+
Note Off.
Definition: midi_Defs.h:68
@@ -709,9 +709,9 @@ template<class SerialPort , class Settings >

Take a look at the values, names and frequencies of notes here: http://www.phys.unsw.edu.au/jw/notes.html

-

Definition at line 195 of file MIDI.hpp.

-
198 {
199  send(NoteOn, inNoteNumber, inVelocity, inChannel);
200 }
Note On.
Definition: midi_Defs.h:70
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 194 of file MIDI.hpp.

+
197 {
198  send(NoteOn, inNoteNumber, inVelocity, inChannel);
199 }
Note On.
Definition: midi_Defs.h:69
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -751,9 +751,9 @@ template<class SerialPort , class Settings >
-

Definition at line 598 of file MIDI.hpp.

-
600 {
601  sendControlChange(DataDecrement, inAmount, inChannel);
602 }
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
+

Definition at line 597 of file MIDI.hpp.

+
599 {
600  sendControlChange(DataDecrement, inAmount, inChannel);
601 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
@@ -793,9 +793,9 @@ template<class SerialPort , class Settings >
-

Definition at line 588 of file MIDI.hpp.

-
590 {
591  sendControlChange(DataIncrement, inAmount, inChannel);
592 }
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
+

Definition at line 587 of file MIDI.hpp.

+
589 {
590  sendControlChange(DataIncrement, inAmount, inChannel);
591 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
@@ -844,11 +844,11 @@ template<class SerialPort , class Settings > -

Definition at line 561 of file MIDI.hpp.

-
563 {;
564  const byte valMsb = 0x7f & (inValue >> 7);
565  const byte valLsb = 0x7f & inValue;
566  sendControlChange(DataEntryMSB, valMsb, inChannel);
567  sendControlChange(DataEntryLSB, valLsb, inChannel);
568 }
Definition: midi_Defs.h:129
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
-
uint8_t byte
Definition: midi_Defs.h:37
-
Definition: midi_Defs.h:144
+

Definition at line 560 of file MIDI.hpp.

+
562 {;
563  const byte valMsb = 0x7f & (inValue >> 7);
564  const byte valLsb = 0x7f & inValue;
565  sendControlChange(DataEntryMSB, valMsb, inChannel);
566  sendControlChange(DataEntryLSB, valLsb, inChannel);
567 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
+
uint8_t byte
Definition: midi_Defs.h:36
+
@@ -904,10 +904,10 @@ template<class SerialPort , class Settings > -

Definition at line 576 of file MIDI.hpp.

-
579 {
580  sendControlChange(DataEntryMSB, inMsb, inChannel);
581  sendControlChange(DataEntryLSB, inLsb, inChannel);
582 }
Definition: midi_Defs.h:129
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
-
Definition: midi_Defs.h:144
+

Definition at line 575 of file MIDI.hpp.

+
578 {
579  sendControlChange(DataEntryMSB, inMsb, inChannel);
580  sendControlChange(DataEntryLSB, inLsb, inChannel);
581 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
+
@@ -956,10 +956,10 @@ template<class SerialPort , class Settings > -

Definition at line 293 of file MIDI.hpp.

-
295 {
296  const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN;
297  send(PitchBend, (bend & 0x7f), (bend >> 7) & 0x7f, inChannel);
298 }
#define MIDI_PITCHBEND_MIN
Definition: midi_Defs.h:52
-
Pitch Bend.
Definition: midi_Defs.h:75
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 292 of file MIDI.hpp.

+
294 {
295  const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN;
296  send(PitchBend, (bend & 0x7f), (bend >> 7) & 0x7f, inChannel);
297 }
#define MIDI_PITCHBEND_MIN
Definition: midi_Defs.h:51
+
Pitch Bend.
Definition: midi_Defs.h:74
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -1008,10 +1008,10 @@ template<class SerialPort , class Settings > -

Definition at line 308 of file MIDI.hpp.

-
310 {
311  const int scale = inPitchValue > 0.0 ? MIDI_PITCHBEND_MAX : MIDI_PITCHBEND_MIN;
312  const int value = int(inPitchValue * double(scale));
313  sendPitchBend(value, inChannel);
314 }
#define MIDI_PITCHBEND_MAX
Definition: midi_Defs.h:53
-
#define MIDI_PITCHBEND_MIN
Definition: midi_Defs.h:52
-
void sendPitchBend(int inPitchValue, Channel inChannel)
Send a Pitch Bend message using a signed integer value.
Definition: MIDI.hpp:293
+

Definition at line 307 of file MIDI.hpp.

+
309 {
310  const int scale = inPitchValue > 0.0 ? MIDI_PITCHBEND_MAX : MIDI_PITCHBEND_MIN;
311  const int value = int(inPitchValue * double(scale));
312  sendPitchBend(value, inChannel);
313 }
#define MIDI_PITCHBEND_MAX
Definition: midi_Defs.h:52
+
#define MIDI_PITCHBEND_MIN
Definition: midi_Defs.h:51
+
void sendPitchBend(int inPitchValue, Channel inChannel)
Send a Pitch Bend message using a signed integer value.
Definition: MIDI.hpp:292
@@ -1068,9 +1068,9 @@ template<class SerialPort , class Settings >
See also
sendAfterTouch to send polyphonic and monophonic AfterTouch messages.
-

Definition at line 254 of file MIDI.hpp.

-
257 {
258  send(AfterTouchPoly, inNoteNumber, inPressure, inChannel);
259 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 253 of file MIDI.hpp.

+
256 {
257  send(AfterTouchPoly, inNoteNumber, inPressure, inChannel);
258 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -1119,9 +1119,9 @@ template<class SerialPort , class Settings > -

Definition at line 226 of file MIDI.hpp.

-
228 {
229  send(ProgramChange, inProgramNumber, 0, inChannel);
230 }
Program Change.
Definition: midi_Defs.h:73
-
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:134
+

Definition at line 225 of file MIDI.hpp.

+
227 {
228  send(ProgramChange, inProgramNumber, 0, inChannel);
229 }
Program Change.
Definition: midi_Defs.h:72
+
void send(MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel)
Generate and send a MIDI message from the values given.
Definition: MIDI.hpp:133
@@ -1160,14 +1160,14 @@ template<class SerialPort , class Settings >
See also
MidiType
-

Definition at line 437 of file MIDI.hpp.

-
438 {
439  // Do not invalidate Running Status for real-time messages
440  // as they can be interleaved within any message.
441 
442  switch (inType)
443  {
444  case Clock:
445  case Start:
446  case Stop:
447  case Continue:
448  case ActiveSensing:
449  case SystemReset:
450  mSerial.write((byte)inType);
451  break;
452  default:
453  // Invalid Real Time marker
454  break;
455  }
456 }
System Real Time - Stop.
Definition: midi_Defs.h:84
-
System Real Time - Timing Clock.
Definition: midi_Defs.h:81
-
System Real Time - Continue.
Definition: midi_Defs.h:83
-
System Real Time - Start.
Definition: midi_Defs.h:82
-
uint8_t byte
Definition: midi_Defs.h:37
-
System Real Time - Active Sensing.
Definition: midi_Defs.h:85
-
System Real Time - System Reset.
Definition: midi_Defs.h:86
+

Definition at line 436 of file MIDI.hpp.

+
437 {
438  // Do not invalidate Running Status for real-time messages
439  // as they can be interleaved within any message.
440 
441  switch (inType)
442  {
443  case Clock:
444  case Start:
445  case Stop:
446  case Continue:
447  case ActiveSensing:
448  case SystemReset:
449  mSerial.write((byte)inType);
450  break;
451  default:
452  // Invalid Real Time marker
453  break;
454  }
455 }
System Real Time - Stop.
Definition: midi_Defs.h:83
+
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
+
System Real Time - Continue.
Definition: midi_Defs.h:82
+
System Real Time - Start.
Definition: midi_Defs.h:81
+
uint8_t byte
Definition: midi_Defs.h:36
+
System Real Time - Active Sensing.
Definition: midi_Defs.h:84
+
System Real Time - System Reset.
Definition: midi_Defs.h:85
@@ -1207,9 +1207,9 @@ template<class SerialPort , class Settings >
-

Definition at line 518 of file MIDI.hpp.

-
520 {
521  sendControlChange(DataDecrement, inAmount, inChannel);
522 }
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
+

Definition at line 517 of file MIDI.hpp.

+
519 {
520  sendControlChange(DataDecrement, inAmount, inChannel);
521 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
@@ -1249,9 +1249,9 @@ template<class SerialPort , class Settings >
-

Definition at line 508 of file MIDI.hpp.

-
510 {
511  sendControlChange(DataIncrement, inAmount, inChannel);
512 }
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
+

Definition at line 507 of file MIDI.hpp.

+
509 {
510  sendControlChange(DataIncrement, inAmount, inChannel);
511 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
@@ -1300,11 +1300,11 @@ template<class SerialPort , class Settings > -

Definition at line 481 of file MIDI.hpp.

-
483 {;
484  const byte valMsb = 0x7f & (inValue >> 7);
485  const byte valLsb = 0x7f & inValue;
486  sendControlChange(DataEntryMSB, valMsb, inChannel);
487  sendControlChange(DataEntryLSB, valLsb, inChannel);
488 }
Definition: midi_Defs.h:129
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
-
uint8_t byte
Definition: midi_Defs.h:37
-
Definition: midi_Defs.h:144
+

Definition at line 480 of file MIDI.hpp.

+
482 {;
483  const byte valMsb = 0x7f & (inValue >> 7);
484  const byte valLsb = 0x7f & inValue;
485  sendControlChange(DataEntryMSB, valMsb, inChannel);
486  sendControlChange(DataEntryLSB, valLsb, inChannel);
487 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
+
uint8_t byte
Definition: midi_Defs.h:36
+
@@ -1360,10 +1360,10 @@ template<class SerialPort , class Settings > -

Definition at line 496 of file MIDI.hpp.

-
499 {
500  sendControlChange(DataEntryMSB, inMsb, inChannel);
501  sendControlChange(DataEntryLSB, inLsb, inChannel);
502 }
Definition: midi_Defs.h:129
-
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:239
-
Definition: midi_Defs.h:144
+

Definition at line 495 of file MIDI.hpp.

+
498 {
499  sendControlChange(DataEntryMSB, inMsb, inChannel);
500  sendControlChange(DataEntryLSB, inLsb, inChannel);
501 }
+
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
Definition: MIDI.hpp:238
+
@@ -1401,10 +1401,10 @@ template<class SerialPort , class Settings > -

Definition at line 405 of file MIDI.hpp.

-
406 {
407  mSerial.write((byte)SongPosition);
408  mSerial.write(inBeats & 0x7f);
409  mSerial.write((inBeats >> 7) & 0x7f);
410 
411  if (Settings::UseRunningStatus)
412  {
413  mRunningStatus_TX = InvalidType;
414  }
415 }
System Common - Song Position Pointer.
Definition: midi_Defs.h:78
-
For notifying errors.
Definition: midi_Defs.h:68
-
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 404 of file MIDI.hpp.

+
405 {
406  mSerial.write((byte)SongPosition);
407  mSerial.write(inBeats & 0x7f);
408  mSerial.write((inBeats >> 7) & 0x7f);
409 
410  if (Settings::UseRunningStatus)
411  {
412  mRunningStatus_TX = InvalidType;
413  }
414 }
System Common - Song Position Pointer.
Definition: midi_Defs.h:77
+
For notifying errors.
Definition: midi_Defs.h:67
+
uint8_t byte
Definition: midi_Defs.h:36
@@ -1436,10 +1436,10 @@ template<class SerialPort , class Settings >

Send a Song Select message.

-

Definition at line 419 of file MIDI.hpp.

-
420 {
421  mSerial.write((byte)SongSelect);
422  mSerial.write(inSongNumber & 0x7f);
423 
424  if (Settings::UseRunningStatus)
425  {
426  mRunningStatus_TX = InvalidType;
427  }
428 }
System Common - Song Select.
Definition: midi_Defs.h:79
-
For notifying errors.
Definition: midi_Defs.h:68
-
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 418 of file MIDI.hpp.

+
419 {
420  mSerial.write((byte)SongSelect);
421  mSerial.write(inSongNumber & 0x7f);
422 
423  if (Settings::UseRunningStatus)
424  {
425  mRunningStatus_TX = InvalidType;
426  }
427 }
System Common - Song Select.
Definition: midi_Defs.h:78
+
For notifying errors.
Definition: midi_Defs.h:67
+
uint8_t byte
Definition: midi_Defs.h:36
@@ -1495,8 +1495,8 @@ template<class SerialPort , class Settings > -

Definition at line 326 of file MIDI.hpp.

-
329 {
330  const bool writeBeginEndBytes = !inArrayContainsBoundaries;
331 
332  if (writeBeginEndBytes)
333  {
334  mSerial.write(0xf0);
335  }
336 
337  for (unsigned i = 0; i < inLength; ++i)
338  {
339  mSerial.write(inArray[i]);
340  }
341 
342  if (writeBeginEndBytes)
343  {
344  mSerial.write(0xf7);
345  }
346 
347  if (Settings::UseRunningStatus)
348  {
349  mRunningStatus_TX = InvalidType;
350  }
351 }
For notifying errors.
Definition: midi_Defs.h:68
+

Definition at line 325 of file MIDI.hpp.

+
328 {
329  const bool writeBeginEndBytes = !inArrayContainsBoundaries;
330 
331  if (writeBeginEndBytes)
332  {
333  mSerial.write(0xf0);
334  }
335 
336  for (unsigned i = 0; i < inLength; ++i)
337  {
338  mSerial.write(inArray[i]);
339  }
340 
341  if (writeBeginEndBytes)
342  {
343  mSerial.write(0xf7);
344  }
345 
346  if (Settings::UseRunningStatus)
347  {
348  mRunningStatus_TX = InvalidType;
349  }
350 }
For notifying errors.
Definition: midi_Defs.h:67
@@ -1545,9 +1545,9 @@ template<class SerialPort , class Settings > -

Definition at line 376 of file MIDI.hpp.

-
378 {
379  const byte data = (((inTypeNibble & 0x07) << 4) | (inValuesNibble & 0x0f));
380  sendTimeCodeQuarterFrame(data);
381 }
void sendTimeCodeQuarterFrame(DataByte inTypeNibble, DataByte inValuesNibble)
Send a MIDI Time Code Quarter Frame.
Definition: MIDI.hpp:376
-
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 375 of file MIDI.hpp.

+
377 {
378  const byte data = (((inTypeNibble & 0x07) << 4) | (inValuesNibble & 0x0f));
380 }
void sendTimeCodeQuarterFrame(DataByte inTypeNibble, DataByte inValuesNibble)
Send a MIDI Time Code Quarter Frame.
Definition: MIDI.hpp:375
+
uint8_t byte
Definition: midi_Defs.h:36
@@ -1585,10 +1585,10 @@ template<class SerialPort , class Settings > -

Definition at line 390 of file MIDI.hpp.

-
391 {
392  mSerial.write((byte)TimeCodeQuarterFrame);
393  mSerial.write(inData);
394 
395  if (Settings::UseRunningStatus)
396  {
397  mRunningStatus_TX = InvalidType;
398  }
399 }
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:77
-
For notifying errors.
Definition: midi_Defs.h:68
-
uint8_t byte
Definition: midi_Defs.h:37
+

Definition at line 389 of file MIDI.hpp.

+
390 {
391  mSerial.write((byte)TimeCodeQuarterFrame);
392  mSerial.write(inData);
393 
394  if (Settings::UseRunningStatus)
395  {
396  mRunningStatus_TX = InvalidType;
397  }
398 }
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:76
+
For notifying errors.
Definition: midi_Defs.h:67
+
uint8_t byte
Definition: midi_Defs.h:36
@@ -1620,9 +1620,9 @@ template<class SerialPort , class Settings >

Send a Tune Request message.

When a MIDI unit receives this message, it should tune its oscillators (if equipped with any).

-

Definition at line 359 of file MIDI.hpp.

-
360 {
361  mSerial.write(TuneRequest);
362 
363  if (Settings::UseRunningStatus)
364  {
365  mRunningStatus_TX = InvalidType;
366  }
367 }
For notifying errors.
Definition: midi_Defs.h:68
-
System Common - Tune Request.
Definition: midi_Defs.h:80
+

Definition at line 358 of file MIDI.hpp.

+
359 {
360  mSerial.write(TuneRequest);
361 
362  if (Settings::UseRunningStatus)
363  {
364  mRunningStatus_TX = InvalidType;
365  }
366 }
For notifying errors.
Definition: midi_Defs.h:67
+
System Common - Tune Request.
Definition: midi_Defs.h:79
@@ -1631,7 +1631,7 @@ template<class SerialPort , class Settings >

Check if a valid message is stored in the structure.

-

Definition at line 1064 of file MIDI.hpp.

-
1065 {
1066  return mMessage.valid;
1067 }
bool valid
Definition: midi_Message.h:90
+

Definition at line 1063 of file MIDI.hpp.

+
1064 {
1065  return mMessage.valid;
1066 }
bool valid
Definition: midi_Message.h:89
@@ -198,8 +198,8 @@ template<class SerialPort , class Settings >

Get the channel of the message stored in the structure.

Returns
Channel range is 1 to 16. For non-channel messages, this will return 0.
-

Definition at line 1022 of file MIDI.hpp.

-
1023 {
1024  return mMessage.channel;
1025 }
Channel channel
Definition: midi_Message.h:62
+

Definition at line 1021 of file MIDI.hpp.

+
1022 {
1023  return mMessage.channel;
1024 }
Channel channel
Definition: midi_Message.h:61
@@ -231,8 +231,8 @@ template<class SerialPort , class Settings >

Returns channel in the range 1-16.

-

Definition at line 1118 of file MIDI.hpp.

-
1119 {
1120  return (inStatus & 0x0f) + 1;
1121 }
+

Definition at line 1117 of file MIDI.hpp.

+
1118 {
1119  return (inStatus & 0x0f) + 1;
1120 }
@@ -262,8 +262,8 @@ template<class SerialPort , class Settings >

Get the first data byte of the last received message.

-

Definition at line 1029 of file MIDI.hpp.

-
1030 {
1031  return mMessage.data1;
1032 }
DataByte data1
Definition: midi_Message.h:72
+

Definition at line 1028 of file MIDI.hpp.

+
1029 {
1030  return mMessage.data1;
1031 }
DataByte data1
Definition: midi_Message.h:71
@@ -294,8 +294,8 @@ template<class SerialPort , class Settings >

Get the second data byte of the last received message.

-

Definition at line 1036 of file MIDI.hpp.

-
1037 {
1038  return mMessage.data2;
1039 }
DataByte data2
Definition: midi_Message.h:78
+

Definition at line 1035 of file MIDI.hpp.

+
1036 {
1037  return mMessage.data2;
1038 }
DataByte data2
Definition: midi_Message.h:77
@@ -324,8 +324,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1072 of file MIDI.hpp.

-
1073 {
1074  return mInputChannel;
1075 }
+

Definition at line 1071 of file MIDI.hpp.

+
1072 {
1073  return mInputChannel;
1074 }
@@ -356,8 +356,8 @@ template<class SerialPort , class Settings >

Get the System Exclusive byte array.

See also
getSysExArrayLength to get the array's length in bytes.
-

Definition at line 1046 of file MIDI.hpp.

-
1047 {
1048  return mMessage.sysexArray;
1049 }
DataByte sysexArray[sSysExMaxSize]
Definition: midi_Message.h:84
+

Definition at line 1045 of file MIDI.hpp.

+
1046 {
1047  return mMessage.sysexArray;
1048 }
DataByte sysexArray[sSysExMaxSize]
Definition: midi_Message.h:83
@@ -389,8 +389,8 @@ template<class SerialPort , class Settings >

Get the lenght of the System Exclusive array.

It is coded using data1 as LSB and data2 as MSB.

Returns
The array's length, in bytes.
-

Definition at line 1057 of file MIDI.hpp.

-
1058 {
1059  return mMessage.getSysExSize();
1060 }
unsigned getSysExSize() const
Definition: midi_Message.h:92
+

Definition at line 1056 of file MIDI.hpp.

+
1057 {
1058  return mMessage.getSysExSize();
1059 }
unsigned getSysExSize() const
Definition: midi_Message.h:91
@@ -422,8 +422,8 @@ template<class SerialPort , class Settings >

Get the last received message's type.

Returns an enumerated type.

See also
MidiType
-

Definition at line 1011 of file MIDI.hpp.

-
1012 {
1013  return mMessage.type;
1014 }
MidiType type
Definition: midi_Message.h:67
+

Definition at line 1010 of file MIDI.hpp.

+
1011 {
1012  return mMessage.type;
1013 }
MidiType type
Definition: midi_Message.h:66
@@ -456,9 +456,9 @@ template<class SerialPort , class Settings >

Extract an enumerated MIDI type from a status byte.

This is a utility static method, used internally, made public so you can handle MidiTypes more easily.

-

Definition at line 1095 of file MIDI.hpp.

-
1096 {
1097  if ((inStatus < 0x80) ||
1098  (inStatus == 0xf4) ||
1099  (inStatus == 0xf5) ||
1100  (inStatus == 0xf9) ||
1101  (inStatus == 0xfD))
1102  {
1103  // Data bytes and undefined.
1104  return InvalidType;
1105  }
1106  if (inStatus < 0xf0)
1107  {
1108  // Channel message, remove channel nibble.
1109  return MidiType(inStatus & 0xf0);
1110  }
1111 
1112  return MidiType(inStatus);
1113 }
For notifying errors.
Definition: midi_Defs.h:68
-
MidiType
Definition: midi_Defs.h:66
+

Definition at line 1094 of file MIDI.hpp.

+
1095 {
1096  if ((inStatus < 0x80) ||
1097  (inStatus == 0xf4) ||
1098  (inStatus == 0xf5) ||
1099  (inStatus == 0xf9) ||
1100  (inStatus == 0xfD))
1101  {
1102  // Data bytes and undefined.
1103  return InvalidType;
1104  }
1105  if (inStatus < 0xf0)
1106  {
1107  // Channel message, remove channel nibble.
1108  return MidiType(inStatus & 0xf0);
1109  }
1110 
1111  return MidiType(inStatus);
1112 }
For notifying errors.
Definition: midi_Defs.h:67
+
MidiType
Definition: midi_Defs.h:65
@@ -488,14 +488,14 @@ template<class SerialPort , class Settings >
-

Definition at line 1124 of file MIDI.hpp.

-
1125 {
1126  return (inType == NoteOff ||
1127  inType == NoteOn ||
1128  inType == ControlChange ||
1129  inType == AfterTouchPoly ||
1130  inType == AfterTouchChannel ||
1131  inType == PitchBend ||
1132  inType == ProgramChange);
1133 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
Program Change.
Definition: midi_Defs.h:73
-
Note On.
Definition: midi_Defs.h:70
-
Control Change / Channel Mode.
Definition: midi_Defs.h:72
-
Pitch Bend.
Definition: midi_Defs.h:75
-
Note Off.
Definition: midi_Defs.h:69
+

Definition at line 1123 of file MIDI.hpp.

+
1124 {
1125  return (inType == NoteOff ||
1126  inType == NoteOn ||
1127  inType == ControlChange ||
1128  inType == AfterTouchPoly ||
1129  inType == AfterTouchChannel ||
1130  inType == PitchBend ||
1131  inType == ProgramChange);
1132 }
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
Program Change.
Definition: midi_Defs.h:72
+
Note On.
Definition: midi_Defs.h:69
+
Control Change / Channel Mode.
Definition: midi_Defs.h:71
+
Pitch Bend.
Definition: midi_Defs.h:74
+
Note Off.
Definition: midi_Defs.h:68
@@ -530,8 +530,8 @@ template<class SerialPort , class Settings > If the Thru is enabled and the message matches the filter, it is sent back on the MIDI output.
See also
see setInputChannel()
-

Definition at line 644 of file MIDI.hpp.

-
645 {
646  return read(mInputChannel);
647 }
bool read()
Read messages from the serial port using the main input channel.
Definition: MIDI.hpp:644
+

Definition at line 643 of file MIDI.hpp.

+
644 {
645  return read(mInputChannel);
646 }
bool read()
Read messages from the serial port using the main input channel.
Definition: MIDI.hpp:643
@@ -563,8 +563,8 @@ template<class SerialPort , class Settings >

Read messages on a specified channel.

-

Definition at line 652 of file MIDI.hpp.

-
653 {
654  if (inChannel >= MIDI_CHANNEL_OFF)
655  return false; // MIDI Input disabled.
656 
657  if (!parse())
658  return false;
659 
660  handleNullVelocityNoteOnAsNoteOff();
661  const bool channelMatch = inputFilter(inChannel);
662 
663  if (channelMatch)
664  {
665  launchCallback();
666  }
667 
668  thruFilter(inChannel);
669 
670  return channelMatch;
671 }
#define MIDI_CHANNEL_OFF
Definition: midi_Defs.h:50
+

Definition at line 651 of file MIDI.hpp.

+
652 {
653  if (inChannel >= MIDI_CHANNEL_OFF)
654  return false; // MIDI Input disabled.
655 
656  if (!parse())
657  return false;
658 
659  handleNullVelocityNoteOnAsNoteOff();
660  const bool channelMatch = inputFilter(inChannel);
661 
662  if (channelMatch)
663  {
664  launchCallback();
665  }
666 
667  thruFilter(inChannel);
668 
669  return channelMatch;
670 }
#define MIDI_CHANNEL_OFF
Definition: midi_Defs.h:49
@@ -602,8 +602,8 @@ template<class SerialPort , class Settings > -

Definition at line 1082 of file MIDI.hpp.

-
1083 {
1084  mInputChannel = inChannel;
1085 }
+

Definition at line 1081 of file MIDI.hpp.

+
1082 {
1083  mInputChannel = inChannel;
1084 }
@@ -611,7 +611,7 @@ template<class SerialPort , class Settings > -

Definition at line 1167 of file MIDI.hpp.

-
1168 {
1169  switch (inType)
1170  {
1171  case NoteOff: mNoteOffCallback = 0; break;
1172  case NoteOn: mNoteOnCallback = 0; break;
1173  case AfterTouchPoly: mAfterTouchPolyCallback = 0; break;
1174  case ControlChange: mControlChangeCallback = 0; break;
1175  case ProgramChange: mProgramChangeCallback = 0; break;
1176  case AfterTouchChannel: mAfterTouchChannelCallback = 0; break;
1177  case PitchBend: mPitchBendCallback = 0; break;
1178  case SystemExclusive: mSystemExclusiveCallback = 0; break;
1179  case TimeCodeQuarterFrame: mTimeCodeQuarterFrameCallback = 0; break;
1180  case SongPosition: mSongPositionCallback = 0; break;
1181  case SongSelect: mSongSelectCallback = 0; break;
1182  case TuneRequest: mTuneRequestCallback = 0; break;
1183  case Clock: mClockCallback = 0; break;
1184  case Start: mStartCallback = 0; break;
1185  case Continue: mContinueCallback = 0; break;
1186  case Stop: mStopCallback = 0; break;
1187  case ActiveSensing: mActiveSensingCallback = 0; break;
1188  case SystemReset: mSystemResetCallback = 0; break;
1189  default:
1190  break;
1191  }
1192 }
System Common - Song Position Pointer.
Definition: midi_Defs.h:78
-
Polyphonic AfterTouch.
Definition: midi_Defs.h:71
-
System Common - Song Select.
Definition: midi_Defs.h:79
-
System Exclusive.
Definition: midi_Defs.h:76
-
System Real Time - Stop.
Definition: midi_Defs.h:84
-
System Real Time - Timing Clock.
Definition: midi_Defs.h:81
-
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:77
-
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:74
-
Program Change.
Definition: midi_Defs.h:73
-
System Real Time - Continue.
Definition: midi_Defs.h:83
-
System Real Time - Start.
Definition: midi_Defs.h:82
-
Note On.
Definition: midi_Defs.h:70
-
Control Change / Channel Mode.
Definition: midi_Defs.h:72
-
System Common - Tune Request.
Definition: midi_Defs.h:80
-
Pitch Bend.
Definition: midi_Defs.h:75
-
System Real Time - Active Sensing.
Definition: midi_Defs.h:85
-
Note Off.
Definition: midi_Defs.h:69
-
System Real Time - System Reset.
Definition: midi_Defs.h:86
+

Definition at line 1166 of file MIDI.hpp.

+
1167 {
1168  switch (inType)
1169  {
1170  case NoteOff: mNoteOffCallback = 0; break;
1171  case NoteOn: mNoteOnCallback = 0; break;
1172  case AfterTouchPoly: mAfterTouchPolyCallback = 0; break;
1173  case ControlChange: mControlChangeCallback = 0; break;
1174  case ProgramChange: mProgramChangeCallback = 0; break;
1175  case AfterTouchChannel: mAfterTouchChannelCallback = 0; break;
1176  case PitchBend: mPitchBendCallback = 0; break;
1177  case SystemExclusive: mSystemExclusiveCallback = 0; break;
1178  case TimeCodeQuarterFrame: mTimeCodeQuarterFrameCallback = 0; break;
1179  case SongPosition: mSongPositionCallback = 0; break;
1180  case SongSelect: mSongSelectCallback = 0; break;
1181  case TuneRequest: mTuneRequestCallback = 0; break;
1182  case Clock: mClockCallback = 0; break;
1183  case Start: mStartCallback = 0; break;
1184  case Continue: mContinueCallback = 0; break;
1185  case Stop: mStopCallback = 0; break;
1186  case ActiveSensing: mActiveSensingCallback = 0; break;
1187  case SystemReset: mSystemResetCallback = 0; break;
1188  default:
1189  break;
1190  }
1191 }
System Common - Song Position Pointer.
Definition: midi_Defs.h:77
+
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
+
System Common - Song Select.
Definition: midi_Defs.h:78
+
System Exclusive.
Definition: midi_Defs.h:75
+
System Real Time - Stop.
Definition: midi_Defs.h:83
+
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
+
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:76
+
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
+
Program Change.
Definition: midi_Defs.h:72
+
System Real Time - Continue.
Definition: midi_Defs.h:82
+
System Real Time - Start.
Definition: midi_Defs.h:81
+
Note On.
Definition: midi_Defs.h:69
+
Control Change / Channel Mode.
Definition: midi_Defs.h:71
+
System Common - Tune Request.
Definition: midi_Defs.h:79
+
Pitch Bend.
Definition: midi_Defs.h:74
+
System Real Time - Active Sensing.
Definition: midi_Defs.h:84
+
Note Off.
Definition: midi_Defs.h:68
+
System Real Time - System Reset.
Definition: midi_Defs.h:85
@@ -213,8 +213,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1157 of file MIDI.hpp.

-
1157 { mActiveSensingCallback = fptr; }
+

Definition at line 1156 of file MIDI.hpp.

+
1156 { mActiveSensingCallback = fptr; }
@@ -243,8 +243,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1146 of file MIDI.hpp.

-
1146 { mAfterTouchChannelCallback = fptr; }
+

Definition at line 1145 of file MIDI.hpp.

+
1145 { mAfterTouchChannelCallback = fptr; }
@@ -273,8 +273,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1143 of file MIDI.hpp.

-
1143 { mAfterTouchPolyCallback = fptr; }
+

Definition at line 1142 of file MIDI.hpp.

+
1142 { mAfterTouchPolyCallback = fptr; }
@@ -303,8 +303,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1153 of file MIDI.hpp.

-
1153 { mClockCallback = fptr; }
+

Definition at line 1152 of file MIDI.hpp.

+
1152 { mClockCallback = fptr; }
@@ -333,8 +333,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1155 of file MIDI.hpp.

-
1155 { mContinueCallback = fptr; }
+

Definition at line 1154 of file MIDI.hpp.

+
1154 { mContinueCallback = fptr; }
@@ -363,8 +363,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1144 of file MIDI.hpp.

-
1144 { mControlChangeCallback = fptr; }
+

Definition at line 1143 of file MIDI.hpp.

+
1143 { mControlChangeCallback = fptr; }
@@ -393,8 +393,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1141 of file MIDI.hpp.

-
1141 { mNoteOffCallback = fptr; }
+

Definition at line 1140 of file MIDI.hpp.

+
1140 { mNoteOffCallback = fptr; }
@@ -423,8 +423,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1142 of file MIDI.hpp.

-
1142 { mNoteOnCallback = fptr; }
+

Definition at line 1141 of file MIDI.hpp.

+
1141 { mNoteOnCallback = fptr; }
@@ -453,8 +453,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1147 of file MIDI.hpp.

-
1147 { mPitchBendCallback = fptr; }
+

Definition at line 1146 of file MIDI.hpp.

+
1146 { mPitchBendCallback = fptr; }
@@ -483,8 +483,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1145 of file MIDI.hpp.

-
1145 { mProgramChangeCallback = fptr; }
+

Definition at line 1144 of file MIDI.hpp.

+
1144 { mProgramChangeCallback = fptr; }
@@ -513,8 +513,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1150 of file MIDI.hpp.

-
1150 { mSongPositionCallback = fptr; }
+

Definition at line 1149 of file MIDI.hpp.

+
1149 { mSongPositionCallback = fptr; }
@@ -543,8 +543,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1151 of file MIDI.hpp.

-
1151 { mSongSelectCallback = fptr; }
+

Definition at line 1150 of file MIDI.hpp.

+
1150 { mSongSelectCallback = fptr; }
@@ -573,8 +573,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1154 of file MIDI.hpp.

-
1154 { mStartCallback = fptr; }
+

Definition at line 1153 of file MIDI.hpp.

+
1153 { mStartCallback = fptr; }
@@ -603,8 +603,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1156 of file MIDI.hpp.

-
1156 { mStopCallback = fptr; }
+

Definition at line 1155 of file MIDI.hpp.

+
1155 { mStopCallback = fptr; }
@@ -633,8 +633,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1148 of file MIDI.hpp.

-
1148 { mSystemExclusiveCallback = fptr; }
+

Definition at line 1147 of file MIDI.hpp.

+
1147 { mSystemExclusiveCallback = fptr; }
@@ -663,8 +663,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1158 of file MIDI.hpp.

-
1158 { mSystemResetCallback = fptr; }
+

Definition at line 1157 of file MIDI.hpp.

+
1157 { mSystemResetCallback = fptr; }
@@ -693,8 +693,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1149 of file MIDI.hpp.

-
1149 { mTimeCodeQuarterFrameCallback = fptr; }
+

Definition at line 1148 of file MIDI.hpp.

+
1148 { mTimeCodeQuarterFrameCallback = fptr; }
@@ -723,8 +723,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1152 of file MIDI.hpp.

-
1152 { mTuneRequestCallback = fptr; }
+

Definition at line 1151 of file MIDI.hpp.

+
1151 { mTuneRequestCallback = fptr; }
@@ -732,7 +732,7 @@ template<class SerialPort , class Settings >
-

Definition at line 1260 of file MIDI.hpp.

-
1261 {
1262  return mThruFilterMode;
1263 }
+

Definition at line 1259 of file MIDI.hpp.

+
1260 {
1261  return mThruFilterMode;
1262 }
@@ -157,8 +157,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1266 of file MIDI.hpp.

-
1267 {
1268  return mThruActivated;
1269 }
+

Definition at line 1265 of file MIDI.hpp.

+
1266 {
1267  return mThruActivated;
1268 }
@@ -196,8 +196,8 @@ template<class SerialPort , class Settings >
See also
Thru::Mode
-

Definition at line 1253 of file MIDI.hpp.

-
1254 {
1255  mThruFilterMode = inThruFilterMode;
1256  mThruActivated = mThruFilterMode != Thru::Off;
1257 }
Thru disabled (nothing passes through).
Definition: midi_Defs.h:96
+

Definition at line 1252 of file MIDI.hpp.

+
1253 {
1254  mThruFilterMode = inThruFilterMode;
1255  mThruActivated = mThruFilterMode != Thru::Off;
1256 }
Thru disabled (nothing passes through).
Definition: midi_Defs.h:95
@@ -226,8 +226,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1279 of file MIDI.hpp.

-
1280 {
1281  mThruActivated = false;
1282  mThruFilterMode = Thru::Off;
1283 }
Thru disabled (nothing passes through).
Definition: midi_Defs.h:96
+

Definition at line 1278 of file MIDI.hpp.

+
1279 {
1280  mThruActivated = false;
1281  mThruFilterMode = Thru::Off;
1282 }
Thru disabled (nothing passes through).
Definition: midi_Defs.h:95
@@ -257,8 +257,8 @@ template<class SerialPort , class Settings >
-

Definition at line 1272 of file MIDI.hpp.

-
1273 {
1274  mThruActivated = true;
1275  mThruFilterMode = inThruFilterMode;
1276 }
+

Definition at line 1271 of file MIDI.hpp.

+
1272 {
1273  mThruActivated = true;
1274  mThruFilterMode = inThruFilterMode;
1275 }
@@ -266,7 +266,7 @@ template<class SerialPort , class Settings >
-

Definition at line 49 of file MIDI.h.

+

Definition at line 48 of file MIDI.h.

@@ -343,9 +343,9 @@ template<class SerialPort , class Settings >

Constructor for MidiInterface.

-

Definition at line 35 of file MIDI.hpp.

-
36  : mSerial(inSerial)
37  , mInputChannel(0)
38  , mRunningStatus_RX(InvalidType)
39  , mRunningStatus_TX(InvalidType)
40  , mPendingMessageExpectedLenght(0)
41  , mPendingMessageIndex(0)
42  , mCurrentRpnNumber(0xffff)
43  , mCurrentNrpnNumber(0xffff)
44  , mThruActivated(true)
45  , mThruFilterMode(Thru::Full)
46 {
47  mNoteOffCallback = 0;
48  mNoteOnCallback = 0;
49  mAfterTouchPolyCallback = 0;
50  mControlChangeCallback = 0;
51  mProgramChangeCallback = 0;
52  mAfterTouchChannelCallback = 0;
53  mPitchBendCallback = 0;
54  mSystemExclusiveCallback = 0;
55  mTimeCodeQuarterFrameCallback = 0;
56  mSongPositionCallback = 0;
57  mSongSelectCallback = 0;
58  mTuneRequestCallback = 0;
59  mClockCallback = 0;
60  mStartCallback = 0;
61  mContinueCallback = 0;
62  mStopCallback = 0;
63  mActiveSensingCallback = 0;
64  mSystemResetCallback = 0;
65 }
For notifying errors.
Definition: midi_Defs.h:68
-
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:97
+

Definition at line 34 of file MIDI.hpp.

+
35  : mSerial(inSerial)
36  , mInputChannel(0)
37  , mRunningStatus_RX(InvalidType)
38  , mRunningStatus_TX(InvalidType)
39  , mPendingMessageExpectedLenght(0)
40  , mPendingMessageIndex(0)
41  , mCurrentRpnNumber(0xffff)
42  , mCurrentNrpnNumber(0xffff)
43  , mThruActivated(true)
44  , mThruFilterMode(Thru::Full)
45 {
46  mNoteOffCallback = 0;
47  mNoteOnCallback = 0;
48  mAfterTouchPolyCallback = 0;
49  mControlChangeCallback = 0;
50  mProgramChangeCallback = 0;
51  mAfterTouchChannelCallback = 0;
52  mPitchBendCallback = 0;
53  mSystemExclusiveCallback = 0;
54  mTimeCodeQuarterFrameCallback = 0;
55  mSongPositionCallback = 0;
56  mSongSelectCallback = 0;
57  mTuneRequestCallback = 0;
58  mClockCallback = 0;
59  mStartCallback = 0;
60  mContinueCallback = 0;
61  mStopCallback = 0;
62  mActiveSensingCallback = 0;
63  mSystemResetCallback = 0;
64 }
For notifying errors.
Definition: midi_Defs.h:67
+
Fully enabled Thru (every incoming message is sent back).
Definition: midi_Defs.h:96
@@ -377,8 +377,8 @@ template<class SerialPort , class Settings >

Destructor for MidiInterface.

This is not really useful for the Arduino, as it is never called...

-

Definition at line 72 of file MIDI.hpp.

-
73 {
74 }
+

Definition at line 71 of file MIDI.hpp.

+
72 {
73 }

Member Function Documentation

@@ -406,14 +406,14 @@ template<class SerialPort , class Settings >
  • Full thru mirroring
  • -

    Definition at line 85 of file MIDI.hpp.

    -
    86 {
    87  // Initialise the Serial port
    88 #if defined(FSE_AVR)
    89  mSerial. template open<Settings::BaudRate>();
    90 #else
    91  mSerial.begin(Settings::BaudRate);
    92 #endif
    93 
    94  mInputChannel = inChannel;
    95  mRunningStatus_TX = InvalidType;
    96  mRunningStatus_RX = InvalidType;
    97 
    98  mPendingMessageIndex = 0;
    99  mPendingMessageExpectedLenght = 0;
    100 
    101  mCurrentRpnNumber = 0xffff;
    102  mCurrentNrpnNumber = 0xffff;
    103 
    104  mMessage.valid = false;
    105  mMessage.type = InvalidType;
    106  mMessage.channel = 0;
    107  mMessage.data1 = 0;
    108  mMessage.data2 = 0;
    109 
    110  mThruFilterMode = Thru::Full;
    111  mThruActivated = true;
    112 }
    DataByte data1
    Definition: midi_Message.h:72
    -
    DataByte data2
    Definition: midi_Message.h:78
    -
    MidiType type
    Definition: midi_Message.h:67
    -
    For notifying errors.
    Definition: midi_Defs.h:68
    -
    bool valid
    Definition: midi_Message.h:90
    -
    Fully enabled Thru (every incoming message is sent back).
    Definition: midi_Defs.h:97
    -
    Channel channel
    Definition: midi_Message.h:62
    +

    Definition at line 84 of file MIDI.hpp.

    +
    85 {
    86  // Initialise the Serial port
    87 #if defined(FSE_AVR)
    88  mSerial. template open<Settings::BaudRate>();
    89 #else
    90  mSerial.begin(Settings::BaudRate);
    91 #endif
    92 
    93  mInputChannel = inChannel;
    94  mRunningStatus_TX = InvalidType;
    95  mRunningStatus_RX = InvalidType;
    96 
    97  mPendingMessageIndex = 0;
    98  mPendingMessageExpectedLenght = 0;
    99 
    100  mCurrentRpnNumber = 0xffff;
    101  mCurrentNrpnNumber = 0xffff;
    102 
    103  mMessage.valid = false;
    104  mMessage.type = InvalidType;
    105  mMessage.channel = 0;
    106  mMessage.data1 = 0;
    107  mMessage.data2 = 0;
    108 
    109  mThruFilterMode = Thru::Full;
    110  mThruActivated = true;
    111 }
    DataByte data1
    Definition: midi_Message.h:71
    +
    DataByte data2
    Definition: midi_Message.h:77
    +
    MidiType type
    Definition: midi_Message.h:66
    +
    For notifying errors.
    Definition: midi_Defs.h:67
    +
    bool valid
    Definition: midi_Message.h:89
    +
    Fully enabled Thru (every incoming message is sent back).
    Definition: midi_Defs.h:96
    +
    Channel channel
    Definition: midi_Message.h:61
    @@ -427,7 +427,7 @@ template<class SerialPort , class Settings >
    -

    Definition at line 92 of file midi_Message.h.

    -
    93  {
    94  const unsigned size = unsigned(data2) << 8 | data1;
    95  return size > sSysExMaxSize ? sSysExMaxSize : size;
    96  }
    DataByte data1
    Definition: midi_Message.h:72
    -
    static const unsigned sSysExMaxSize
    Definition: midi_Message.h:57
    -
    DataByte data2
    Definition: midi_Message.h:78
    +

    Definition at line 91 of file midi_Message.h.

    +
    92  {
    93  const unsigned size = unsigned(data2) << 8 | data1;
    94  return size > sSysExMaxSize ? sSysExMaxSize : size;
    95  }
    DataByte data1
    Definition: midi_Message.h:71
    +
    static const unsigned sSysExMaxSize
    Definition: midi_Message.h:56
    +
    DataByte data2
    Definition: midi_Message.h:77
    @@ -217,7 +217,7 @@ template<unsigned SysExMaxSize>

    The MIDI channel on which the message was recieved.
    Value goes from 1 to 16.

    -

    Definition at line 62 of file midi_Message.h.

    +

    Definition at line 61 of file midi_Message.h.

    @@ -237,7 +237,7 @@ template<unsigned SysExMaxSize>

    The first data byte.
    Value goes from 0 to 127.

    -

    Definition at line 72 of file midi_Message.h.

    +

    Definition at line 71 of file midi_Message.h.

    @@ -257,7 +257,7 @@ template<unsigned SysExMaxSize>

    The second data byte. If the message is only 2 bytes long, this one is null.
    Value goes from 0 to 127.

    -

    Definition at line 78 of file midi_Message.h.

    +

    Definition at line 77 of file midi_Message.h.

    @@ -284,7 +284,7 @@ template<unsigned SysExMaxSize>

    The maximum size for the System Exclusive array.

    -

    Definition at line 57 of file midi_Message.h.

    +

    Definition at line 56 of file midi_Message.h.

    @@ -304,7 +304,7 @@ template<unsigned SysExMaxSize>

    System Exclusive dedicated byte array.
    Array length is stocked on 16 bits, in data1 (LSB) and data2 (MSB)

    -

    Definition at line 84 of file midi_Message.h.

    +

    Definition at line 83 of file midi_Message.h.

    @@ -323,7 +323,7 @@ template<unsigned SysExMaxSize>

    The type of the message (see the MidiType enum for types reference)

    -

    Definition at line 67 of file midi_Message.h.

    +

    Definition at line 66 of file midi_Message.h.

    @@ -342,7 +342,7 @@ template<unsigned SysExMaxSize>

    This boolean indicates if the message is valid or not. There is no channel consideration here, validity means the message respects the MIDI norm.

    -

    Definition at line 90 of file midi_Message.h.

    +

    Definition at line 89 of file midi_Message.h.

    @@ -355,7 +355,7 @@ template<unsigned SysExMaxSize>
    -

    Definition at line 34 of file midi_RingBuffer.hpp.

    -
    35  : mWriteHead(mData)
    36  , mReadHead(mData)
    37 {
    38  memset(mData, DataType(0), Size * sizeof(DataType));
    39 }
    +

    Definition at line 33 of file midi_RingBuffer.hpp.

    +
    34  : mWriteHead(mData)
    35  , mReadHead(mData)
    36 {
    37  memset(mData, DataType(0), Size * sizeof(DataType));
    38 }
    @@ -156,8 +156,8 @@ template<typename DataType , int Size>
    -

    Definition at line 42 of file midi_RingBuffer.hpp.

    -
    43 {
    44 }
    +

    Definition at line 41 of file midi_RingBuffer.hpp.

    +
    42 {
    43 }

    Member Function Documentation

    @@ -178,8 +178,8 @@ template<typename DataType , int Size>
    -

    Definition at line 93 of file midi_RingBuffer.hpp.

    -
    94 {
    95  memset(mData, DataType(0), Size * sizeof(DataType));
    96  mReadHead = mData;
    97  mWriteHead = mData;
    98 }
    +

    Definition at line 92 of file midi_RingBuffer.hpp.

    +
    93 {
    94  memset(mData, DataType(0), Size * sizeof(DataType));
    95  mReadHead = mData;
    96  mWriteHead = mData;
    97 }
    @@ -199,8 +199,8 @@ template<typename DataType , int Size>
    -

    Definition at line 49 of file midi_RingBuffer.hpp.

    -
    50 {
    51  if (mReadHead == mWriteHead)
    52  {
    53  return 0;
    54  }
    55  else if (mWriteHead > mReadHead)
    56  {
    57  return int(mWriteHead - mReadHead);
    58  }
    59  else
    60  {
    61  return int(mWriteHead - mData) + Size - int(mReadHead - mData);
    62  }
    63 }
    +

    Definition at line 48 of file midi_RingBuffer.hpp.

    +
    49 {
    50  if (mReadHead == mWriteHead)
    51  {
    52  return 0;
    53  }
    54  else if (mWriteHead > mReadHead)
    55  {
    56  return int(mWriteHead - mReadHead);
    57  }
    58  else
    59  {
    60  return int(mWriteHead - mData) + Size - int(mReadHead - mData);
    61  }
    62 }
    @@ -220,8 +220,8 @@ template<typename DataType , int Size>
    -

    Definition at line 66 of file midi_RingBuffer.hpp.

    -
    67 {
    68  return mReadHead == mWriteHead;
    69 }
    +

    Definition at line 65 of file midi_RingBuffer.hpp.

    +
    66 {
    67  return mReadHead == mWriteHead;
    68 }
    @@ -241,8 +241,8 @@ template<typename DataType , int Size>
    -

    Definition at line 103 of file midi_RingBuffer.hpp.

    -
    104 {
    105  const DataType data = *mReadHead++;
    106  if (mReadHead >= mData + Size)
    107  {
    108  mReadHead = mData;
    109  }
    110  return data;
    111 }
    +

    Definition at line 102 of file midi_RingBuffer.hpp.

    +
    103 {
    104  const DataType data = *mReadHead++;
    105  if (mReadHead >= mData + Size)
    106  {
    107  mReadHead = mData;
    108  }
    109  return data;
    110 }
    @@ -273,8 +273,8 @@ template<typename DataType, int Size>
    -

    Definition at line 114 of file midi_RingBuffer.hpp.

    -
    115 {
    116  for (int i = 0; i < inSize; ++i)
    117  {
    118  outData[i] = read();
    119  }
    120 }
    DataType read()
    +

    Definition at line 113 of file midi_RingBuffer.hpp.

    +
    114 {
    115  for (int i = 0; i < inSize; ++i)
    116  {
    117  outData[i] = read();
    118  }
    119 }
    DataType read()
    @@ -296,8 +296,8 @@ template<typename DataType, int Size>
    -

    Definition at line 74 of file midi_RingBuffer.hpp.

    -
    75 {
    76  *mWriteHead++ = inData;
    77  if (mWriteHead >= mData + Size)
    78  {
    79  mWriteHead = mData;
    80  }
    81 }
    +

    Definition at line 73 of file midi_RingBuffer.hpp.

    +
    74 {
    75  *mWriteHead++ = inData;
    76  if (mWriteHead >= mData + Size)
    77  {
    78  mWriteHead = mData;
    79  }
    80 }
    @@ -328,8 +328,8 @@ template<typename DataType, int Size>
    -

    Definition at line 84 of file midi_RingBuffer.hpp.

    -
    85 {
    86  for (int i = 0; i < inSize; ++i)
    87  {
    88  write(inData[i]);
    89  }
    90 }
    void write(DataType inData)
    +

    Definition at line 83 of file midi_RingBuffer.hpp.

    +
    84 {
    85  for (int i = 0; i < inSize; ++i)
    86  {
    87  write(inData[i]);
    88  }
    89 }
    void write(DataType inData)
    @@ -343,7 +343,7 @@ template<typename DataType, int Size> @@ -160,7 +160,7 @@ Static Public Attributes Set to true to get NoteOff events when receiving null-velocity NoteOn messages.
    Set to false to get NoteOn events when receiving null-velocity NoteOn messages.

    -

    Definition at line 62 of file midi_Settings.h.

    +

    Definition at line 61 of file midi_Settings.h.

    @@ -185,7 +185,7 @@ Set to false to get NoteOn events when receiving null-velocity NoteOn messages.

    Maximum size of SysEx receivable. Decrease to save RAM if you don't expect to receive SysEx, or adjust accordingly.

    -

    Definition at line 79 of file midi_Settings.h.

    +

    Definition at line 78 of file midi_Settings.h.

    @@ -210,7 +210,7 @@ Set to false to get NoteOn events when receiving null-velocity NoteOn messages.

    Setting this to true will make MIDI.read parse only one byte of data for each call when data is available. This can speed up your application if receiving a lot of traffic, but might induce MIDI Thru and treatment latency.

    -

    Definition at line 68 of file midi_Settings.h.

    +

    Definition at line 67 of file midi_Settings.h.

    @@ -236,7 +236,7 @@ Set to false to get NoteOn events when receiving null-velocity NoteOn messages.

    Running status enables short messages when sending multiple values of the same type and channel.
    Warning: does not work with some hardware, enable with caution.

    -

    Definition at line 56 of file midi_Settings.h.

    +

    Definition at line 55 of file midi_Settings.h.

    @@ -249,7 +249,7 @@ Warning: does not work with some hardware, enable with caution.

    -

    Definition at line 64 of file midi_UsbDefs.h.

    -
    65  {
    66  switch (inCodeIndexNumber)
    67  {
    68  case noteOn:
    69  case noteOff:
    70  case controlChange:
    71  case pitchBend:
    72  case polyPressure:
    73  case systemCommon3Bytes:
    74  case sysExEnds3Bytes:
    75  case sysExStart:
    76  return 3;
    77 
    78  case programChange:
    79  case channelPressure:
    80  case systemCommon2Bytes:
    81  case sysExEnds2Bytes:
    82  return 2;
    83 
    84  case systemCommon1Byte:
    85  case singleByte:
    86  return 1;
    87 
    88  default:
    89  break;
    90  }
    91  return 0; // Can be any length (1, 2 or 3).
    92  }
    - - - - - - - - - - - - - +

    Definition at line 63 of file midi_UsbDefs.h.

    +
    @@ -238,7 +238,7 @@ Static Public Member Functions
    -

    Definition at line 118 of file midi_UsbDefs.h.

    -
    119  {
    120  return mData[0] >> 4;
    121  }
    +

    Definition at line 117 of file midi_UsbDefs.h.

    +
    118  {
    119  return mData[0] >> 4;
    120  }
    @@ -200,8 +200,8 @@ Public Attributes
    -

    Definition at line 122 of file midi_UsbDefs.h.

    -
    123  {
    124  return mData[0] & 0x0f;
    125  }
    +

    Definition at line 121 of file midi_UsbDefs.h.

    +
    122  {
    123  return mData[0] & 0x0f;
    124  }
    @@ -228,8 +228,8 @@ Public Attributes
    -

    Definition at line 126 of file midi_UsbDefs.h.

    -
    127  {
    128  return mData + 1;
    129  }
    +

    Definition at line 125 of file midi_UsbDefs.h.

    +
    126  {
    127  return mData + 1;
    128  }
    @@ -256,8 +256,8 @@ Public Attributes
    -

    Definition at line 130 of file midi_UsbDefs.h.

    -
    131  {
    132  return mData + 1;
    133  }
    +

    Definition at line 129 of file midi_UsbDefs.h.

    +
    130  {
    131  return mData + 1;
    132  }
    @@ -285,9 +285,9 @@ Public Attributes
    -

    Definition at line 134 of file midi_UsbDefs.h.

    -
    135  {
    136  mData[0] = *inData++;
    137  setMidiData(inData);
    138  return *this;
    139  }
    -
    void setMidiData(const byte *inData)
    Definition: midi_UsbDefs.h:112
    +

    Definition at line 133 of file midi_UsbDefs.h.

    +
    134  {
    135  mData[0] = *inData++;
    136  setMidiData(inData);
    137  return *this;
    138  }
    +
    void setMidiData(const byte *inData)
    Definition: midi_UsbDefs.h:111
    @@ -325,9 +325,9 @@ Public Attributes
    -

    Definition at line 106 of file midi_UsbDefs.h.

    -
    107  {
    108  const byte msb = (0x0f & inCableNumber) << 4;
    109  const byte lsb = (0x0f & inCodeIndexNumber);
    110  mData[0] = msb | lsb;
    111  }
    -
    uint8_t byte
    Definition: midi_Defs.h:37
    +

    Definition at line 105 of file midi_UsbDefs.h.

    +
    106  {
    107  const byte msb = (0x0f & inCableNumber) << 4;
    108  const byte lsb = (0x0f & inCodeIndexNumber);
    109  mData[0] = msb | lsb;
    110  }
    +
    uint8_t byte
    Definition: midi_Defs.h:36
    @@ -355,8 +355,8 @@ Public Attributes
    -

    Definition at line 112 of file midi_UsbDefs.h.

    -
    113  {
    114  mData[1] = *inData++;
    115  mData[2] = *inData++;
    116  mData[3] = *inData;
    117  }
    +

    Definition at line 111 of file midi_UsbDefs.h.

    +
    112  {
    113  mData[1] = *inData++;
    114  mData[2] = *inData++;
    115  mData[3] = *inData;
    116  }
    @@ -373,7 +373,7 @@ Public Attributes
    -

    Definition at line 142 of file midi_UsbDefs.h.

    +

    Definition at line 141 of file midi_UsbDefs.h.

    @@ -386,7 +386,7 @@ Public Attributes
    -

    Definition at line 34 of file midi_UsbTransport.hpp.

    -
    35 {
    36 
    37 }
    +

    Definition at line 33 of file midi_UsbTransport.hpp.

    +
    34 {
    35 
    36 }
    @@ -167,8 +167,8 @@ template<unsigned BufferSize>
    -

    Definition at line 40 of file midi_UsbTransport.hpp.

    -
    41 {
    42 
    43 }
    +

    Definition at line 39 of file midi_UsbTransport.hpp.

    +
    40 {
    41 
    42 }

    Member Function Documentation

    @@ -197,8 +197,8 @@ template<unsigned BufferSize>
    -

    Definition at line 55 of file midi_UsbTransport.hpp.

    -
    56 {
    57  pollUsbMidi();
    58  return mRxBuffer.getLength();
    59 }
    int getLength() const
    +

    Definition at line 54 of file midi_UsbTransport.hpp.

    +
    55 {
    56  pollUsbMidi();
    57  return mRxBuffer.getLength();
    58 }
    int getLength() const
    @@ -228,8 +228,8 @@ template<unsigned BufferSize>
    -

    Definition at line 48 of file midi_UsbTransport.hpp.

    -
    49 {
    50  mTxBuffer.clear();
    51  mRxBuffer.clear();
    52 }
    +

    Definition at line 47 of file midi_UsbTransport.hpp.

    +
    48 {
    49  mTxBuffer.clear();
    50  mRxBuffer.clear();
    51 }
    @@ -258,8 +258,8 @@ template<unsigned BufferSize>
    -

    Definition at line 62 of file midi_UsbTransport.hpp.

    -
    63 {
    64  return mRxBuffer.read();
    65 }
    DataType read()
    +

    Definition at line 61 of file midi_UsbTransport.hpp.

    +
    62 {
    63  return mRxBuffer.read();
    64 }
    DataType read()
    @@ -289,8 +289,8 @@ template<unsigned BufferSize>
    -

    Definition at line 68 of file midi_UsbTransport.hpp.

    -
    69 {
    70  mTxBuffer.write(inData);
    71  recomposeAndSendTxPackets();
    72 }
    void write(DataType inData)
    +

    Definition at line 67 of file midi_UsbTransport.hpp.

    +
    68 {
    69  mTxBuffer.write(inData);
    70  recomposeAndSendTxPackets();
    71 }
    void write(DataType inData)
    @@ -304,7 +304,7 @@ template<unsigned BufferSize>