Packageorg.si.sound
Classpublic class SoundObject
InheritanceSoundObject Inheritance flash.events.EventDispatcher
Subclasses MMLPlayer, MultiTrackSoundObject, PatternSequencer, SoundObjectContainer

The SoundObject class is the base class of all objects that operates sounds by SiONDriver.



Public Properties
 PropertyDefined 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
Track gate time (0:Minimum - 1:Maximum).
SoundObject
  isPlaying : Boolean
[read-only] is playing ?
SoundObject
  length : Number
Sound length in 16th beat, 0 sets inifinity length.
SoundObject
  mute : Boolean
Channel mute, this property can control track after play().
SoundObject
  name : String
Name.
SoundObject
  note : int
Base note of this sound
SoundObject
  noteOffTriggerType : int
[read-only] Track note off trigger type
SoundObject
  noteOnTriggerType : int
[read-only] Track note on trigger type
SoundObject
  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
  quantize : Number
Synchronizing quantizing, uint in 16th beat.
SoundObject
  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
Public Methods
 MethodDefined By
  
SoundObject(name:String = null, synth:VoiceReference = null)
constructor.
SoundObject
  
fadeIn(time:Number):void
Set fading in.
SoundObject
  
fadeOut(time:Number):void
Set fading out.
SoundObject
  
play():void
Play sound.
SoundObject
  
reset():void
Reset
SoundObject
  
setVolume(slot:int, volume:Number):void
Set volume by index.
SoundObject
  
stop():void
Stop sound.
SoundObject
Events
 Event Summary Defined By
   Dispatch when the sound ends.SoundObject
   Dispatch when the note off appears in the sequence.SoundObject
   Dispatch when the sound starts.SoundObject
   Dispatch when the note on appears.SoundObject
Property Detail
coarseTuneproperty
coarseTune:int

Master coarse tuning, 1 for half-tone.


Implementation
    public function get coarseTune():int
    public function set coarseTune(value:int):void
delayproperty 
delay:Number

Sound delay, uint in 16th beat.

The default value is 0..


Implementation
    public function get delay():Number
    public function set delay(value:Number):void
driverproperty 
driver:SiONDriver  [read-only]

SiONDriver instrance to operate. this returns null when driver is not created.


Implementation
    public function get driver():SiONDriver
effectorsproperty 
effectors:Array

Array of SiEffectBase to modify this sound object's output.


Implementation
    public function get effectors():Array
    public function set effectors(value:Array):void
effectSend1property 
effectSend1:Number

Channel effect send level for slot 1 (0:Minimum - 1:Maximum), this property can control track after play().


Implementation
    public function get effectSend1():Number
    public function set effectSend1(value:Number):void
effectSend2property 
effectSend2:Number

Channel effect send level for slot 2 (0:Minimum - 1:Maximum), this property can control track after play().


Implementation
    public function get effectSend2():Number
    public function set effectSend2(value:Number):void
effectSend3property 
effectSend3:Number

Channel effect send level for slot 3 (0:Minimum - 1:Maximum), this property can control track after play().


Implementation
    public function get effectSend3():Number
    public function set effectSend3(value:Number):void
effectSend4property 
effectSend4:Number

Channel effect send level for slot 4 (0:Minimum - 1:Maximum), this property can control track after play().


Implementation
    public function get effectSend4():Number
    public function set effectSend4(value:Number):void
eventMaskproperty 
eventMask:int

Track event mask. (value of '@mask' command)


Implementation
    public function get eventMask():int
    public function set eventMask(value:int):void
eventTriggerIDproperty 
eventTriggerID:int

Track event trigger ID


Implementation
    public function get eventTriggerID():int
    public function set eventTriggerID(value:int):void
fineTuneproperty 
fineTune:Number

Master fine tuning, 1 for half-tone, you can specify fineTune<-1 or fineTune>1.


Implementation
    public function get fineTune():Number
    public function set fineTune(value:Number):void
gateTimeproperty 
gateTime:Number

Track gate time (0:Minimum - 1:Maximum). (value of 'q' command 0.125)


Implementation
    public function get gateTime():Number
    public function set gateTime(value:Number):void
isPlayingproperty 
isPlaying:Boolean  [read-only]

is playing ?


Implementation
    public function get isPlaying():Boolean
lengthproperty 
length:Number

Sound length in 16th beat, 0 sets inifinity length.

The default value is 0..


Implementation
    public function get length():Number
    public function set length(value:Number):void
muteproperty 
mute:Boolean

Channel mute, this property can control track after play().


Implementation
    public function get mute():Boolean
    public function set mute(value:Boolean):void
nameproperty 
public var name:String

Name.

