Maestro - Midi Player Tool Kit for Unity Version 2.19.0
Loading...
Searching...
No Matches
MidiPlayerTK

Classes

class  MidiFileLoader
 @Warning - will be soon deprecated, please rather use MidiFilePlayer prefab which have the same features + eventually MIDI sequencer and MIDI synth! Exemple for just loading a MIDI with MidiFilePlayer:
More...
class  MidiFilePlayer
 Plays a MIDI file from the MidiDB. This class must be used with the prefab MidiFilePlayer.
See "Midi File Setup" in the Unity menu MPTK for adding MIDI in MidiDB.
. More...
class  MidiPlayerGlobal
 Singleton class to manage all global MPTK features. More information here: https://paxstellar.fr/midiplayerglobal/. More...
class  MidiStreamPlayer
 Builds and plays real-time music in response to user actions or algorithmic logic. This class is intended to be used with the MidiStreamPlayer prefab. More...
class  MidiSynth
 Core sample-based SoundFont synthesizer (base class). More...
class  MPTKChannels
 Collection of MIDI channels managed by a MIDI synth.
A standard MIDI synth uses 16 channels (0 to 15). Each channel keeps an independent state, including: More...
class  MPTKChannel
 Runtime state for one MIDI channel in the synth.
A channel contains independent settings used to render events on that channel: More...
class  MPTKEffectSoundFont
 A SoundFont contains parameters for three effect types: low-pass filter, reverb, and chorus.
These parameters can be specific to each instrument and even each voice.
Maestro MPTK SoundFont effects are based on FluidSynth effect modules. To provide more flexibility than the raw SoundFont defaults, Maestro can increase or decrease effect impact from the inspector or by script. To summarize: More...
class  MPTKEffectUnity
 Unlike SoundFont effects, Unity effects are applied to the whole player.
Unity effect parameters are richer and are based on Unity audio algorithms.
https://docs.unity3d.com/Manual/class-AudioEffectMixer.html
Only the most important effects are integrated in Maestro: Reverb and Chorus. Additional Unity effects can be added if needed. More...
class  MPTKEvent
 Represents a MIDI event used throughout MPTK. This class is central to script-based MIDI workflows in components such as MidiStreamPlayer, MidiFilePlayer, MidiFileLoader, and MPTKWriter. More...
class  MPTKListItem
 This class is useful when a list of paired value string+id is needed.
. More...
class  MPTKTempo
 Contains information about the tempo change.
. More...
class  MPTKSignature
 Contains information about time signature changes in a MIDI file. More...
class  MPTKSoundFont
 Provides runtime access to SoundFont loading, caching, state inspection, and preset/bank exploration. More...
class  MPTKChordBuilder
 Builds chord settings and generated note events. More...
class  MPTKChordLib
 Represents one chord entry loaded from the chord library. More...
class  MPTKChordProgressionPreset
 Preset chord progression data with mood tags and helpers that convert Roman numerals into playable chord-library entries (MPTKChordName + tonic). Degree token grammar: [accidentals][Roman degree][optional suffix]. More...
struct  MPTKResolvedChordStep
 One resolved progression step. More...
class  MPTKChordProgressionLib
 Utility library for emotional progression presets and Roman-degree parsing. Roman roots are resolved from a tonic using a major-reference semitone map: I=0, II=2, III=4, IV=5, V=7, VI=9, VII=11, plus optional accidentals. Chord quality is then derived from case and supported ASCII suffixes. More...
class  MPTKInnerLoop
 MIDI inner-loop settings for MidiFilePlayer and MidiExternalPlayer [Pro].
See MidiFilePlayer.MPTK_InnerLoop and MidiExternalPlayer.MPTK_InnerLoop. See example:
. More...
class  MPTKRangeLib
 [MPTK PRO] Range/scale interval library loaded from GammeDefinition.csv. Can be used in any music-generation workflow. See examples in TestMidiStream.cs and ExtStreamPlayerPro.cs. More...
class  MPTKScaleLib
 Scale interval library loaded from GammeDefinition.csv. Can be used in any music-generation workflow. More...
class  MPTKWriter
 Create, build, write, import, and play MIDI from script. See full examples in: More...
class  MidiLoad
 Base class for loading a MIDI file and reading MIDI event in a MIDI sequencer. It's not possible to instanciate directly this class.
Rather, use MidiFilePlayer to load a MIDI This class is used by MidiFilePlayer, MidiListPlayer, MidiFileWrite2, MidiFileLoader (see members MPTK_MidiLoaded of these classes).
. More...
class  MPTKFootPrint
 Experimental - Search a MIDI from a sequence of notes and calculate a score tempo.
. More...
class  MidiExternalPlayer
 Plays a local MIDI file or a MIDI file from a website. This class must be used with the MidiExternalPlayer prefab.
