Crate midi_msg[][src]

Structs

ChannelBitMap

The set of channels to apply this tuning message to

ControlChangeControllerDestination

Allows for the selection of the destination of a control change message

ControllerDestination

Allows for the selection of the destination of a channel pressure/poly key pressure message CA-022

GlobalParameter

An id:value pair that must line up with the GlobalParameterControl that it is placed in

GlobalParameterControl

Global Parameter Control As defined in CA-024 This C/A is much more permissive than most, and thus has a pretty awkward interface.

HighResTimeCode

Like TimeCode but includes fractional_frames. Used in Time Code Cueing. As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

IdentityReply
KeyBasedInstrumentControl

Intended to act like Control Change messages, but targeted at an individual key. For e.g. Drum sounds that have configurable attack/release/decay per key. Defined in CA-023

KeyBasedTuningDump
ManufacturerID

If second byte is None, it is a one-byte ID

ScaleTuning1Byte

As defined in MIDI Tuning Updated Specification (CA-020/CA-021/RP-020)

ScaleTuning2Byte

As defined in MIDI Tuning Updated Specification (CA-020/CA-021/RP-020)

ScaleTuningDump1Byte

As defined in MIDI Tuning Updated Specification (CA-020/CA-021/RP-020)

ScaleTuningDump2Byte

As defined in MIDI Tuning Updated Specification (CA-020/CA-021/RP-020)

Signature
SoundFileMap
StandardSpeed

TODO As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

StandardTimeCode

Like TimeCode but uses subframes to optional include status flags, and fractional frames may be negative As defined in MIDI Machine Control 1.0 (MMA0016 / RP013) and MIDI Show Control 1.1.1 (RP002/RP014)

StandardTrack

TODO As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

StandardUserBits

As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

TimeCode

As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

TimeCodeStatus
TimeSignature
Tuning
TuningNoteChange
UserBits

As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

WAVMap

Enums

BarMarker
BeatValue
Channel
ChannelModeMsg
ChannelVoiceMsg
ChorusType

The type of chorus only used by GlobalParameterControl::chorus

ControlChange
ControlNumber

An enum that defines the MIDI numbers associated with Control Changes

ControlledParameter

The parameters that can be controlled by ControllerDestination or ControlChangeControllerDestination CA-022

DeviceID
ExtendedLoopType
ExtendedSampleDumpMsg

The extended sample dump messages described in CA-019

FileDumpMsg
FileReferenceMsg

The set of messages used for accessing files on a shared file system or network so they can be used to play sounds without transferring the file contents CA-018

FileReferenceType
FileType
GMPercussionMap

The General MIDI percussion sound to play for the given note number when targeting Channel 10. Use GMPercussionMap::Value as u8 to use as the program number As defined in General MIDI System Level 1 (MMA0007 / RP003)

GMSoundSet

The instrument that should be played when applying a ChannelVoiceMsg::ProgramChange Use GMSoundSet::Sound as u8 to use as the program number Should not be used when targeting channel 10 As defined in General MIDI System Level 1 (MMA0007 / RP003)

GeneralMidi

Used to turn General MIDI level 1 or 2 on, or turn them off Used in UniversalNonRealTimeMsg::GeneralMidi

InformationField

A MIDI Machine Control Information Field, which functions something like an address As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

LoopNumber
LoopType
MachineControlCommandMsg

A MIDI Machine Control Command Only partially implemented. The Unimplemented value can be used to represent commands not supported here. As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

MachineControlResponseMsg

A MIDI Machine Control Response Not implemented. The Unimplemented value can be used to represent generic responses. As defined in MIDI Machine Control 1.0 (MMA0016 / RP013)

MidiMsg
Parameter

“Entry” Parameters can be used to set the given parameters

PolyMode
ReverbType

The type of reverb only used by GlobalParameterControl::reverb

SampleDumpMsg
SelectMap
ShowControlMsg

A MIDI Show Control command As defined in MIDI Show Control 1.1.1 (RP002/RP014)

SlotPath

The “slot” of the device being referred to. Values other than Unregistered come from the General MIDI 2 spec.

SubFrames
SystemCommonMsg
SystemExclusiveMsg
SystemRealTimeMsg
TimeCodeCueingMsg

Realtime Time Code Cueing As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

TimeCodeCueingSetupMsg

Non-realtime Time Code Cueing As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

TimeCodeType
UniversalNonRealTimeMsg
UniversalRealTimeMsg

Functions

freq_to_midi_note_cents

Returns (midi_note_number, additional cents from semitone)

freq_to_midi_note_float

Given a frequency in Hertz, returns a floating point midi note number with 1.0 = 100 cents

midi_note_cents_to_freq

Given a midi note number and additional cents, return the frequency

midi_note_float_to_freq

Given a floating point midi note number, return the frequency in Hertz