noteproperty 
note:int

Base note of this sound


Implementation
    public function get note():int
    public function set note(value:int):void
noteOffTriggerTypeproperty 
noteOffTriggerType:int  [read-only]

Track note off trigger type


Implementation
    public function get noteOffTriggerType():int
noteOnTriggerTypeproperty 
noteOnTriggerType:int  [read-only]

Track note on trigger type


Implementation
    public function get noteOnTriggerType():int
panproperty 
pan:Number

Channel panning (-1:Left - 0:Center - +1:Right), this property can control track after play().


Implementation
    public function get pan():Number
    public function set pan(value:Number):void
parentproperty 
parent:SoundObjectContainer  [read-only]

parent container.


Implementation
    public function get parent():SoundObjectContainer
pitchBendproperty 
pitchBend:Number

Channel pitch bend, 1 for halftone, this property can control track after play().


Implementation
    public function get pitchBend():Number
    public function set pitchBend(value:Number):void
quantizeproperty 
quantize:Number

Synchronizing quantizing, uint in 16th beat. (0:No synchronization, 1:sync.with 16th, 4:sync.with 4th).

The default value is 0..


Implementation
    public function get quantize():Number
    public function set quantize(value:Number):void
synthesizerproperty 
synthesizer:VoiceReference

Synthesizer to generate sound


Implementation
    public function get synthesizer():VoiceReference
    public function set synthesizer(value:VoiceReference):void
trackIDproperty 
trackID:int  [read-only]

Track id


Implementation
    public function get trackID():int
voiceproperty 
voice:SiONVoice

Voice data to play


Implementation
    public function get voice():SiONVoice
    public function set voice(value:SiONVoice):void
volumeproperty 
volume:Number

Channel volume (0:Minimum - 1:Maximum), this property can control track after play().


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor Detail
SoundObject()Constructor
public function SoundObject(name:String = null, synth:VoiceReference = null)

constructor.

Parameters
name:String (default = null)
 
synth:VoiceReference (default = null)
Method Detail
fadeIn()method
public function fadeIn(time:Number):void

Set fading in.

Parameters

time:Number — fading time[sec].

fadeOut()method 
public function fadeOut(time:Number):void

Set fading out.

Parameters

time:Number — fading time[sec].

play()method 
public function play():void

Play sound.

reset()method 
public function reset():void

Reset

setVolume()method 
public function setVolume(slot:int, volume:Number):void

Set volume by index.

Parameters

slot:int — streaming slot number.
 
volume:Number — volume (0:Minimum - 1:Maximum).

stop()method 
public function stop():void

Stop sound.

Event Detail
noteOffFrame Event
Event Object Type: org.si.sound.events.SoundObjectEvent
SoundObjectEvent.type property = org.si.sound.events.SoundObjectEvent.NOTE_OFF_FRAME

Dispatch when the sound ends.

The properties of the event object have the following values:

PropertyValue
cancelablefalse
soundObjectTarget SoundObject.
trackSiMMLTrack instance executing sequence.
eventTriggerIDTrigger ID specifyed by setEventTrigger().
noteNote number.
bufferIndexBuffering index
noteOffStream Event  
Event Object Type: org.si.sound.events.SoundObjectEvent
SoundObjectEvent.type property = org.si.sound.events.SoundObjectEvent.NOTE_OFF_STREAM

Dispatch when the note off appears in the sequence.

The properties of the event object have the following values:

PropertyValue
cancelablefalse
soundObjectTarget SoundObject.
trackSiMMLTrack instance executing sequence.
eventTriggerIDTrigger ID specifyed by setEventTrigger().
noteNote number.
bufferIndexBuffering index
noteOnFrame Event  
Event Object Type: org.si.sound.events.SoundObjectEvent
SoundObjectEvent.type property = org.si.sound.events.SoundObjectEvent.NOTE_ON_FRAME

Dispatch when the sound starts.

The properties of the event object have the following values:

PropertyValue
cancelablefalse
soundObjectTarget SoundObject.
trackSiMMLTrack instance executing sequence.
eventTriggerIDTrigger ID specifyed by setEventTrigger().
noteNote number.
bufferIndexBuffering index
noteOnStream Event  
Event Object Type: org.si.sound.events.SoundObjectEvent
SoundObjectEvent.type property = org.si.sound.events.SoundObjectEvent.NOTE_ON_STREAM

Dispatch when the note on appears.

The properties of the event object have the following values:

PropertyValue
cancelablefalse
soundObjectTarget SoundObject.
trackSiMMLTrack instance executing sequence.
eventTriggerIDTrigger ID specifyed by setEventTrigger().
noteNote number.
bufferIndexBuffering index