FastLED 3.9.7
Loading...
Searching...
No Matches
MIDI.h File Reference

Detailed Description

MIDI Library for the Arduino.

Project Arduino MIDI Library

Author
Francois Best, lathoub
Date
24/02/11 @license 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.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file MIDI.h.

#include "midi_Defs.h"
#include "midi_Platform.h"
#include "midi_Settings.h"
#include "midi_Message.h"
#include "serialMIDI.h"
#include "MIDI.hpp"

Go to the source code of this file.

Classes

class  MidiInterface< Transport, _Settings, _Platform >
 The main class for MIDI handling. It is templated over the type of serial port to provide abstraction from the hardware interface, meaning you can use HardwareSerial, SoftwareSerial or ak47's Uart classes. The only requirement is that the class implements the begin, read, write and available methods. More...
 

Macros

#define MIDI_LIBRARY_VERSION   0x050000
 
#define MIDI_LIBRARY_VERSION_MAJOR   5
 
#define MIDI_LIBRARY_VERSION_MINOR   0
 
#define MIDI_LIBRARY_VERSION_PATCH   0
 

Functions

unsigned encodeSysEx (const byte *inData, byte *outSysEx, unsigned inLength, bool inFlipHeaderBits=false)
 Encode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes higher than 127 without breaking the MIDI protocol. Use this static method to convert the data you want to send.
 
unsigned decodeSysEx (const byte *inSysEx, byte *outData, unsigned inLength, bool inFlipHeaderBits=false)
 Decode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes higher than 127 without breaking the MIDI protocol. Use this static method to reassemble your received message.
 

Macro Definition Documentation

◆ MIDI_LIBRARY_VERSION

#define MIDI_LIBRARY_VERSION   0x050000

Definition at line 41 of file MIDI.h.

◆ MIDI_LIBRARY_VERSION_MAJOR

#define MIDI_LIBRARY_VERSION_MAJOR   5

Definition at line 42 of file MIDI.h.

◆ MIDI_LIBRARY_VERSION_MINOR

#define MIDI_LIBRARY_VERSION_MINOR   0

Definition at line 43 of file MIDI.h.

◆ MIDI_LIBRARY_VERSION_PATCH

#define MIDI_LIBRARY_VERSION_PATCH   0

Definition at line 44 of file MIDI.h.

Function Documentation

◆ decodeSysEx()

unsigned decodeSysEx ( const byte * inSysEx,
byte * outData,
unsigned inLength,
bool inFlipHeaderBits )

Decode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes higher than 127 without breaking the MIDI protocol. Use this static method to reassemble your received message.

Parameters
inSysExThe SysEx data received from MIDI in.
outDataThe output buffer where to store the decrypted message.
inLengthThe length of the input buffer.
inFlipHeaderBitsTrue for Korg and other who store MSB in reverse order
Returns
The length of the output buffer.
See also
encodeSysEx
getSysExArrayLength Code inspired from Ruin & Wesen's SysEx encoder/decoder - http://ruinwesen.com

Definition at line 87 of file MIDI.cpp.

◆ encodeSysEx()

unsigned encodeSysEx ( const byte * inData,
byte * outSysEx,
unsigned inLength,
bool inFlipHeaderBits )

Encode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes higher than 127 without breaking the MIDI protocol. Use this static method to convert the data you want to send.

Parameters
inDataThe data to encode.
outSysExThe output buffer where to store the encoded message.
inLengthThe length of the input buffer.
inFlipHeaderBitsTrue for Korg and other who store MSB in reverse order
Returns
The length 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.