Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.SynthesizerInstance Class Reference

Synthesizer instance producing source using a synthesizer. More...

Inheritance diagram for Dragengine.Scenery.SynthesizerInstance:

Public Member Functions

Constructors
SynthesizerInstance new ()
 Create synthesizer instance. More...
 
Management
Synthesizer getSynthesizer ()
 synthesizer or null if not set. More...
 
void setSynthesizer (Synthesizer synthesizer)
 Set synthesizer or null if not set. More...
 
float getSampleCount ()
 Number of samples to create. More...
 
void setSampleCount (int sampleCount)
 Set number of samples to create. More...
 
Controllers
int getControllerCount ()
 Nnumber of controllers. More...
 
void setControllerCount (int count)
 Set number of controllers. More...
 
SynthesizerController getControllerAt (int index)
 Get wrapper for controller. More...
 
SynthesizerController getControllerNamed (String name)
 Get wrapper for controller if present. More...
 
int indexOfControllerNamed (String name)
 Index of named controller or -1 if not found. More...
 
void copyControllerStates (SynthesizerInstance instance, int count)
 Copy the first count controller values and vectors from another synthesizer instance. More...
 
void copyControllerStates (SynthesizerInstance instance, int offset, int count)
 Copy the first count controller values and vectors from another synthesizer instance. More...
 
void copyNamedControllerStates (SynthesizerInstance instance)
 Copy name matching controller values and vectors from another synthesizer instance. More...
 

Detailed Description

Synthesizer instance producing source using a synthesizer.

Every synthesizer contains a set of sources and controllers indicating how the final sound is produced. While synthesizers define this production process the synthesizer instance produces the actual sound using per instance parameters.

This is a native class. It can not be subclassed.

Member Function Documentation

◆ copyControllerStates() [1/2]

void Dragengine.Scenery.SynthesizerInstance.copyControllerStates ( SynthesizerInstance  instance,
int  count 
)

Copy the first count controller values and vectors from another synthesizer instance.

Bones outside the number of controllers are ignored.

Exceptions
EInvalidParamcount is less than 0.

◆ copyControllerStates() [2/2]

void Dragengine.Scenery.SynthesizerInstance.copyControllerStates ( SynthesizerInstance  instance,
int  offset,
int  count 
)

Copy the first count controller values and vectors from another synthesizer instance.

Offset index of controller to copy from other synthesizer. Bones outside the number of controllers are ignored.

Exceptions
EInvalidParamcount is less than 0.

◆ copyNamedControllerStates()

void Dragengine.Scenery.SynthesizerInstance.copyNamedControllerStates ( SynthesizerInstance  instance)

Copy name matching controller values and vectors from another synthesizer instance.

Non-matching controllers are ignored.

◆ getControllerAt()

SynthesizerController Dragengine.Scenery.SynthesizerInstance.getControllerAt ( int  index)

Get wrapper for controller.

Warning
The wrapper is only valid as long as the controller structure in the synthesizer is not changed.
Parameters
indexIndex of controller. If index is negative controller count is added to it. This allows to get controllers starting from the last controller.
Exceptions
EOutOfBoundarycontroller is less than -getControllerCount() or larger than or equal to getControllerCount().

◆ getControllerCount()

int Dragengine.Scenery.SynthesizerInstance.getControllerCount ( )

Nnumber of controllers.

◆ getControllerNamed()

SynthesizerController Dragengine.Scenery.SynthesizerInstance.getControllerNamed ( String  name)

Get wrapper for controller if present.

Warning
The wrapper is only valid as long as the controller structure in the synthesizer is not changed.
Parameters
nameName of controller. If no controller with this name is present null is returned.

◆ getSampleCount()

float Dragengine.Scenery.SynthesizerInstance.getSampleCount ( )

Number of samples to create.

◆ getSynthesizer()

Synthesizer Dragengine.Scenery.SynthesizerInstance.getSynthesizer ( )

synthesizer or null if not set.

◆ indexOfControllerNamed()

int Dragengine.Scenery.SynthesizerInstance.indexOfControllerNamed ( String  name)

Index of named controller or -1 if not found.

◆ new()

SynthesizerInstance Dragengine.Scenery.SynthesizerInstance.new ( )

Create synthesizer instance.

◆ setControllerCount()

void Dragengine.Scenery.SynthesizerInstance.setControllerCount ( int  count)

Set number of controllers.

Exceptions
EInvalidParamcount is less than 0.

◆ setSampleCount()

void Dragengine.Scenery.SynthesizerInstance.setSampleCount ( int  sampleCount)

Set number of samples to create.

◆ setSynthesizer()

void Dragengine.Scenery.SynthesizerInstance.setSynthesizer ( Synthesizer  synthesizer)

Set synthesizer or null if not set.


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