. More...
class  MidiInReader
 Read MIDI events from a MIDI keyboard connected to your Windows or Mac desktop. This class must be used with the prefab MidiInReader.
There is no need to writing a script. For a simple usage, all the job can be done in the prefab inspector. More information here https://paxstellar.fr/prefab-midiinreader/
. More...
class  MidiKeyboard
 Provides access to the native MidiKeyboard plugin to send and receive MIDI messages from desktop MIDI devices. More...
class  MidiListPlayer
 Play a list of pre-selected MIDI files from the MidiDB. This class must be used with the prefab MidiListPlayer.
. More...
class  MidiSpatializer
 For playing Spatialized MIDI by channels or by tracks from the MidiDB. This class must be used with the prefab MidiSpatializer. More...

Enumerations

enum  MPTKChordName {
  MPTKChordName.Major = 0 , MPTKChordName.Dim = 1 , MPTKChordName.minor = 2 , MPTKChordName.mSharp5 = 3 ,
  MPTKChordName.M7no5 = 4 , MPTKChordName.Ssus2 = 5 , MPTKChordName.MSharp5 = 6 , MPTKChordName.Ssus4 = 7 ,
  MPTKChordName.M7 = 8 , MPTKChordName.M6 = 9 , MPTKChordName.mb6b9 = 10 , MPTKChordName.madd9 = 11 ,
  MPTKChordName.Dim7 = 12 , MPTKChordName.m7b5 = 13 , MPTKChordName.m6 = 14 , MPTKChordName.m7 = 15 ,
  MPTKChordName.mM7 = 16 , MPTKChordName.mm7Sharp5 = 17 , MPTKChordName.mb6M7 = 18 , MPTKChordName.m9no5 = 19 ,
  MPTKChordName.D7b5 = 20 , MPTKChordName.A7aug = 21 , MPTKChordName.Aaug7 = 22 , MPTKChordName.S7b9sus = 23 ,
  MPTKChordName.Susb9 = 24 , MPTKChordName.MSharp5add9 = 25 , MPTKChordName.M7Sharp5 = 26 , MPTKChordName.S7sus4 = 27 ,
  MPTKChordName.M7b9 = 28 , MPTKChordName.M9 = 29 , MPTKChordName.D7Sharp11 = 30 , MPTKChordName.M7b13 = 31 ,
  MPTKChordName.M7b6 = 32 , MPTKChordName.M44445 = 33 , MPTKChordName.M9b = 34 , MPTKChordName.m7Sharp11 = 35 ,
  MPTKChordName.m7Sharp5Sharp9 = 36 , MPTKChordName.m7b5Sharp9 = 37 , MPTKChordName.D9b5 = 38 , MPTKChordName.m69 = 39 ,
  MPTKChordName.m9 = 40 , MPTKChordName.mM9 = 41 , MPTKChordName.m9Sharp5 = 42 , MPTKChordName.m7Sharp11b = 43 ,
  MPTKChordName.mM7b6 = 44 , MPTKChordName.D7Sharp5b9 = 45 , MPTKChordName.D9b5x = 46 , MPTKChordName.D9Sharp5 = 47 ,
  MPTKChordName.D13b5 = 48 , MPTKChordName.S7sus4b9 = 49 , MPTKChordName.S7susb9 = 50 , MPTKChordName.MM9Sharp5 = 51 ,
  MPTKChordName.S9sus4 = 52 , MPTKChordName.M7b5b9 = 53 , MPTKChordName.M7b9Sharp11 = 54 , MPTKChordName.M7b9b13 = 55 ,
  MPTKChordName.M13b9 = 56 , MPTKChordName.M11 = 57 , MPTKChordName.M9Sharp11 = 58 , MPTKChordName.M9b13 = 59 ,
  MPTKChordName.M13 = 60 , MPTKChordName.M7Sharp11b13 = 61 , MPTKChordName.M7b5b13 = 62 , MPTKChordName.m7Sharp9Sharp11 = 63 ,
  MPTKChordName.m7Sharp9b13 = 64 , MPTKChordName.m13Sharp9 = 65 , MPTKChordName.m11b5 = 66 , MPTKChordName.m11 = 67 ,
  MPTKChordName.m11Sharp5 = 68 , MPTKChordName.mBlues = 69 , MPTKChordName.D7Sharp5b9Sharp11 = 70 , MPTKChordName.D9Sharp5Sharp11 = 71 ,
  MPTKChordName.S7b9b13sus4 = 72 , MPTKChordName.S7sus4b9b13 = 73 , MPTKChordName.S13sus4 = 74 , MPTKChordName.M7b5b9b13 = 75 ,
  MPTKChordName.M7b9Sharp11b13 = 76 , MPTKChordName.M7b9b13Sharp11 = 77 , MPTKChordName.M13b9Sharp11 = 78 , MPTKChordName.M9Sharp11b13 = 79 ,
  MPTKChordName.M9b5b13 = 80 , MPTKChordName.M13Sharp11 = 81 , MPTKChordName.m13 = 82 , MPTKChordName.m7Sharp9Sharp11b13 = 83 ,
  MPTKChordName.m13Sharp9Sharp11 = 84
}
 List of available chord presets loaded from ChordLib.csv. Each enum value maps to one CSV row (same zero-based index). Chord quality is inferred from Modifier3: M = Major, m = Minor, D = Diminished, A = Augmented, S = Suspended. The additional modifier column is used for extra chord color tones (such as sevenths). The 12 pitch columns (C to B) form a chromatic bitmap where 1 means the pitch class is part of the chord. Per-value documentation shows interval names from the root and the active notes in the C reference scale. During playback, this pitch-class pattern is transposed from C to the selected tonic. Chord names and formulas were collected from external sources and can include non-standard naming. More...
