Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.Synthesizer Class Reference

Synthesizer producing dynamic sounds from sources. More...

Inheritance diagram for Dragengine.Scenery.Synthesizer:

Public Member Functions

Constructors
Synthesizer new ()
 Create synthesizer. More...
 
Management
int getChannelCount ()
 Number of channels. More...
 
void setChannelCount (int channelCount)
 Set number of channels. More...
 
int getSampleRate ()
 Sample rate. More...
 
void setSampleRate (int sampleRate)
 Set sample rate. More...
 
int getBytesPerSample ()
 Bytes per sample. More...
 
void setBytesPerSample (int bytesPerSample)
 Set bytes per sample. 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...
 
Links
int getLinkCount ()
 Number of links. More...
 
int addLink (int controller)
 Add link with controller and no mapping points. More...
 
void removeAllLinks ()
 Remove all links. More...
 
void linkSetController (int link, int controller)
 Set controller of link. More...
 
void linkSetRepeat (int link, int repeat)
 Set repeat count along X axis of link. More...
 
void linkSetCurve (int link, CurveBezier curve)
 Set curve of link. More...
 
Sources
int getSourceCount ()
 Number of sources. More...
 
void addSource (SynthesizerSource source)
 Add source. More...
 
SynthesizerSource getSourceAt (int index)
 Source at index. More...
 
void removeAllSources ()
 Remove all sources. More...
 

Detailed Description

Synthesizer producing dynamic sounds from sources.

Contains the definition for producing sounds. Use SynthesizerInstance for to actually produce sounds using individual parameters. Multiple synthesizer instances can share the same synthesizer.

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

Member Function Documentation

◆ addLink()

int Dragengine.Scenery.Synthesizer.addLink ( int  controller)

Add link with controller and no mapping points.

If the controller does not exist the link uses 0 as input value during calculations.

Returns
Index of added link.

◆ addSource()

void Dragengine.Scenery.Synthesizer.addSource ( SynthesizerSource  source)

Add source.

◆ getBytesPerSample()

int Dragengine.Scenery.Synthesizer.getBytesPerSample ( )

Bytes per sample.

◆ getChannelCount()

int Dragengine.Scenery.Synthesizer.getChannelCount ( )

Number of channels.

◆ getControllerAt()

SynthesizerController Dragengine.Scenery.Synthesizer.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.Synthesizer.getControllerCount ( )

Nnumber of controllers.

◆ getControllerNamed()

SynthesizerController Dragengine.Scenery.Synthesizer.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.

◆ getLinkCount()

int Dragengine.Scenery.Synthesizer.getLinkCount ( )

Number of links.

◆ getSampleCount()

float Dragengine.Scenery.Synthesizer.getSampleCount ( )

Number of samples to create.

◆ getSampleRate()

int Dragengine.Scenery.Synthesizer.getSampleRate ( )

Sample rate.

◆ getSourceAt()

SynthesizerSource Dragengine.Scenery.Synthesizer.getSourceAt ( int  index)

Source at index.

Exceptions
EOutOfBoundaryindex is less than 0 or large than or equal to getSourceCount().

◆ getSourceCount()

int Dragengine.Scenery.Synthesizer.getSourceCount ( )

Number of sources.

◆ indexOfControllerNamed()

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

Index of named controller or -1 if not found.

◆ linkSetController()

void Dragengine.Scenery.Synthesizer.linkSetController ( int  link,
int  controller 
)

Set controller of link.

If the controller does not exist the link uses 0 as input value during calculations.

Exceptions
EOutOfBoundarylink is less than 0 or large than or equal to getLinkCount().

◆ linkSetCurve()

void Dragengine.Scenery.Synthesizer.linkSetCurve ( int  link,
CurveBezier  curve 
)

Set curve of link.

Exceptions
EOutOfBoundarylink is less than 0 or large than or equal to getLinkCount().

◆ linkSetRepeat()

void Dragengine.Scenery.Synthesizer.linkSetRepeat ( int  link,
int  repeat 
)

Set repeat count along X axis of link.

Exceptions
EInvalidParamrepeat is less than 1.

◆ new()

Synthesizer Dragengine.Scenery.Synthesizer.new ( )

Create synthesizer.

◆ removeAllLinks()

void Dragengine.Scenery.Synthesizer.removeAllLinks ( )

Remove all links.

◆ removeAllSources()

void Dragengine.Scenery.Synthesizer.removeAllSources ( )

Remove all sources.

◆ setBytesPerSample()

void Dragengine.Scenery.Synthesizer.setBytesPerSample ( int  bytesPerSample)

Set bytes per sample.

◆ setChannelCount()

void Dragengine.Scenery.Synthesizer.setChannelCount ( int  channelCount)

Set number of channels.

◆ setControllerCount()

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

Set number of controllers.

Exceptions
EInvalidParamcount is less than 0.

◆ setSampleCount()

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

Set number of samples to create.

◆ setSampleRate()

void Dragengine.Scenery.Synthesizer.setSampleRate ( int  sampleRate)

Set sample rate.


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