Packagecom.yoambulante.midifiles
Classpublic class MidiMessage
InheritanceMidiMessage Inheritance Object

MidiMessage contains information about the midi event (message) on an especific midi track



Public Properties
 PropertyDefined By
  bin_data : ByteArray
[read-only] Binary data used in System Exclusive Events and in unknown metaevents
MidiMessage
  category : uint
[read-only] this is the event category which could be only one of three CATEGORY_MIDI_CONTROL, CATEGORY_SYSTEM_EXCLUSIVE, CATEGORY_METAEVENT.
MidiMessage
  channel : uint
[read-only] Midi event channel
MidiMessage
  delta_time : uint
[read-only] time ralative with previous event, note zero means must be played at the same time of previous event, when you read this property it turns the .processed to true
MidiMessage
  param1 : uint
[read-only] depending on what kind of event this value must be used differently, normally a value between 0 and 127
MidiMessage
  param2 : uint
[read-only] depending on what kind of event this value must be used differently, normally a value between 0 and 127
MidiMessage
  param3 : uint
[read-only] param3 is used by the MetaEvent SMPTE Offset as Seconds (param1 as Hours and param2 as Minutes) and Time Signature MetaEvent param3 is Metronome-pulse (param1 Numerator and param2 Denominator)
MidiMessage
  param4 : uint
[read-only] param4 is used by the MetaEvent SMPTE Offset as Frames (param1 as Hours and param2 as Minutes) and Time Signature MetaEvent param4 is 32nds (param1 Numerator and param2 Denominator)
MidiMessage
  param5 : uint
[read-only] param5 is only used by the MetaEvent SMPTE Offset as SubFrames (param1 as Hours and param2 as Minutes)
MidiMessage
  processed : Boolean
[read-only] indicates whenever this event message was read
MidiMessage
  str_data : String
[read-only] String data used in expecific MetaEvent
MidiMessage
  type : uint
[read-only] Event type, use function MidiMessage.getTypeDescription to know more about a especific event.
MidiMessage
Public Methods
 MethodDefined By
  
MidiMessage(cate:uint, dtime:uint, type:uint, channel:uint, param1:uint, param2:uint, str:String, param3:uint = 0, param4:uint = 0, param5:uint = 0, bin:ByteArray = null)
MidiMessage
  
[static] returns tempo of a metaevent (set tempo) in beats per minute
MidiMessage
  
MidiMessage
  
[static] Extracts the controller event description based on param1
MidiMessage
  
getTempoBPM(tempo:MidiMessage, signature:MidiMessage):Number
[static] returns a Number which represents the tempo BPM beats per minute.
MidiMessage
  
[static]
MidiMessage
  
[static] extracts the event type description
MidiMessage
  
resetDeltaTime(val:uint):void
Allows you to override (set a new value) the delta time value of the event.
MidiMessage
  
toString():String
Use this function to extract a full detailed descript about the event.
MidiMessage
Public Constants
 ConstantDefined By
  CATEGORY_METAEVENT : uint = 3
[static]
MidiMessage
  CATEGORY_MIDI_CONTROL : uint = 1
[static]
MidiMessage
  CATEGORY_SYSTEM_EXCLUSIVE : uint = 2
[static]
MidiMessage
Property Detail
bin_dataproperty
bin_data:ByteArray  [read-only]

Binary data used in System Exclusive Events and in unknown metaevents


Implementation
    public function get bin_data():ByteArray
categoryproperty 
category:uint  [read-only]

this is the event category which could be only one of three CATEGORY_MIDI_CONTROL, CATEGORY_SYSTEM_EXCLUSIVE, CATEGORY_METAEVENT.


Implementation
    public function get category():uint
channelproperty 
channel:uint  [read-only]

Midi event channel


Implementation
    public function get channel():uint
delta_timeproperty 
delta_time:uint  [read-only]

time ralative with previous event, note zero means must be played at the same time of previous event, when you read this property it turns the .processed to true


Implementation
    public function get delta_time():uint