enum  MPTKTonalMode { MPTKTonalMode.Major , MPTKTonalMode.Minor , MPTKTonalMode.Modal }
 Tonal mode (global harmonic context) for a progression preset. More...
enum  MPTKProgressionGenre {
  MPTKProgressionGenre.Pop , MPTKProgressionGenre.Jazz , MPTKProgressionGenre.Cinematic , MPTKProgressionGenre.Classical ,
  MPTKProgressionGenre.Vintage50s
}
 Musical family (style category) for a progression preset. More...
enum  MPTKHarmonyFlavor {
  MPTKHarmonyFlavor.Diatonic , MPTKHarmonyFlavor.Borrowed , MPTKHarmonyFlavor.JazzExtended , MPTKHarmonyFlavor.Functional ,
  MPTKHarmonyFlavor.Modal
}
 Harmonic language used by a progression. More...
enum  MPTKRangeName {
  MPTKRangeName.MajorMelodic = 0 , MPTKRangeName.MajorHarmonic = 1 , MPTKRangeName.MinorNatural = 2 , MPTKRangeName.MinorMelodic = 3 ,
  MPTKRangeName.MinorHarmonic = 4 , MPTKRangeName.PentatonicMajor = 5 , MPTKRangeName.PentatonicMinor = 6 , MPTKRangeName.Chromatic = 7 ,
  MPTKRangeName.Blues = 8 , MPTKRangeName.Enigmatic1 = 9 , MPTKRangeName.Enigmatic2 = 10 , MPTKRangeName.Gitane = 11 ,
  MPTKRangeName.Oriental1 = 12 , MPTKRangeName.BebopMajor = 13 , MPTKRangeName.AeolienB5 = 14 , MPTKRangeName.Arabic = 15 ,
  MPTKRangeName.Augmented = 16 , MPTKRangeName.Bahar = 17 , MPTKRangeName.Balinaise = 18 , MPTKRangeName.Bartock = 19 ,
  MPTKRangeName.BebopDominante = 20 , MPTKRangeName.Aeolien = 21 , MPTKRangeName.BebopMinor = 22 , MPTKRangeName.BitonalMajorChromatic = 23 ,
  MPTKRangeName.BitonalMinorChromatic = 24 , MPTKRangeName.BluesDecreased1 = 25 , MPTKRangeName.BluesDecreased2 = 26 , MPTKRangeName.MajorBlues1 = 27 ,
  MPTKRangeName.MinorBlues1 = 28 , MPTKRangeName.MajorBlues2 = 29 , MPTKRangeName.MinorBlues2 = 30 , MPTKRangeName.Chinese1 = 31 ,
  MPTKRangeName.Chinese2 = 32 , MPTKRangeName.DemiDecreased = 33 , MPTKRangeName.DemiTonNoSixte = 34 , MPTKRangeName.Diminish = 35 ,
  MPTKRangeName.Dorien = 36 , MPTKRangeName.Spanish1 = 37 , MPTKRangeName.Spanish2 = 38 , MPTKRangeName.Spanish8 = 39 ,
  MPTKRangeName.Gypsy = 40 , MPTKRangeName.Hexalydien = 41 , MPTKRangeName.HexaMelodic = 42 , MPTKRangeName.HexaPhrygien = 43 ,
  MPTKRangeName.HexaTritoniqueBinary = 44 , MPTKRangeName.HexaTritoniqueDecreased1 = 45 , MPTKRangeName.HexaTritoniqueDecreased2 = 46 , MPTKRangeName.HexaTritoniqueDecreased3 = 47 ,
  MPTKRangeName.Hindou = 48 , MPTKRangeName.Hirajoshi = 49 , MPTKRangeName.HongroiseGitane = 50 , MPTKRangeName.HongroiseMajor = 51 ,
  MPTKRangeName.HongroiseMinor = 52 , MPTKRangeName.Indoustane = 53 , MPTKRangeName.Ionien = 54 , MPTKRangeName.Ionien5 = 55 ,
  MPTKRangeName.Iwato = 56 , MPTKRangeName.Javanais = 57 , MPTKRangeName.KokinJoshi = 58 , MPTKRangeName.Kumoi = 59 ,
  MPTKRangeName.Locrien = 60 , MPTKRangeName.Locrien6 = 61 , MPTKRangeName.Lydien1 = 62 , MPTKRangeName.Lydien2 = 63 ,
  MPTKRangeName.Lydien3 = 64 , MPTKRangeName.Mixolydien = 65 , MPTKRangeName.NapolitanMajor = 66 , MPTKRangeName.NapolitanMinor = 67 ,
  MPTKRangeName.Oriental2 = 68 , MPTKRangeName.Oriental3 = 69 , MPTKRangeName.PentatonicHarmonic = 70 , MPTKRangeName.PentatonicDominante = 71 ,
  MPTKRangeName.PentatonicEgyptian = 72 , MPTKRangeName.PentatonicJapanese = 73 , MPTKRangeName.PentatonicLocrien1 = 74 , MPTKRangeName.PentatonicLocrien2 = 75 ,
  MPTKRangeName.PentatonicMauritanian = 76 , MPTKRangeName.PentatonicPelog = 77 , MPTKRangeName.Persane1 = 78 , MPTKRangeName.Persane2 = 79 ,
  MPTKRangeName.Phrygien = 80 , MPTKRangeName.Promethee = 81 , MPTKRangeName.RoumanMinor = 82 , MPTKRangeName.SuperlocrienBB7 = 83 ,
  MPTKRangeName.SuperlocrienAltered = 84 , MPTKRangeName.TonByTon = 85
}
 [MPTK PRO] Legacy range identifiers loaded from GammeDefinition.csv. Each enum value maps to one CSV row using the same zero-based index. Kept for backward compatibility with older range-based APIs. Some identifiers keep historical spellings from the source library (for example, Aeolien, Dorien, Lydien). More...
enum  MPTKScaleName {
  MPTKScaleName.MajorMelodic = 0 , MPTKScaleName.MajorHarmonic = 1 , MPTKScaleName.MinorNatural = 2 , MPTKScaleName.MinorMelodic = 3 ,
  MPTKScaleName.MinorHarmonic = 4 , MPTKScaleName.PentatonicMajor = 5 , MPTKScaleName.PentatonicMinor = 6 , MPTKScaleName.Chromatic = 7 ,
  MPTKScaleName.Blues = 8 , MPTKScaleName.Enigmatic1 = 9 , MPTKScaleName.Enigmatic2 = 10 , MPTKScaleName.Gitane = 11 ,
  MPTKScaleName.Oriental1 = 12 , MPTKScaleName.BebopMajor = 13 , MPTKScaleName.AeolienB5 = 14 , MPTKScaleName.Arabic = 15 ,
  MPTKScaleName.Augmented = 16 , MPTKScaleName.Bahar = 17 , MPTKScaleName.Balinaise = 18 , MPTKScaleName.Bartock = 19 ,
  MPTKScaleName.BebopDominante = 20 , MPTKScaleName.Aeolien = 21 , MPTKScaleName.BebopMinor = 22 , MPTKScaleName.BitonalMajorChromatic = 23 ,
  MPTKScaleName.BitonalMinorChromatic = 24 , MPTKScaleName.BluesDecreased1 = 25 , MPTKScaleName.BluesDecreased2 = 26 , MPTKScaleName.MajorBlues1 = 27 ,
  MPTKScaleName.MinorBlues1 = 28 , MPTKScaleName.MajorBlues2 = 29 , MPTKScaleName.MinorBlues2 = 30 , MPTKScaleName.Chinese1 = 31 ,
  MPTKScaleName.Chinese2 = 32 , MPTKScaleName.DemiDecreased = 33 , MPTKScaleName.DemiTonNoSixte = 34 , MPTKScaleName.Diminish = 35 ,
  MPTKScaleName.Dorien = 36 , MPTKScaleName.Spanish1 = 37 , MPTKScaleName.Spanish2 = 38 , MPTKScaleName.Spanish8 = 39 ,
  MPTKScaleName.Gypsy = 40 , MPTKScaleName.Hexalydien = 41 , MPTKScaleName.HexaMelodic = 42 , MPTKScaleName.HexaPhrygien = 43 ,
  MPTKScaleName.HexaTritoniqueBinary = 44 , MPTKScaleName.HexaTritoniqueDecreased1 = 45 , MPTKScaleName.HexaTritoniqueDecreased2 = 46 , MPTKScaleName.HexaTritoniqueDecreased3 = 47 ,
  MPTKScaleName.Hindou = 48 , MPTKScaleName.Hirajoshi = 49 , MPTKScaleName.HongroiseGitane = 50 , MPTKScaleName.HongroiseMajor = 51 ,
  MPTKScaleName.HongroiseMinor = 52 , MPTKScaleName.Indoustane = 53 , MPTKScaleName.Ionien = 54 , MPTKScaleName.Ionien5 = 55 ,
  MPTKScaleName.Iwato = 56 , MPTKScaleName.Javanais = 57 , MPTKScaleName.KokinJoshi = 58 , MPTKScaleName.Kumoi = 59 ,
  MPTKScaleName.Locrien = 60 , MPTKScaleName.Locrien6 = 61 , MPTKScaleName.Lydien1 = 62 , MPTKScaleName.Lydien2 = 63 ,
  MPTKScaleName.Lydien3 = 64 , MPTKScaleName.Mixolydien = 65 , MPTKScaleName.NapolitanMajor = 66 , MPTKScaleName.NapolitanMinor = 67 ,
  MPTKScaleName.Oriental2 = 68 , MPTKScaleName.Oriental3 = 69 , MPTKScaleName.PentatonicHarmonic = 70 , MPTKScaleName.PentatonicDominante = 71 ,
  MPTKScaleName.PentatonicEgyptian = 72 , MPTKScaleName.PentatonicJapanese = 73 , MPTKScaleName.PentatonicLocrien1 = 74 , MPTKScaleName.PentatonicLocrien2 = 75 ,
  MPTKScaleName.PentatonicMauritanian = 76 , MPTKScaleName.PentatonicPelog = 77 , MPTKScaleName.Persane1 = 78 , MPTKScaleName.Persane2 = 79 ,
  MPTKScaleName.Phrygien = 80 , MPTKScaleName.Promethee = 81 , MPTKScaleName.RoumanMinor = 82 , MPTKScaleName.SuperlocrienBB7 = 83 ,
  MPTKScaleName.SuperlocrienAltered = 84 , MPTKScaleName.TonByTon = 85
}
 List of available scale presets loaded from GammeDefinition.csv. Each enum value maps to one CSV row (same zero-based index). Flag indicates the main family when available: M = Major, m = Minor, _ = other or modal. Main marks commonly used scales in the source library (X/x). Pitch columns (C to B) define the 12 pitch classes of one octave and store degree labels when present. Per-value documentation shows source names, degree formulas, and active notes in the C reference scale. During playback, this pitch-class pattern is transposed from C to the selected tonic. Scale names and formulas were collected from external online sources and can include non-standard naming. More...

MIDI Event Model Enums

enum  MPTKCommand : byte {
  NoteOff = 0x80 , NoteOn = 0x90 , KeyAfterTouch = 0xA0 , ControlChange = 0xB0 ,
  PatchChange = 0xC0 , ChannelAfterTouch = 0xD0 , PitchWheelChange = 0xE0 , Sysex = 0xF0 ,
  Eox = 0xF7 , TimingClock = 0xF8 , StartSequence = 0xFA , ContinueSequence = 0xFB ,
  StopSequence = 0xFC , AutoSensing = 0xFE , MetaEvent = 0xFF
}
 MIDI command codes. Defines the action performed by the message: note on/off, patch change, and more.
Depending on the selected command, specific MPTKEvent properties must be set (Value, Channel, Velocity, etc.).
. More...
enum  MPTKController : byte {
  BankSelectMsb = 0 , Modulation = 1 , BreathController = 2 , FootController = 4 ,
  PORTAMENTO_TIME_MSB = 0x05 , DATA_ENTRY_MSB = 6 , VOLUME_MSB = 7 , BALANCE_MSB = 8 ,
  Pan = 10 , Expression = 11 , EFFECTS1_MSB = 12 , EFFECTS2_MSB = 13 ,
  GPC1_MSB = 16 , GPC2_MSB = 17 , GPC3_MSB = 18 , GPC4_MSB = 19 ,
  BankSelectLsb = 32 , MODULATION_WHEEL_LSB = 33 , BREATH_LSB = 34 , FOOT_LSB = 36 ,
  PORTAMENTO_TIME_LSB = 37 , DATA_ENTRY_LSB = 38 , VOLUME_LSB = 39 , BALANCE_LSB = 40 ,
  PAN_LSB = 42 , EXPRESSION_LSB = 43 , EFFECTS1_LSB = 44 , EFFECTS2_LSB = 45 ,
  GPC1_LSB = 48 , GPC2_LSB = 49 , GPC3_LSB = 50 , GPC4_LSB = 51 ,
  Sustain = 64 , Portamento = 65 , Sostenuto = 66 , SoftPedal = 67 ,
  LegatoFootswitch = 68 , HOLD2_SWITCH = 69 , SOUND_CTRL1 = 70 , SOUND_CTRL2 = 71 ,
  SOUND_CTRL3 = 72 , SOUND_CTRL4 = 73 , SOUND_CTRL5 = 74 , SOUND_CTRL6 = 75 ,
  SOUND_CTRL7 = 76 , SOUND_CTRL8 = 77 , SOUND_CTRL9 = 78 , SOUND_CTRL10 = 79 ,
  GPC5 = 80 , GPC6 = 81 , GPC7 = 82 , GPC8 = 83 ,
  PORTAMENTO_CTRL = 84 , EFFECTS_DEPTH1 = 91 , EFFECTS_DEPTH2 = 92 , EFFECTS_DEPTH3 = 93 ,
  EFFECTS_DEPTH4 = 94 , EFFECTS_DEPTH5 = 95 , DATA_ENTRY_INCR = 96 , DATA_ENTRY_DECR = 97 ,
  NRPN_LSB = 98 , NRPN_MSB = 99 , RPN_LSB = 100 , RPN_MSB = 101 ,
  AllSoundOff = 120 , ResetAllControllers = 121 , LOCAL_CONTROL = 122 , AllNotesOff = 123 ,
  OMNI_OFF = 124 , OMNI_ON = 125 , POLY_OFF = 126 , POLY_ON = 127
}
 MIDI controller list.
