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

Detailed Description

MIDI Library for the Arduino - Definitions.

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_Defs.h.

#include "midi_Namespace.h"
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  Thru
 
struct  RPN
 

Macros

#define MIDI_CHANNEL_OMNI   0
 
#define MIDI_CHANNEL_OFF   17
 
#define MIDI_PITCHBEND_MIN   -8192
 
#define MIDI_PITCHBEND_MAX   8191
 

Typedefs

typedef uint8_t byte
 
typedef byte StatusByte
 
typedef byte DataByte
 
typedef byte Channel
 
typedef byte FilterMode
 
using ErrorCallback = void (*)(int8_t)
 
using NoteOffCallback = void (*)(Channel channel, byte note, byte velocity)
 
using NoteOnCallback = void (*)(Channel channel, byte note, byte velocity)
 
using AfterTouchPolyCallback = void (*)(Channel channel, byte note, byte velocity)
 
using ControlChangeCallback = void (*)(Channel channel, byte, byte)
 
using ProgramChangeCallback = void (*)(Channel channel, byte)
 
using AfterTouchChannelCallback = void (*)(Channel channel, byte)
 
using PitchBendCallback = void (*)(Channel channel, int)
 
using SystemExclusiveCallback = void (*)(byte * array, unsigned size)
 
using TimeCodeQuarterFrameCallback = void (*)(byte data)
 
using SongPositionCallback = void (*)(unsigned beats)
 
using SongSelectCallback = void (*)(byte songnumber)
 
using TuneRequestCallback = void (*)(void)
 
using ClockCallback = void (*)(void)
 
using StartCallback = void (*)(void)
 
using TickCallback = void (*)(void)
 
using ContinueCallback = void (*)(void)
 
using StopCallback = void (*)(void)
 
using ActiveSensingCallback = void (*)(void)
 
using SystemResetCallback = void (*)(void)
 

Enumerations

enum  MidiType : uint8_t {
  InvalidType = 0x00 , NoteOff = 0x80 , NoteOn = 0x90 , AfterTouchPoly = 0xA0 ,
  ControlChange = 0xB0 , ProgramChange = 0xC0 , AfterTouchChannel = 0xD0 , PitchBend = 0xE0 ,
  SystemExclusive = 0xF0 , SystemExclusiveStart = SystemExclusive , TimeCodeQuarterFrame = 0xF1 , SongPosition = 0xF2 ,
  SongSelect = 0xF3 , Undefined_F4 = 0xF4 , Undefined_F5 = 0xF5 , TuneRequest = 0xF6 ,
  SystemExclusiveEnd = 0xF7 , Clock = 0xF8 , Undefined_F9 = 0xF9 , Tick = Undefined_F9 ,
  Start = 0xFA , Continue = 0xFB , Stop = 0xFC , Undefined_FD = 0xFD ,
  ActiveSensing = 0xFE , SystemReset = 0xFF
}
 
enum  MidiControlChangeNumber : uint8_t {
  BankSelect = 0 , ModulationWheel = 1 , BreathController = 2 , FootController = 4 ,
  PortamentoTime = 5 , DataEntryMSB = 6 , ChannelVolume = 7 , Balance = 8 ,
  Pan = 10 , ExpressionController = 11 , EffectControl1 = 12 , EffectControl2 = 13 ,
  GeneralPurposeController1 = 16 , GeneralPurposeController2 = 17 , GeneralPurposeController3 = 18 , GeneralPurposeController4 = 19 ,
  DataEntryLSB = 38 , Sustain = 64 , Portamento = 65 , Sostenuto = 66 ,
  SoftPedal = 67 , Legato = 68 , Hold = 69 , SoundController1 = 70 ,
  SoundController2 = 71 , SoundController3 = 72 , SoundController4 = 73 , SoundController5 = 74 ,
  SoundController6 = 75 , SoundController7 = 76 , SoundController8 = 77 , SoundController9 = 78 ,
  SoundController10 = 79 , GeneralPurposeController5 = 80 , GeneralPurposeController6 = 81 , GeneralPurposeController7 = 82 ,
  GeneralPurposeController8 = 83 , PortamentoControl = 84 , Effects1 = 91 , Effects2 = 92 ,
  Effects3 = 93 , Effects4 = 94 , Effects5 = 95 , DataIncrement = 96 ,
  DataDecrement = 97 , NRPNLSB = 98 , NRPNMSB = 99 , RPNLSB = 100 ,
  RPNMSB = 101 , AllSoundOff = 120 , ResetAllControllers = 121 , LocalControl = 122 ,
  AllNotesOff = 123 , OmniModeOff = 124 , OmniModeOn = 125 , MonoModeOn = 126 ,
  PolyModeOn = 127
}
 Enumeration of Control Change command numbers. See the detailed controllers numbers & description here: http://www.somascape.org/midi/tech/spec.html#ctrlnums. More...
 

