Drag[en]gine Script Module DragonScript  1.23
Dragengine.Audio.DynamicMusic.DynamicMusic Class Reference

Dynamic music. More...

Inheritance diagram for Dragengine.Audio.DynamicMusic.DynamicMusic:

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
 

Detailed Description

Dynamic music.

Play back dynamic music using a synthesizer loaded from an XML file.

Member Function Documentation

◆ addPart()

void Dragengine.Audio.DynamicMusic.DynamicMusic.addPart ( DynamicMusicPart  part)

Add part.

◆ addSwitch()

void Dragengine.Audio.DynamicMusic.DynamicMusic.addSwitch ( DynamicMusicSwitch  switch)

Add switch.

◆ createSynthesizer()

Synthesizer Dragengine.Audio.DynamicMusic.DynamicMusic.createSynthesizer ( )

Create synthesizer from dynamic music definition.

◆ forEachPart()

void Dragengine.Audio.DynamicMusic.DynamicMusic.forEachPart ( Block  ablock)

Visit parts with block with DynamicMusicPart as only parameter.

◆ forEachSwitch()

void Dragengine.Audio.DynamicMusic.DynamicMusic.forEachSwitch ( Block  ablock)

Visit switches with block with DynamicMusicSwitch as only parameter.

◆ getControllerPart()

SynthesizerController Dragengine.Audio.DynamicMusic.DynamicMusic.getControllerPart ( )

Part selector controller.

◆ getControllerState()

SynthesizerController Dragengine.Audio.DynamicMusic.DynamicMusic.getControllerState ( )

Play state controller.

◆ getCurPart()

DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getCurPart ( )

Current part played back or null if finished.

◆ getNextPart()

DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getNextPart ( )

Next part to play back or null to stop.

◆ getPartAt()

DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getPartAt ( int  index)

Get part at index.

◆ getPartNamed()

DynamicMusicPart Dragengine.Audio.DynamicMusic.DynamicMusic.getPartNamed ( String  name)

Get named part.

◆ getRemainingTime()

float Dragengine.Audio.DynamicMusic.DynamicMusic.getRemainingTime ( )

Remaining time in the current part.

◆ getSelectNextTime()

float Dragengine.Audio.DynamicMusic.DynamicMusic.getSelectNextTime ( )

Seconds before part finishes to select next part.

◆ getSpeaker()

Speaker Dragengine.Audio.DynamicMusic.DynamicMusic.getSpeaker ( )

Speaker used to play back dynamic music.

◆ getSwitchAt()

DynamicMusicSwitch Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchAt ( int  index)

Get switch at index.

◆ getSwitchCount()

int Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchCount ( )

Number of switches.

◆ getSwitchNamed()

DynamicMusicSwitch Dragengine.Audio.DynamicMusic.DynamicMusic.getSwitchNamed ( String  name)

Get named switch or null if not found.

◆ getSynthesizer()

SynthesizerInstance Dragengine.Audio.DynamicMusic.DynamicMusic.getSynthesizer ( )

Synthesizer used for playing back dynamic music.

◆ hasPart()

bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasPart ( DynamicMusicPart  part)

Part is present.

◆ hasPartNamed()

bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasPartNamed ( String  name)

Named part is present.

◆ hasSwitchNamed()

bool Dragengine.Audio.DynamicMusic.DynamicMusic.hasSwitchNamed ( String  name)

Named switch is present.

◆ new()

DynamicMusic Dragengine.Audio.DynamicMusic.DynamicMusic.new ( )

Create dynamic music.

◆ play()

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.

◆ removeAllParts()

void Dragengine.Audio.DynamicMusic.DynamicMusic.removeAllParts ( )

Remove all parts.

◆ removeAllSwitches()

void Dragengine.Audio.DynamicMusic.DynamicMusic.removeAllSwitches ( )

Remove all switches.

◆ removePart()

void Dragengine.Audio.DynamicMusic.DynamicMusic.removePart ( DynamicMusicPart  part)

Remove part.

◆ removeSwitch()

void Dragengine.Audio.DynamicMusic.DynamicMusic.removeSwitch ( DynamicMusicSwitch  switch)

Remove switch.

◆ stop()

void Dragengine.Audio.DynamicMusic.DynamicMusic.stop ( )

Stop and reset.

◆ update()

void Dragengine.Audio.DynamicMusic.DynamicMusic.update ( )

Update playback.

◆ updateSampleRate()

void Dragengine.Audio.DynamicMusic.DynamicMusic.updateSampleRate ( )

Update next remaining sample rate from synthesizer if present.

◆ updateSpeaker()

void Dragengine.Audio.DynamicMusic.DynamicMusic.updateSpeaker ( )

Update speaker for playing back dynamic music.

Call this method after modifying the parts.

Member Data Documentation

◆ statePlay

final float Dragengine.Audio.DynamicMusic.DynamicMusic.statePlay = 3

State controller values.

◆ stateWait

final float Dragengine.Audio.DynamicMusic.DynamicMusic.stateWait = 2

The documentation for this class was generated from the following file: