| Package | org.si.sion.sequencer.base |
| Class | public class MMLSequence |
| Inheritance | MMLSequence Object |
| Property | Defined 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 | ||
| Method | Defined 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 | ||
getSystemCommand():String 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 | ||
Returns events as an Vector.<MMLEvent>. | MMLSequence | ||
unpack(seq:ByteArray):void Unpack from ByteArray. | MMLSequence | ||
Add MMLEvent at head. | MMLSequence | ||
| hasRepeatAll | property |
hasRepeatAll:Boolean [read-only] flag for apearance of repeat all command (segno)
public function get hasRepeatAll():Boolean| headEvent | property |
public var headEvent:MMLEventFirst MMLEvent. The ID is always MMLEvent.SEQUENCE_HEAD.
| isActive | property |
public var isActive:BooleanIs active ? The sequence is skipped to play when this value is false.
| mmlLength | property |
mmlLength:int [read-only] MML length, in resolution unit (1920 = whole-tone in default).
public function get mmlLength():int| mmlString | property |
mmlString:String [read-only] MML String, if its cached when its compiling.
public function get mmlString():String| nextSequence | property |
nextSequence:MMLSequence [read-only] next sequence.
public function get nextSequence():MMLSequence| tailEvent | property |
public var tailEvent:MMLEventLast MMLEvent. The ID is always MMLEvent.SEQUENCE_TAIL and lastEvent.next is always null.
| MMLSequence | () | Constructor |
public function MMLSequence(term:Boolean = false)Constructor.
Parametersterm:Boolean (default = false) |
| appendNewCallback | () | method |
public function appendNewCallback(func:Function, data:int):MMLEventAppend 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
|
MMLEvent |
| appendNewEvent | () | method |
public function appendNewEvent(id:int, data:int, length:int = 0):MMLEventAppend new MMLEvent at tail
Parameters
id:int — MML event id.
| |
data:int — MML event data.
| |
length:int (default = 0) — MML event length.
|
MMLEvent |
See also
| connectBefore | () | method |
public function connectBefore(secondHead:MMLEvent):MMLSequenceconnect 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.
|
MMLSequence — this instance
|
| free | () | method |
public function free():voidFree.
| fromVector | () | method |
public function fromVector(events:Vector.<MMLEvent>):MMLSequenceCreate sequence from Vector.<MMLEvent>.
Parameters
events:Vector.<MMLEvent> — event list of the sequence.
|
MMLSequence |
| getSystemCommand | () | method |
public function getSystemCommand():Stringget system command
ReturnsString |
| initialize | () | method |
| isEmpty | () | method |
public function isEmpty():Booleanis empty ?
ReturnsBoolean |
| isSystemCommand | () | method |
public function isSystemCommand():Booleanis system command
ReturnsBoolean |
| pack | () | method |
public function pack(seq:ByteArray):voidPack to ByteArray.
Parameters
seq:ByteArray |
| pop | () | method |
public function pop():MMLEventRemove MMLEvent from tail.
ReturnsMMLEvent — removed MML event. You should call MMLEvent.free() after using this event.
|
| prependNewEvent | () | method |
public function prependNewEvent(id:int, data:int, length:int = 0):MMLEventPrepend new MMLEvent at head
Parameters
id:int — MML event id.
| |
data:int — MML event data.
| |
length:int (default = 0) — MML event length.
|
MMLEvent |
See also
| push | () | method |
public function push(e:MMLEvent):MMLEventAdd MMLEvent at tail.
Parameters
e:MMLEvent — event to be pushed.
|
MMLEvent — added event, same as an argument.
|
| shift | () | method |
public function shift():MMLEventRemove MMLEvent from head.
ReturnsMMLEvent — removed MML event. You should call MMLEvent.free() after using this event.
|
| toString | () | method |
public function toString():StringtoString returns the event ids.
ReturnsString |
| 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.
|
Vector.<MMLEvent> |
| unpack | () | method |
public function unpack(seq:ByteArray):voidUnpack from ByteArray.
Parameters
seq:ByteArray |
| unshift | () | method |
public function unshift(e:MMLEvent):MMLEventAdd MMLEvent at head.
Parameters
e:MMLEvent — event to be pushed.
|
MMLEvent — added event, same as an argument.
|