Class el.MidiMessage

A MIDI Message.

Methods

MidiMessage:data () Raw data.
MidiMessage:description () Message description.
MidiMessage:time () Timestamp.
MidiMessage:setTime (t) Change timestamp.
MidiMessage:addTime (dt) Add to timestamp.
MidiMessage:withTime (t) Create copy with a new timestamp.
MidiMessage:channel () Midi Channel.
MidiMessage:hasChannel (ch) Is a channel message.
MidiMessage:setChannel (ch) Set the channel.
MidiMessage:isSysex () Is System Exclusive.
MidiMessage:sysExData () Sysex Data.
MidiMessage:isNoteOn () Is note on.
MidiMessage:isNoteOff () Is note off.
MidiMessage:isNote () Is note on or off.
MidiMessage:note () Note number.
MidiMessage:setNote (note) Change note number.
MidiMessage:velocity () Velocity.
MidiMessage:fvelocity () Float velocity.
MidiMessage:xvelocity (m) Multiply Velocity.
MidiMessage:setVelocity (v) Change velocity.
MidiMessage:isProgram () Is program change?
MidiMessage:program () Program number.
MidiMessage:isPitch () Is pitch message.
MidiMessage:pitch () Pitch.
MidiMessage:isAfterTouch () Is after touch message.
MidiMessage:afterTouch () After touch.
MidiMessage:isPressure () Is pressure message.
MidiMessage:pressure () Pressure.
MidiMessage:isController () Is controller message.
MidiMessage:controller () Returns the controller number.
MidiMessage:controllerValue () Returns the controller value.
MidiMessage:isControllerType (type) Check if this is a particular controller message.
MidiMessage:isNotesOff () True if all notes off message.
MidiMessage:isSoundOff () True if all sounds off message.
MidiMessage:isResetControllers () True if reset controllers message.
MidiMessage:isMeta () True if a Meta message.
MidiMessage:metaType () Returns the metadata type.
MidiMessage:metaData () Returns the metadata.
MidiMessage:metaLength () Returns the metadata length.
MidiMessage:isTrack () Returns true if a track message.
MidiMessage:isTrackEnd () Returns true if track end message.
MidiMessage:isTrackName () Returns true if track name message.
MidiMessage:isText () Returns true if a text message.
MidiMessage:text () Returns the text.
MidiMessage:isTempo () Returns true if a tempo message.
MidiMessage:tempoSPQN () Returns the tempo SPQN.
MidiMessage:tempoTicks () Returns the tempo ticks.
MidiMessage:isActiveSense () Returns true if an active sense message.
MidiMessage:isStart () Returns true if a start message.
MidiMessage:isStop () Returns true if a stop message.
MidiMessage:isContinue () Returns true if a continue message.
MidiMessage:isClock () Returns true if is MIDI clock.
MidiMessage:isSPP () Returns true if a song position pointer.
MidiMessage:sppBeat () Returns true if song position pointer beat.
MidiMessage:isQuarterFrame () Returns true if a quarter frame message.
MidiMessage:quarterFrameSeq () Get the quarter frame sequence.
MidiMessage:quarterFrameValue () Returns true if song position pointer beat.
MidiMessage:isFullFrame () Returns true if a full frame message.
MidiMessage:fullFrameParams () Get full frame parameters.
MidiMessage:isMMC () Returns true if a MMC message.
MidiMessage:mmcCommand () MMC Command.
MidiMessage:goto () MIDI goto.

Constructors

MidiMessage.new (data) Create a new MIDI message.


Methods

MidiMessage:data ()
Raw data.
MidiMessage:description ()
Message description. Get human readable information about the message.

Returns:

    string
MidiMessage:time ()
Timestamp.

Returns:

    number Timestamp
MidiMessage:setTime (t)
Change timestamp. The time format depends on the context in which the message is being used.

Parameters:

  • t number Timestamp to set
MidiMessage:addTime (dt)
Add to timestamp.

Parameters:

  • dt number Delta time to add
MidiMessage:withTime (t)
Create copy with a new timestamp.

Parameters:

  • t number Timestamp to set

Returns:

    kv.MidiMessage New midi message
MidiMessage:channel ()
Midi Channel.

Returns:

    int 1-16 if valid channel
MidiMessage:hasChannel (ch)
Is a channel message. Returns true if the message has the given channel

Parameters:

  • ch integer Channel to check

Returns:

    bool
MidiMessage:setChannel (ch)
Set the channel.

Parameters:

  • ch integer Channel to set (1-16)
MidiMessage:isSysex ()
Is System Exclusive.

Returns:

    True if is SysEx message
MidiMessage:sysExData ()
Sysex Data.

Returns:

  1. Raw sysex bytes
  2. Sysex data size