Macro Definition Documentation

◆ MIDI_CHANNEL_OFF

#define MIDI_CHANNEL_OFF   17

Definition at line 44 of file midi_Defs.h.

◆ MIDI_CHANNEL_OMNI

#define MIDI_CHANNEL_OMNI   0

Definition at line 43 of file midi_Defs.h.

◆ MIDI_PITCHBEND_MAX

#define MIDI_PITCHBEND_MAX   8191

Definition at line 47 of file midi_Defs.h.

◆ MIDI_PITCHBEND_MIN

#define MIDI_PITCHBEND_MIN   -8192

Definition at line 46 of file midi_Defs.h.

Typedef Documentation

◆ ActiveSensingCallback

using ActiveSensingCallback = void (*)(void)

Definition at line 88 of file midi_Defs.h.

◆ AfterTouchChannelCallback

using AfterTouchChannelCallback = void (*)(Channel channel, byte)

Definition at line 76 of file midi_Defs.h.

◆ AfterTouchPolyCallback

using AfterTouchPolyCallback = void (*)(Channel channel, byte note, byte velocity)

Definition at line 73 of file midi_Defs.h.

◆ byte

typedef uint8_t byte

Definition at line 36 of file midi_Defs.h.

◆ Channel

typedef byte Channel

Definition at line 58 of file midi_Defs.h.

◆ ClockCallback

using ClockCallback = void (*)(void)

Definition at line 83 of file midi_Defs.h.

◆ ContinueCallback

using ContinueCallback = void (*)(void)

Definition at line 86 of file midi_Defs.h.

◆ ControlChangeCallback

using ControlChangeCallback = void (*)(Channel channel, byte, byte)

Definition at line 74 of file midi_Defs.h.

◆ DataByte

typedef byte DataByte

Definition at line 57 of file midi_Defs.h.

◆ ErrorCallback

using ErrorCallback = void (*)(int8_t)

Definition at line 70 of file midi_Defs.h.

◆ FilterMode

typedef byte FilterMode

Definition at line 59 of file midi_Defs.h.

◆ NoteOffCallback

using NoteOffCallback = void (*)(Channel channel, byte note, byte velocity)

Definition at line 71 of file midi_Defs.h.

◆ NoteOnCallback

using NoteOnCallback = void (*)(Channel channel, byte note, byte velocity)

Definition at line 72 of file midi_Defs.h.

◆ PitchBendCallback

using PitchBendCallback = void (*)(Channel channel, int)

Definition at line 77 of file midi_Defs.h.

◆ ProgramChangeCallback

using ProgramChangeCallback = void (*)(Channel channel, byte)

Definition at line 75 of file midi_Defs.h.

◆ SongPositionCallback

using SongPositionCallback = void (*)(unsigned beats)

Definition at line 80 of file midi_Defs.h.

◆ SongSelectCallback

using SongSelectCallback = void (*)(byte songnumber)

Definition at line 81 of file midi_Defs.h.

