| Package | org.si.sound |
| Class | public class PatternSequencer |
| Inheritance | PatternSequencer SoundObject flash.events.EventDispatcher |
| Subclasses | Arpeggiator, BassSequencer, FlashSoundPlayer, MonophonicSynthesizer |
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | coarseTune : int Master coarse tuning, 1 for half-tone. | SoundObject | |
![]() | delay : Number Sound delay, uint in 16th beat. | SoundObject | |
![]() | driver : SiONDriver [read-only] SiONDriver instrance to operate. | SoundObject | |
![]() | effectors : Array Array of SiEffectBase to modify this sound object's output. | SoundObject | |
![]() | effectSend1 : Number Channel effect send level for slot 1 (0:Minimum - 1:Maximum), this property can control track after play(). | SoundObject | |
![]() | effectSend2 : Number Channel effect send level for slot 2 (0:Minimum - 1:Maximum), this property can control track after play(). | SoundObject | |
![]() | effectSend3 : Number Channel effect send level for slot 3 (0:Minimum - 1:Maximum), this property can control track after play(). | SoundObject | |
![]() | effectSend4 : Number Channel effect send level for slot 4 (0:Minimum - 1:Maximum), this property can control track after play(). | SoundObject | |
![]() | eventMask : int Track event mask. | SoundObject | |
![]() | eventTriggerID : int Track event trigger ID | SoundObject | |
![]() | fineTune : Number Master fine tuning, 1 for half-tone, you can specify fineTune<-1 or fineTune>1. | SoundObject | |
| gateTime : Number [override] current length in the sequence, you cannot change this property. | PatternSequencer | ||
![]() | isPlaying : Boolean [read-only] is playing ? | SoundObject | |
| length : Number [override] current length in the sequence, you cannot change this property. | PatternSequencer | ||
![]() | mute : Boolean Channel mute, this property can control track after play(). | SoundObject | |
![]() | name : String Name. | SoundObject | |
| note : int [override] current note in the sequence, you cannot change this property. | PatternSequencer | ||
![]() | noteOffTriggerType : int [read-only] Track note off trigger type | SoundObject | |
![]() | noteOnTriggerType : int [read-only] Track note on trigger type | SoundObject | |
| onEnterFrame : Function callback on enter frame | PatternSequencer | ||
| onEnterSegment : Function callback on enter segment | PatternSequencer | ||
| onExitFrame : Function callback on exit frame | PatternSequencer | ||
![]() | pan : Number Channel panning (-1:Left - 0:Center - +1:Right), this property can control track after play(). | SoundObject | |
![]() | parent : SoundObjectContainer [read-only] parent container. | SoundObject | |
![]() | pitchBend : Number Channel pitch bend, 1 for halftone, this property can control track after play(). | SoundObject | |
| portament : int portament | PatternSequencer | ||
![]() | quantize : Number Synchronizing quantizing, uint in 16th beat. | SoundObject | |
| sequencer : Sequencer [read-only] the Sequencer instance belonging to this PatternSequencer, where the sequence pattern appears. | PatternSequencer | ||
![]() | synthesizer : VoiceReference Synthesizer to generate sound | SoundObject | |
![]() | trackID : int [read-only] Track id | SoundObject | |
![]() | voice : SiONVoice Voice data to play | SoundObject | |
![]() | volume : Number Channel volume (0:Minimum - 1:Maximum), this property can control track after play(). | SoundObject | |
| Method | Defined By | ||
|---|---|---|---|
PatternSequencer(defaultNote:int = 60, defaultVelocity:int = 128, defaultLength:Number = 0, synth:VoiceReference = null) constructor
| PatternSequencer | ||
![]() | fadeIn(time:Number):void Set fading in. | SoundObject | |
![]() | fadeOut(time:Number):void Set fading out. | SoundObject | |
play():void [override] start sequence | PatternSequencer | ||
![]() | reset():void Reset | SoundObject | |
![]() | setVolume(slot:int, volume:Number):void Set volume by index. | SoundObject | |
stop():void [override] stop sequence | PatternSequencer | ||
| gateTime | property |
gateTime:Number[override] current length in the sequence, you cannot change this property.
public function get gateTime():Number public function set gateTime(value:Number):void| length | property |
length:Number[override] current length in the sequence, you cannot change this property.
public function get length():Number public function set length(value:Number):void| note | property |
note:int[override] current note in the sequence, you cannot change this property.
public function get note():int public function set note(value:int):void| onEnterFrame | property |
onEnterFrame:Functioncallback on enter frame
public function get onEnterFrame():Function public function set onEnterFrame(value:Function):void| onEnterSegment | property |
onEnterSegment:Functioncallback on enter segment
public function get onEnterSegment():Function public function set onEnterSegment(value:Function):void| onExitFrame | property |
onExitFrame:Functioncallback on exit frame
public function get onExitFrame():Function public function set onExitFrame(value:Function):void| portament | property |
portament:intportament
public function get portament():int public function set portament(value:int):void| sequencer | property |
sequencer:Sequencer [read-only] the Sequencer instance belonging to this PatternSequencer, where the sequence pattern appears.
public function get sequencer():Sequencer| PatternSequencer | () | Constructor |
public function PatternSequencer(defaultNote:int = 60, defaultVelocity:int = 128, defaultLength:Number = 0, synth:VoiceReference = null)constructor
ParametersdefaultNote:int (default = 60) — Default note, this value is referenced when Note.note property is -1.
| |
defaultVelocity:int (default = 128) — Default velocity, this value is referenced when Note.velocity property is -1.
| |
defaultLength:Number (default = 0) — Default length, this value is referenced when Note.length property is Number.NaN.
| |
synth:VoiceReference (default = null) — synthesizer to play
|
| play | () | method |
override public function play():voidstart sequence
| stop | () | method |
override public function stop():voidstop sequence
// create new instance
var ps:PatternSequencer = new PatternSequencer();
// set sequence pattern by Note vector
var pat:Vector.<Note> = new Vector.<Note>();
pat.push(new Note(60, 64, 1)); // note C
pat.push(new Note(62, 64, 1)); // note D
pat.push(new Note(64, 64, 2)); // note E with length of 2
pat.push(null); // rest; null means no operation
pat.push(new Note(62, 64, 2)); // note D with length of 2
pat.push(new Note().setRest()); // rest; Note.setRest() method set no operation
// PatternSequencer.sequencer is the sound player
ps.sequencer.pattern = pat;
// play sequence "l16 $cde8d8" in MML
ps.play();