MidiMessage:isNoteOn ()
Is note on.

Returns:

    True if a note on message
MidiMessage:isNoteOff ()
Is note off.

Returns:

    True if a note on message
MidiMessage:isNote ()
Is note on or off.

Returns:

    True if a note on message
MidiMessage:note ()
Note number.

Returns:

    The note number
MidiMessage:setNote (note)
Change note number.

Parameters:

  • note integer New note number
MidiMessage:velocity ()
Velocity.

Returns:

    int Velocity (0-127)
MidiMessage:fvelocity ()
Float velocity.

Returns:

    number Velocity (0.0-1.0)
MidiMessage:xvelocity (m)
Multiply Velocity.

Parameters:

  • m number Multiplier
MidiMessage:setVelocity (v)
Change velocity.

Parameters:

  • v number New velocity (0.0-1.0)
MidiMessage:isProgram ()
Is program change?

Returns:

    True if a program change message
MidiMessage:program ()
Program number.

Returns:

    int The program number
MidiMessage:isPitch ()
Is pitch message.

Returns:

    True if a pitch message
MidiMessage:pitch ()
Pitch.

Returns:

    int Pitch
MidiMessage:isAfterTouch ()
Is after touch message.

Returns:

    True if an after touch message
MidiMessage:afterTouch ()
After touch.

Returns:

    int After touch value
MidiMessage:isPressure ()
Is pressure message.

Returns:

    True if an after touch message
MidiMessage:pressure ()
Pressure.

Returns:

    int Presure value
MidiMessage:isController ()
Is controller message.

Returns:

    bool True if a controller message
MidiMessage:controller ()
Returns the controller number.

Returns:

    int The controller number
MidiMessage:controllerValue ()
Returns the controller value.

Returns:

    int The controller value
MidiMessage:isControllerType (type)
Check if this is a particular controller message.

Parameters:

  • type integer Controller type to check for
MidiMessage:isNotesOff ()
True if all notes off message.

Returns:

    bool
MidiMessage:isSoundOff ()
True if all sounds off message.

Returns:

    bool
MidiMessage:isResetControllers ()
True if reset controllers message.

Returns:

    bool
MidiMessage:isMeta ()
True if a Meta message.

Returns:

    bool
MidiMessage:metaType ()
Returns the metadata type.

Returns:

    int
MidiMessage:metaData ()
Returns the metadata.
MidiMessage:metaLength ()
Returns the metadata length.

Returns:

    int
MidiMessage:isTrack ()
Returns true if a track message.

Returns:

    bool
MidiMessage:isTrackEnd ()
Returns true if track end message.

Returns:

    bool
MidiMessage:isTrackName ()
Returns true if track name message.

Returns:

    bool
MidiMessage:isText ()
Returns true if a text message.

Returns:

    bool
MidiMessage:text ()
Returns the text.

Returns:

    string
MidiMessage:isTempo ()
Returns true if a tempo message.

Returns:

    bool
MidiMessage:tempoSPQN ()
Returns the tempo SPQN.

Returns:

    int
MidiMessage:tempoTicks ()
Returns the tempo ticks.

Returns:

    int
MidiMessage:isActiveSense ()
Returns true if an active sense message.

Returns:

    bool
MidiMessage:isStart ()
Returns true if a start message.

Returns:

    bool
MidiMessage:isStop ()
Returns true if a stop message.

Returns:

    bool
MidiMessage:isContinue ()
Returns true if a continue message.

Returns:

    bool
MidiMessage:isClock ()
Returns true if is MIDI clock.

Returns:

    bool
MidiMessage:isSPP ()
Returns true if a song position pointer.

Returns:

    bool
MidiMessage:sppBeat ()
Returns true if song position pointer beat.

Returns:

    int
MidiMessage:isQuarterFrame ()
Returns true if a quarter frame message.

Returns:

    bool
MidiMessage:quarterFrameSeq ()
Get the quarter frame sequence.

Returns:

    The sequence
MidiMessage:quarterFrameValue ()
Returns true if song position pointer beat.

Returns:

    int The quarter frame value
MidiMessage:isFullFrame ()
Returns true if a full frame message.

Returns:

    bool
MidiMessage:fullFrameParams ()
Get full frame parameters.

Returns:

    The params
MidiMessage:isMMC ()
Returns true if a MMC message.

Returns:

    bool
MidiMessage:mmcCommand ()
MMC Command.
MidiMessage:goto ()
MIDI goto.

Constructors

MidiMessage.new (data)
Create a new MIDI message.

Parameters:

  • data integer Data as a packed integer. see el.midi

Returns:

    el.MidiMessage
generated by LDoc 1.5.0 Last updated 2024-02-18 20:31:17