Drag[en]gine Script Module DragonScript
1.23
|
Dynamic music. More...
Public Member Functions | |
void | addPart (DynamicMusicPart part) |
Add part. More... | |
void | addSwitch (DynamicMusicSwitch switch) |
Add switch. More... | |
Synthesizer | createSynthesizer () |
Create synthesizer from dynamic music definition. More... | |
void | forEachPart (Block ablock) |
Visit parts with block with DynamicMusicPart as only parameter. More... | |
void | forEachSwitch (Block ablock) |
Visit switches with block with DynamicMusicSwitch as only parameter. More... | |
SynthesizerController | getControllerPart () |
Part selector controller. More... | |
SynthesizerController | getControllerState () |
Play state controller. More... | |
DynamicMusicPart | getCurPart () |
Current part played back or null if finished. More... | |
DynamicMusicPart | getNextPart () |
Next part to play back or null to stop. More... | |
DynamicMusicPart | getPartAt (int index) |
Get part at index. More... | |
DynamicMusicPart | getPartNamed (String name) |
Get named part. More... | |
float | getRemainingTime () |
Remaining time in the current part. More... | |
float | getSelectNextTime () |
Seconds before part finishes to select next part. More... | |
Speaker | getSpeaker () |
Speaker used to play back dynamic music. More... | |
DynamicMusicSwitch | getSwitchAt (int index) |
Get switch at index. More... | |
int | getSwitchCount () |
Number of switches. More... | |
DynamicMusicSwitch | getSwitchNamed (String name) |
Get named switch or null if not found. More... | |
SynthesizerInstance | getSynthesizer () |
Synthesizer used for playing back dynamic music. More... | |
bool | hasPart (DynamicMusicPart part) |
Part is present. More... | |
bool | hasPartNamed (String name) |
Named part is present. More... | |
bool | hasSwitchNamed (String name) |
Named switch is present. More... | |
DynamicMusic | new () |
Create dynamic music. More... | |
void | play () |
Start playing. More... | |
void | removeAllParts () |
Remove all parts. More... | |
void | removeAllSwitches () |
Remove all switches. More... | |
void | removePart (DynamicMusicPart part) |
Remove part. More... | |
void | removeSwitch (DynamicMusicSwitch switch) |
Remove switch. More... | |
void | stop () |
Stop and reset. More... | |
void | update () |
Update playback. More... | |
void | updateSampleRate () |
Update next remaining sample rate from synthesizer if present. More... | |
void | updateSpeaker () |
Update speaker for playing back dynamic music. More... | |
Public Attributes | |
final float | statePlay = 3 |
State controller values. More... | |
final float | stateWait = 2 |
Dynamic music.
Play back dynamic music using a synthesizer loaded from an XML file.
void Dragengine.Audio.DynamicMusic.DynamicMusic.addPart | ( | DynamicMusicPart | part | ) |
Add part.
void Dragengine.Audio.DynamicMusic.DynamicMusic.addSwitch | ( | DynamicMusicSwitch | switch | ) |
Add switch.
Synthesizer Dragengine.Audio.DynamicMusic.DynamicMusic.createSynthesizer | ( | ) |
Create synthesizer from dynamic music definition.
void Dragengine.Audio.DynamicMusic.DynamicMusic.forEachPart | ( | Block | ablock | ) |
Visit parts with block with DynamicMusicPart as only parameter.
void Dragengine.Audio.DynamicMusic.DynamicMusic.forEachSwitch | ( | Block | ablock | ) |
Visit switches with block with DynamicMusicSwitch as only parameter.
SynthesizerController Dragengine.Audio.DynamicMusic.DynamicMusic.getControllerPart | ( | ) |
Part selector controller.
SynthesizerController Dragengine.Audio.DynamicMusic.DynamicMusic.getControllerState | ( | ) |
Play state controller.
DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getCurPart | ( | ) |
Current part played back or null if finished.
DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getNextPart | ( | ) |
Next part to play back or null to stop.
DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getPartAt | ( | int | index | ) |
Get part at index.
DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getPartNamed | ( | String | name | ) |
Get named part.
float Dragengine.Audio.DynamicMusic.DynamicMusic.getRemainingTime | ( | ) |
Remaining time in the current part.
float Dragengine.Audio.DynamicMusic.DynamicMusic.getSelectNextTime | ( | ) |
Seconds before part finishes to select next part.
Speaker Dragengine.Audio.DynamicMusic.DynamicMusic.getSpeaker | ( | ) |
Speaker used to play back dynamic music.
DynamicMusicSwitch Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchAt | ( | int | index | ) |
Get switch at index.
int Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchCount | ( | ) |
Number of switches.
DynamicMusicSwitch Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchNamed | ( | String | name | ) |
Get named switch or null if not found.
SynthesizerInstance Dragengine.Audio.DynamicMusic.DynamicMusic.getSynthesizer | ( | ) |
Synthesizer used for playing back dynamic music.
bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasPart | ( | DynamicMusicPart | part | ) |
Part is present.
bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasPartNamed | ( | String | name | ) |
Named part is present.
bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasSwitchNamed | ( | String | name | ) |
Named switch is present.
DynamicMusic Dragengine.Audio.DynamicMusic.DynamicMusic.new | ( | ) |
Create dynamic music.
void Dragengine.Audio.DynamicMusic.DynamicMusic.play | ( | ) |
Start playing.
Evaluates switches with init part to select part to start playing. If not valid does not start playing.
void Dragengine.Audio.DynamicMusic.DynamicMusic.removeAllParts | ( | ) |
Remove all parts.
void Dragengine.Audio.DynamicMusic.DynamicMusic.removeAllSwitches | ( | ) |
Remove all switches.
void Dragengine.Audio.DynamicMusic.DynamicMusic.removePart | ( | DynamicMusicPart | part | ) |
Remove part.
void Dragengine.Audio.DynamicMusic.DynamicMusic.removeSwitch | ( | DynamicMusicSwitch | switch | ) |
Remove switch.
void Dragengine.Audio.DynamicMusic.DynamicMusic.stop | ( | ) |
Stop and reset.
void Dragengine.Audio.DynamicMusic.DynamicMusic.update | ( | ) |
Update playback.
void Dragengine.Audio.DynamicMusic.DynamicMusic.updateSampleRate | ( | ) |
Update next remaining sample rate from synthesizer if present.
void Dragengine.Audio.DynamicMusic.DynamicMusic.updateSpeaker | ( | ) |
Update speaker for playing back dynamic music.
Call this method after modifying the parts.
final float Dragengine.Audio.DynamicMusic.DynamicMusic.statePlay = 3 |
State controller values.
final float Dragengine.Audio.DynamicMusic.DynamicMusic.stateWait = 2 |