Each MIDI CC operates at 7-bit resolution, meaning it has 128 possible values. The values start at 0 and go to 127.
Some instruments can receive higher resolution data for their MIDI control assignments. These high res assignments are defined by combining two separate CCs,
one being the Most Significant Byte (MSB), and one being the Least Significant Byte (LSB).
Most instruments receive only the MSB (default 7-bit resolution). More information: https://www.presetpatch.com/midi-cc-list.aspx. More...
enum  midi_rpn_event { RPN_PITCH_BEND_RANGE = 0x00 , RPN_CHANNEL_FINE_TUNE = 0x01 , RPN_CHANNEL_COARSE_TUNE = 0x02 , RPN_TUNING_PROGRAM_CHANGE = 0x03 , RPN_TUNING_BANK_SELECT = 0x04 , RPN_MODULATION_DEPTH_RANGE = 0x05 }
 General MIDI RPN event numbers (LSB, MSB = 0). Parameter numbers are configured in two steps:
first select the parameter, then send the data entry value.
For example, to set pitch bend sensitivity to 12 semitones, send the following controller MIDI messages:
. More...
enum  MPTKMeta : byte {
  TrackSequenceNumber = 0x00 , TextEvent = 0x01 , Copyright = 0x02 , SequenceTrackName = 0x03 ,
  TrackInstrumentName = 0x04 , Lyric = 0x05 , Marker = 0x06 , CuePoint = 0x07 ,
  ProgramName = 0x08 , DeviceName = 0x09 , MidiChannel = 0x20 , MidiPort = 0x21 ,
  EndTrack = 0x2F , SetTempo = 0x51 , SmpteOffset = 0x54 , TimeSignature = 0x58 ,
  KeySignature = 0x59 , SequencerSpecific = 0x7F
}
 MIDI meta event type. Meta events are optional MIDI information; none are mandatory.
In MPTKEvent, the MPTKEvent.Meta attribute defines the type of meta event. More...

Load Status Enums

enum  LoadingStatusMidiEnum {
  NotYetDefined = -1 , Success = 0 , NotFound = 1 , TooShortSize = 2 ,
  NoMThdSignature = 3 , NetworkError = 4 , MidiFileInvalid = 5 , SoundFontNotLoaded = 6 ,
  AlreadyPlaying = 7 , MidiNameInvalid = 8 , MidiNameNotDefined = 9 , MidiFileEmpty = 10
}
 Status of the last MIDI file load operation. More...
enum  LoadingStatusSoundFontEnum {
  InProgress = -1 , Success = 0 , NoRIFFSignature = 3 , NetworkError = 4 ,
  SoundFontNotLoaded = 6 , InvalidURL = 8 , SoundFontEmpty = 10 , Unknown = 100
}
 Status of the last SoundFont load operation. More...

Enumeration Type Documentation

◆ MPTKCommand

MIDI command codes. Defines the action performed by the message: note on/off, patch change, and more.
Depending on the selected command, specific MPTKEvent properties must be set (Value, Channel, Velocity, etc.).
.