param1property 
param1:uint  [read-only]

depending on what kind of event this value must be used differently, normally a value between 0 and 127


Implementation
    public function get param1():uint
param2property 
param2:uint  [read-only]

depending on what kind of event this value must be used differently, normally a value between 0 and 127


Implementation
    public function get param2():uint
param3property 
param3:uint  [read-only]

param3 is used by the MetaEvent SMPTE Offset as Seconds (param1 as Hours and param2 as Minutes) and Time Signature MetaEvent param3 is Metronome-pulse (param1 Numerator and param2 Denominator)


Implementation
    public function get param3():uint
param4property 
param4:uint  [read-only]

param4 is used by the MetaEvent SMPTE Offset as Frames (param1 as Hours and param2 as Minutes) and Time Signature MetaEvent param4 is 32nds (param1 Numerator and param2 Denominator)


Implementation
    public function get param4():uint
param5property 
param5:uint  [read-only]

param5 is only used by the MetaEvent SMPTE Offset as SubFrames (param1 as Hours and param2 as Minutes)


Implementation
    public function get param5():uint
processedproperty 
processed:Boolean  [read-only]

indicates whenever this event message was read


Implementation
    public function get processed():Boolean
str_dataproperty 
str_data:String  [read-only]

String data used in expecific MetaEvent


Implementation
    public function get str_data():String
typeproperty 
type:uint  [read-only]

Event type, use function MidiMessage.getTypeDescription to know more about a especific event.


Implementation
    public function get type():uint
Constructor Detail
MidiMessage()Constructor
public function MidiMessage(cate:uint, dtime:uint, type:uint, channel:uint, param1:uint, param2:uint, str:String, param3:uint = 0, param4:uint = 0, param5:uint = 0, bin:ByteArray = null)



Parameters
cate:uint
 
dtime:uint
 
type:uint
 
channel:uint
 
param1:uint
 
param2:uint
 
str:String
 
param3:uint (default = 0)
 
param4:uint (default = 0)
 
param5:uint (default = 0)
 
bin:ByteArray (default = null)
Method Detail
_getTempoBPM()method
public static function _getTempoBPM(e:MidiMessage):Number

returns tempo of a metaevent (set tempo) in beats per minute

Parameters

e:MidiMessage — a valid MidiType event

Returns
Number — return a Number which represents the tempo of a metaevent (set tempo) in beats per minute
clone()method 
public function clone():MidiMessage

Returns
MidiMessage
getControllerDescription()method 
public static function getControllerDescription(e:MidiMessage):String

Extracts the controller event description based on param1

Parameters

e:MidiMessage — a valid MidiType event

Returns
String — return a string with detailed description of the controller event
getTempoBPM()method 
public static function getTempoBPM(tempo:MidiMessage, signature:MidiMessage):Number

returns a Number which represents the tempo BPM beats per minute.

Parameters

tempo:MidiMessage — Set-Tempo midi event message
 
signature:MidiMessage — Time-Signature midi event message

Returns
Number
getTempoMPQN()method 
public static function getTempoMPQN(e:MidiMessage):Number

Parameters

e:MidiMessage

Returns
Number
getTypeDescription()method 
public static function getTypeDescription(e:MidiMessage):String

extracts the event type description

Parameters

e:MidiMessage — a valid MidiType event (message)

Returns
String — return a string with detailed description of the message type
resetDeltaTime()method 
public function resetDeltaTime(val:uint):void

Allows you to override (set a new value) the delta time value of the event.

Parameters

val:uint — new delta time value

toString()method 
public function toString():String

Use this function to extract a full detailed descript about the event.

Returns
String — full detailed information about the event
Constant Detail
CATEGORY_METAEVENTConstant
public static const CATEGORY_METAEVENT:uint = 3

CATEGORY_MIDI_CONTROLConstant 
public static const CATEGORY_MIDI_CONTROL:uint = 1

CATEGORY_SYSTEM_EXCLUSIVEConstant 
public static const CATEGORY_SYSTEM_EXCLUSIVE:uint = 2