SeiON: Actionscript 3 Sound Engine | All Packages | All Classes | Index | Frames No Frames |
SeionPitch

Package | com.SeiON.Extras
Class | public final class SeionPitch
Inheritance | SeionPitch SeionInstance Object

An ISeionInstance that can adjust pitch, and change starting offset, truncation, by specifying a byte range.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | autodispose : Boolean [read-only] Whether this sound is auto-disposable. | SeionInstance
|  | isPaused : Boolean [override] [read-only] Is the playback paused? (ISeionControl) | SeionPitch
|  | isPlaying : Boolean [override] [read-only] Is the sound active? (ISeionInstance) | SeionPitch
|  | length : Number [override] [read-only] The total length of the clip, excluding repeats. | SeionPitch
|  | manager : SeionGroup [read-only] Returns the manager that holds this ISeionInstance. | SeionInstance
|  | name : String The name of the clip, non-unique. | SeionInstance
|  | offset : uint [read-only] The approximate delayed starting position. | SeionPitch
|  | pan : Number Get: The panning as affected by its parent. | SeionInstance
|  | position : Number [override] [read-only] Invalid | SeionPitch
|  | progress : Number [override] [read-only] Invalid | SeionPitch
|  | rate : Number Rate of playback of the clip. 1.0 is normal speed, 0.5 is half speed, 2.0 is twice faster. Range: 0 to 50 (0.005 precision) Rate is tied into pause and resume. When rate is set at 0, the sound is paused. | SeionPitch
|  | repeat : int How many times the SeionInstance is programmed to repeat itself. | SeionInstance
|  | repeatLeft : int [read-only] How many more times the SeionInstance has to repeat itself. | SeionInstance
|  | soundtransform : SoundTransform [read-only] Returns the predefined sound properties of the sound. | SeionInstance
|  | truncate : uint [read-only] The approximate truncation from the ending position. | SeionPitch
|  | volume : Number Get: The volume as affected by its parent. | SeionInstance

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | SeionPitch(secretKey:*) Please do not call this constructor directly; it will throw an error. | SeionPitch
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | SeionInstance
|  | create(name:String, manager:SeionGroup, snd:Sound, rate:Number, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionPitch [static] Creates a sound clip that can be pitch-shifted. | SeionPitch
|  | createExcerpt(name:String, manager:SeionGroup, snd:Sound, rate:Number, offset:uint, truncate:uint, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionPitch [static] Creates a sound clip that can be pitch-shifted. | SeionPitch
|  | dispatchEvent(event:Event):Boolean | SeionInstance
|  | dispose():void [override] Clears all references held. | SeionPitch
|  | hasEventListener(type:String):Boolean | SeionInstance
|  | isDisposed(output:Boolean = true):Boolean Is the SeionInstance already disposed of? (ISeionInstance) | SeionInstance
|  | pause():void [override] Pauses playback of sound. | SeionPitch
|  | play():void [override] Plays the sound from the beginning again. | SeionPitch
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void | SeionInstance
|  | resume():void [override] Resumes playback of sound. | SeionPitch
|  | stop():void [override] Stops the sound and resets it to Zero. | SeionPitch
|  | willTrigger(type:String):Boolean | SeionInstance

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | soundComplete | Defines the value when a SeionInstance finishes playback and does not repeat. | SeionInstance
|  | soundRepeat | Defines the value when a SeionInstance loops itself. | SeionInstance

Property Detail

isPaused | property

`isPaused:Boolean` [read-only] [override]

Is the playback paused? (ISeionControl)

Implementation
`public function get isPaused():Boolean`

isPlaying | property |

`isPlaying:Boolean` [read-only] [override]

Is the sound active? (ISeionInstance)

Implementation
`public function get isPlaying():Boolean`

length | property |

`length:Number` [read-only] [override]

The total length of the clip, excluding repeats. In Milliseconds.

Because of latency issues, the length of playback is inaccurate. (ISeionInstance)
Implementation
`public function get length():Number`

offset | property |

`offset:uint` [read-only]

The approximate delayed starting position. In bytes.

Implementation
`public function get offset():uint`

position | property |

`position:Number` [read-only] [override]

Invalid

Implementation
`public function get position():Number`

progress | property |

`progress:Number` [read-only] [override]

Invalid

Implementation
`public function get progress():Number`

rate | property |

`rate:Number`

Rate of playback of the clip.

1.0 is normal speed, 0.5 is half speed, 2.0 is twice faster. Range: 0 to 50 (0.005 precision)

Rate is tied into pause and resume. When rate is set at 0, the sound is paused. Setting it to a value higher than 0 will resume it. Likewise, when a sound is paused, rate is 0. Resuming it will give the last non-zero rate.
Implementation
`public function get rate():Number`
`public function set rate(value:Number):void`

truncate | property |

`truncate:uint` [read-only]

The approximate truncation from the ending position. In bytes.

Implementation
`public function get truncate():uint`
Constructor Detail

SeionPitch | () | Constructor

`public function SeionPitch(secretKey:*)`

Please do not call this constructor directly; it will throw an error. Call it through SeionPitch.create().

Parameters

| `secretKey:*`

See also

SeionPitch.create()
Method Detail

create | () | method

`public static function create(name:String, manager:SeionGroup, snd:Sound, rate:Number, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionPitch`

Creates a sound clip that can be pitch-shifted.

Note that not the full length of clip will be faithfully reproduced due to latency issues.

Parameters

| `name:String` — Any name, even a non-unique one.
| `manager:SeionGroup` — The SeionGroup that manages this SeionSample. Immutable.
| `snd:Sound` — The sound data. Immutable.
| `rate:Number` — The rate of playback.
| `repeat:int` — How many times to repeat the clip.
| `autodispose:Boolean` (default = `true`)`` — Whether the clip will auto-mark for GC. Immutable.
| `sndTransform:SoundTransform` (default = `null`)`` — The fixed internal property for the sound.

Returns

| `SeionPitch` — A SeionPitch if allocation was successful. Null if allocation failed, or autodispose is true.

See also

SeionInstance.name
SeionInstance.manager
length
rate
SeionInstance.repeat
SeionInstance.autodispose
SeionInstance.soundTransform

createExcerpt | () | method |

`public static function createExcerpt(name:String, manager:SeionGroup, snd:Sound, rate:Number, offset:uint, truncate:uint, repeat:int, autodispose:Boolean = true, sndTransform:SoundTransform = null):SeionPitch`

Creates a sound clip that can be pitch-shifted.

Note that because of latency issues, the length of the clip, its offset and truncate values will not be meaningful.

Parameters

| `name:String` — Any name, even a non-unique one.
| `manager:SeionGroup` — The SeionGroup that manages this SeionSample. Immutable.
| `snd:Sound` — The sound data. Immutable.
| `rate:Number` — The rate of playback.
| `offset:uint` — The approximate delayed starting position. In Bytes. Immutable.
| `truncate:uint` — The approximate truncation from the ending position. In Bytes. Immutable.
| `repeat:int` — How many times to repeat the clip.
| `autodispose:Boolean` (default = `true`)`` — Whether the clip will auto-mark for GC. Immutable.
| `sndTransform:SoundTransform` (default = `null`)`` — The fixed internal property for the sound.

Returns

| `SeionPitch` — A SeionPitch if allocation was successful. Null if allocation failed, or autodispose is true.

See also

SeionInstance.name
SeionInstance.manager
length
rate
SeionInstance.repeat
SeionInstance.autodispose
SeionInstance.soundTransform

dispose | () | method |

`override public function dispose():void`

Clears all references held. This object is now invalid. (ISeionInstance)

pause | () | method |

`override public function pause():void`

Pauses playback of sound. (ISeionControl)

play | () | method |

`override public function play():void`

Plays the sound from the beginning again. (ISeionInstance)

resume | () | method |

`override public function resume():void`

Resumes playback of sound. (ISeionControl)

stop | () | method |

`override public function stop():void`

Stops the sound and resets it to Zero. (ISeionInstance)

Tue Jun 21 2011, 10:05 PM +08:00