Enumerator
NoteOff 

Note Off.
Stops the note identified by Value on the specified Channel.
.

NoteOn 

Note On.
.

KeyAfterTouch 

Key After-touch (polyphonic key pressure).
Not processed by NAudio and therefore not processed by Maestro Synth.
Reserved for future support.

ControlChange 

Control Change.
.

PatchChange 

Patch Change.
.

  • MPTKEvent.Value contains the patch/preset/instrument number to select (0 to 127).
ChannelAfterTouch 

Channel after-touch (channel pressure).
Not processed by Maestro Synth.
.

PitchWheelChange 

Pitch Wheel Change.
MPTKEvent.Value contains the pitch wheel value (0 to 16383).
Higher values transpose pitch up, and lower values transpose pitch down.
The default sensitivity is 2 semitones. Maximum bend is therefore two semitones up or down
from the original pitch (a 4-semitone span from minimum to maximum bend).

  • 0 is the lowest bend position (default: -2 semitones),
  • 8192 (0x2000) is the center value (no transposition),
  • 16383 (0x3FFF) is the highest bend position (default: +2 semitones)
Sysex 

SysEx message. Not processed by Maestro Synth.
.

Eox 

End of Exclusive (EOX), marks the end of a SysEx message. Not processed by Maestro Synth.

TimingClock 

Timing clock.
Used when synchronization is required.

StartSequence 

Start sequence
.

ContinueSequence 

Continue sequence
.

StopSequence 

Stop sequence.
.

AutoSensing 

Active Sensing.
.

MetaEvent 

Meta events provide optional MIDI information; none are mandatory.
In MPTKEvent, the MPTKEvent.Meta attribute defines the meta event type. See MPTKMeta (TextEvent, Lyric, TimeSignature, ...).
.

  • if MPTKEvent.Meta = #MPTKMeta.SetTempo, MPTKEvent.Value contains the new microseconds-per-quarter-note value. Use MPTKEvent.QuarterPerMicroSecond2BeatPerMinute() to convert to BPM.
  • if MPTKEvent.Meta = #MPTKMeta.TimeSignature, MPTKEvent.Value contains four bytes from least significant to most significant. Use MPTKEvent.ExtractFromInt().
    1. Numerator (number of beats in a bar),
    2. Denominator (beat unit: 1 means 2, 2 means 4 (quarter), 3 means 8 (eighth), 4 means 16, ...)
    3. TicksInMetronomeClick, usually 24 (MIDI clocks per metronome click)
    4. No32ndNotesInQuarterNote, usually 8 (number of 32nd notes per MIDI quarter note)
  • if MPTKEvent.Meta = #MPTKMeta.KeySignature, MPTKEvent.Value contains two bytes from least significant to most significant. Use MPTKEvent.ExtractFromInt().
    1. SharpsFlats (number of sharps/flats)
    2. MajorMinor flag (0 the scale is major, 1 the scale is minor).
  • for other types (TextEvent, ...), MPTKEvent.Info contains textual information.

◆ MPTKController

MIDI controller list.
Each MIDI CC operates at 7-bit resolution, meaning it has 128 possible values. The values start at 0 and go to 127.
Some instruments can receive higher resolution data for their MIDI control assignments. These high res assignments are defined by combining two separate CCs,
one being the Most Significant Byte (MSB), and one being the Least Significant Byte (LSB).
Most instruments receive only the MSB (default 7-bit resolution). More information: https://www.presetpatch.com/midi-cc-list.aspx.

Enumerator
BankSelectMsb 

Bank Select (MSB).

Modulation 

Modulation (MSB).

BreathController 

Breath Controller.

FootController 

Foot controller (MSB).

VOLUME_MSB 

Channel volume (named MainVolume before v2.88.2).

Pan 

Pan MSB.

Expression 

Expression (EXPRESSION_MSB).

BankSelectLsb 

Bank Select LSB.
MPTK bank style is FLUID_BANK_STYLE_GS (see FluidSynth): bank = CC0/MSB (CC32/LSB ignored).

Sustain 

Sustain.

Portamento 

Portamento On/Off - not yet implemented.

Sostenuto 

Sostenuto On/Off - not yet implemented.

SoftPedal 

Soft Pedal On/Off - not yet implemented.

LegatoFootswitch 

Legato Footswitch - not yet implemented.

NRPN_LSB 

Non-Registered Parameter Number LSB
http://www.philrees.co.uk/nrpnq.htm.

NRPN_MSB 

Non-Registered Parameter Number MSB
http://www.philrees.co.uk/nrpnq.htm.

RPN_LSB 

Registered Parameter Number LSB
http://www.philrees.co.uk/nrpnq.htm.

RPN_MSB 