◆ StartCallback

using StartCallback = void (*)(void)

Definition at line 84 of file midi_Defs.h.

◆ StatusByte

typedef byte StatusByte

Definition at line 56 of file midi_Defs.h.

◆ StopCallback

using StopCallback = void (*)(void)

Definition at line 87 of file midi_Defs.h.

◆ SystemExclusiveCallback

using SystemExclusiveCallback = void (*)(byte * array, unsigned size)

Definition at line 78 of file midi_Defs.h.

◆ SystemResetCallback

using SystemResetCallback = void (*)(void)

Definition at line 89 of file midi_Defs.h.

◆ TickCallback

using TickCallback = void (*)(void)

Definition at line 85 of file midi_Defs.h.

◆ TimeCodeQuarterFrameCallback

using TimeCodeQuarterFrameCallback = void (*)(byte data)

Definition at line 79 of file midi_Defs.h.

◆ TuneRequestCallback

using TuneRequestCallback = void (*)(void)

Definition at line 82 of file midi_Defs.h.

Enumeration Type Documentation

◆ MidiControlChangeNumber

enum MidiControlChangeNumber : uint8_t

Enumeration of Control Change command numbers. See the detailed controllers numbers & description here: http://www.somascape.org/midi/tech/spec.html#ctrlnums.

Enumerator
SoundController1 

Synth: Sound Variation FX: Exciter On/Off.

SoundController2 

Synth: Harmonic Content FX: Compressor On/Off.

SoundController3 

Synth: Release Time FX: Distortion On/Off.

SoundController4 

Synth: Attack Time FX: EQ On/Off.

SoundController5 

Synth: Brightness FX: Expander On/Off.

SoundController6 

Synth: Decay Time FX: Reverb On/Off.

SoundController7 

Synth: Vibrato Rate FX: Delay On/Off.

SoundController8 

Synth: Vibrato Depth FX: Pitch Transpose On/Off.

SoundController9 

Synth: Vibrato Delay FX: Flange/Chorus On/Off.

SoundController10 

Synth: Undefined FX: Special Effects On/Off.

Effects1 

Reverb send level.

Effects2 

Tremolo depth.

Effects3 

Chorus send level.

Effects4 

Celeste depth.

Effects5 

Phaser depth.

NRPNLSB 

Non-Registered Parameter Number (LSB)

NRPNMSB 

Non-Registered Parameter Number (MSB)

RPNLSB 

Registered Parameter Number (LSB)

RPNMSB 

Registered Parameter Number (MSB)

Definition at line 144 of file midi_Defs.h.

◆ MidiType

enum MidiType : uint8_t

Enumeration of MIDI types

Enumerator
InvalidType 

For notifying errors.

NoteOff 

Channel Message - Note Off.

NoteOn 

Channel Message - Note On.

AfterTouchPoly 

Channel Message - Polyphonic AfterTouch.

ControlChange 

Channel Message - Control Change / Channel Mode.

ProgramChange 

Channel Message - Program Change.

AfterTouchChannel 

Channel Message - Channel (monophonic) AfterTouch.

PitchBend 

Channel Message - Pitch Bend.

SystemExclusive 

System Exclusive.

SystemExclusiveStart 

System Exclusive Start.

TimeCodeQuarterFrame 

System Common - MIDI Time Code Quarter Frame.

SongPosition 

System Common - Song Position Pointer.

SongSelect 

System Common - Song Select.

TuneRequest 

System Common - Tune Request.

SystemExclusiveEnd 

System Exclusive End.

Clock 

System Real Time - Timing Clock.

Tick 

System Real Time - Timing Tick (1 tick = 10 milliseconds)

Start 

System Real Time - Start.

Continue 

System Real Time - Continue.

Stop 

System Real Time - Stop.

ActiveSensing 

System Real Time - Active Sensing.

SystemReset 

System Real Time - System Reset.

Definition at line 94 of file midi_Defs.h.