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