Registered Parameter Number MSB
http://www.philrees.co.uk/nrpnq.htm.

AllSoundOff 

All sound off (ALL_SOUND_OFF).

ResetAllControllers 

Reset all controllers (ALL_CTRL_OFF).

AllNotesOff 

All notes off (ALL_NOTES_OFF).

◆ midi_rpn_event

General MIDI RPN event numbers (LSB, MSB = 0). Parameter numbers are configured in two steps:
first select the parameter, then send the data entry value.
For example, to set pitch bend sensitivity to 12 semitones, send the following controller MIDI messages:
.

Enumerator
RPN_PITCH_BEND_RANGE 

Change pitch bend sensitivity.

◆ MPTKMeta

enum MidiPlayerTK.MPTKMeta : byte

MIDI meta event type. Meta events are optional MIDI information; none are mandatory.
In MPTKEvent, the MPTKEvent.Meta attribute defines the type of meta event.

Enumerator
TrackSequenceNumber 

Track sequence number.

TextEvent 

Text event.

Copyright 

Copyright.

SequenceTrackName 

Sequence track name.

TrackInstrumentName 

Track instrument name.

Lyric 

Lyric.

Marker 

Marker.

CuePoint 

Cue point.

ProgramName 

Program (patch) name.

DeviceName 

Device (port) name.

MidiChannel 

MIDI channel (not part of the official SMF meta event set).

MidiPort 

MIDI port (not part of the official SMF meta event set).

EndTrack 

End track.

SetTempo 

Set tempo MPTKEvent.Value contains the new microseconds-per-quarter-note value.

Deprecated
Since 2.10.0, tempo is no longer stored in MPTKEvent.Duration. Use MPTKEvent.QuarterPerMicroSecond2BeatPerMinute() for BPM conversion.
SmpteOffset 

SMPTE offset.

TimeSignature 

Time signature MPTKEvent.Value contains four bytes, from least significant to most significant. See MPTKEvent.ExtractFromInt():

  1. Numerator (number of beats in a bar),
    1. Denominator (beat unit: 1 means 2, 2 means 4 (quarter), 3 means 8 (eighth), 4 means 16, ...)
    2. TicksInMetronomeClick, usually 24 (MIDI clocks per metronome click)
    3. No32ndNotesInQuarterNote, usually 8 (number of 32nd notes per MIDI quarter note)
      Deprecated
      Since 2.10.0, all fields are merged into MPTKEvent.Value.
KeySignature 

Key signature MPTKEvent.Value contains two bytes, from least significant to most significant. See MPTKEvent.ExtractFromInt().

  1. SharpsFlats (number of sharps/flats)
    1. MajorMinor flag (0 the scale is major, 1 the scale is minor).
      Deprecated
      Since 2.10.0, MPTKEvent.Duration no longer contains MajorMinor.
SequencerSpecific 

Sequencer specific.

◆ LoadingStatusMidiEnum

Status of the last MIDI file load operation.

  • -1: midi file is loading
  • 0: success, MIDI file loaded
  • 1: error, no MIDI file found
  • 2: error, not a MIDI file (size too short)
  • 3: error, not a MIDI file (MThd signature not found)
  • 4: error, network error or site not found.
Enumerator
NotYetDefined 

-1: MIDI file is loading.

Success 

0: success, MIDI file loaded.

NotFound 

1: error, no MIDI file found.

TooShortSize 

2: error, not a MIDI file (size too short).

NoMThdSignature 

3: error, not a MIDI file (MThd signature not found).

NetworkError 

4: error, network error or site not found.

MidiFileInvalid 

5: error, MIDI file is corrupted (error detected while loading MIDI events).

SoundFontNotLoaded 

6: SoundFont not loaded.

AlreadyPlaying 

7: error, already playing.

MidiNameInvalid 

8: error, MPTK_MidiName must start with file://, http://, or https:// (MidiExternalPlayer only).

MidiNameNotDefined 

9: error, set MPTK_MidiName by script or in the Inspector with a MIDI URL/path before playing.

MidiFileEmpty 

10: error, Read 0 byte from the MIDI file.

◆ LoadingStatusSoundFontEnum

Status of the last SoundFont load operation.

Enumerator
InProgress 

-1: SoundFont is loading.

Success 

0: success, SoundFont loaded.

NoRIFFSignature 

1: error, no SoundFont found.

2: error, not a SoundFont (size too short).

3: error, not a SoundFont (RIFF signature not found).

NetworkError 

4: error, network error or site not found.

SoundFontNotLoaded 

5: error, SoundFont corrupted, error detected when loading the SoundFont.

6: SoundFont not loaded.

InvalidURL 

7: error, already playing.

AlreadyPlaying = 7,

8: error, URL must start with file:// or http:// or https://