Packageorg.si.sion.sequencer.base
Classpublic class MMLSequence
InheritanceMMLSequence Inheritance Object

Sequence of 1 sound channel. MMLData > MMLSequenceGroup > MMLSequence > MMLEvent (">" meanse "has a").



Public Properties
 PropertyDefined By
  hasRepeatAll : Boolean
[read-only] flag for apearance of repeat all command (segno)
MMLSequence
  headEvent : MMLEvent
First MMLEvent.
MMLSequence
  isActive : Boolean
Is active ? The sequence is skipped to play when this value is false.
MMLSequence
  mmlLength : int
[read-only] MML length, in resolution unit (1920 = whole-tone in default).
MMLSequence
  mmlString : String
[read-only] MML String, if its cached when its compiling.
MMLSequence
  nextSequence : MMLSequence
[read-only] next sequence.
MMLSequence
  tailEvent : MMLEvent
Last MMLEvent.
MMLSequence
Public Methods
 MethodDefined By
  
MMLSequence(term:Boolean = false)
Constructor.
MMLSequence
  
appendNewCallback(func:Function, data:int):MMLEvent
Append new Callback function
MMLSequence
  
appendNewEvent(id:int, data:int, length:int = 0):MMLEvent
Append new MMLEvent at tail
MMLSequence
  
connect 2 sequences temporarily, this function doesnt change tail pointer, so you have to call connectBefore(null) after using this connection.
MMLSequence
  
free():void
Free.
MMLSequence
  
Create sequence from Vector.<MMLEvent>.
MMLSequence
  
get system command
MMLSequence
  
initialize.
MMLSequence
  
isEmpty():Boolean
is empty ?
MMLSequence
  
isSystemCommand():Boolean
is system command
MMLSequence
  
pack(seq:ByteArray):void
Pack to ByteArray.
MMLSequence
  
Remove MMLEvent from tail.
MMLSequence
  
prependNewEvent(id:int, data:int, length:int = 0):MMLEvent
Prepend new MMLEvent at head
MMLSequence
  
Add MMLEvent at tail.
MMLSequence
  
Remove MMLEvent from head.
MMLSequence
  
toString():String
toString returns the event ids.
MMLSequence
  
toVector(lengthLimit:int = 0, offset:int = 0, eventID:int = -1):Vector.<MMLEvent>
Returns events as an Vector.<MMLEvent>.
MMLSequence
  
unpack(seq:ByteArray):void
Unpack from ByteArray.
MMLSequence
  
Add MMLEvent at head.
MMLSequence
Property Detail
hasRepeatAllproperty
hasRepeatAll:Boolean  [read-only]

flag for apearance of repeat all command (segno)


Implementation
    public function get hasRepeatAll():Boolean
headEventproperty 
public var headEvent:MMLEvent

First MMLEvent. The ID is always MMLEvent.SEQUENCE_HEAD.

isActiveproperty 
public var isActive:Boolean

Is active ? The sequence is skipped to play when this value is false.

mmlLengthproperty 
mmlLength:int  [read-only]

MML length, in resolution unit (1920 = whole-tone in default).


Implementation
    public function get mmlLength():int
mmlStringproperty 
mmlString:String  [read-only]

MML String, if its cached when its compiling.


Implementation
    public function get mmlString():String
nextSequenceproperty 
nextSequence:MMLSequence  [read-only]

next sequence.


Implementation
    public function get nextSequence():MMLSequence
tailEventproperty 
public var tailEvent:MMLEvent

Last MMLEvent. The ID is always MMLEvent.SEQUENCE_TAIL and lastEvent.next is always null.

Constructor Detail
MMLSequence()Constructor
public function MMLSequence(term:Boolean = false)

Constructor.

Parameters
term:Boolean (default = false)
Method Detail
appendNewCallback()method
public function appendNewCallback(func:Function, data:int):MMLEvent

Append new Callback function

Parameters

func:Function — The function to call. (function(int) : MMLEvent)
 
data:int — The value to pass to the callback as an argument

Returns
MMLEvent
appendNewEvent()method 
public function appendNewEvent(id:int, data:int, length:int = 0):MMLEvent

Append new MMLEvent at tail

Parameters

id:int — MML event id.
 
data:int — MML event data.
 
length:int (default = 0) — MML event length.

Returns
MMLEvent

See also

connectBefore()method 
public function connectBefore(secondHead:MMLEvent):MMLSequence

connect 2 sequences temporarily, this function doesnt change tail pointer, so you have to call connectBefore(null) after using this connection.

Parameters

secondHead:MMLEvent — head event of second sequence, null to set tail event as default.

Returns
MMLSequence — this instance
free()method 
public function free():void

Free.

fromVector()method 
public function fromVector(events:Vector.<MMLEvent>):MMLSequence

Create sequence from Vector.<MMLEvent>.

Parameters

events:Vector.<MMLEvent> — event list of the sequence.

Returns
MMLSequence
getSystemCommand()method 
public function getSystemCommand():String

get system command

Returns
String
initialize()method 
public function initialize():MMLSequence

initialize.

Returns
MMLSequence
isEmpty()method 
public function isEmpty():Boolean

is empty ?

Returns
Boolean
isSystemCommand()method 
public function isSystemCommand():Boolean

is system command

Returns
Boolean
pack()method 
public function pack(seq:ByteArray):void

Pack to ByteArray.

Parameters

seq:ByteArray

pop()method 
public function pop():MMLEvent

Remove MMLEvent from tail.

Returns
MMLEvent — removed MML event. You should call MMLEvent.free() after using this event.
prependNewEvent()method 
public function prependNewEvent(id:int, data:int, length:int = 0):MMLEvent

Prepend new MMLEvent at head

Parameters

id:int — MML event id.
 
data:int — MML event data.
 
length:int (default = 0) — MML event length.

Returns
MMLEvent

See also

push()method 
public function push(e:MMLEvent):MMLEvent

Add MMLEvent at tail.

Parameters

e:MMLEvent — event to be pushed.

Returns
MMLEvent — added event, same as an argument.
shift()method 
public function shift():MMLEvent

Remove MMLEvent from head.

Returns
MMLEvent — removed MML event. You should call MMLEvent.free() after using this event.
toString()method 
public function toString():String

toString returns the event ids.

Returns
String
toVector()method 
public function toVector(lengthLimit:int = 0, offset:int = 0, eventID:int = -1):Vector.<MMLEvent>

Returns events as an Vector.<MMLEvent>.

Parameters

lengthLimit:int (default = 0) — maximum length of returning Vector. When this argument set to 0, the Vector includes all events.
 
offset:int (default = 0) — starting index of returning Vector.
 
eventID:int (default = -1) — event id to get. When this argument set to -1, the Vector includes all kind of events.

Returns
Vector.<MMLEvent>
unpack()method 
public function unpack(seq:ByteArray):void

Unpack from ByteArray.

Parameters

seq:ByteArray

unshift()method 
public function unshift(e:MMLEvent):MMLEvent

Add MMLEvent at head.

Parameters

e:MMLEvent — event to be pushed.

Returns
MMLEvent — added event, same as an argument.