Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
Management
int getChannelCount ()
 Number of channels.
void setChannelCount (int channelCount)
 Set number of channels.
int getSampleRate ()
 Sample rate.
void setSampleRate (int sampleRate)
 Set sample rate.
int getBytesPerSample ()
 Bytes per sample.
void setBytesPerSample (int bytesPerSample)
 Set bytes per sample.
float getSampleCount ()
 Number of samples to create.
void setSampleCount (int sampleCount)
 Set number of samples to create.
Controllers
int getControllerCount ()
 Nnumber of controllers.
void setControllerCount (int count)
 Set number of controllers.
SynthesizerController getControllerAt (int index)
 Get wrapper for controller.
SynthesizerController getControllerNamed (String name)
 Get wrapper for controller if present.
int indexOfControllerNamed (String name)
 Index of named controller or -1 if not found.
Links
int getLinkCount ()
 Number of links.
int addLink (int controller)
 Add link with controller and no mapping points.
void removeAllLinks ()
 Remove all links.
void linkSetController (int link, int controller)
 Set controller of link.
void linkSetRepeat (int link, int repeat)
 Set repeat count along X axis of link.
void linkSetCurve (int link, CurveBezier curve)
 Set curve of link.
Sources
int getSourceCount ()
 Number of sources.
void addSource (SynthesizerSource source)
 Add source.
SynthesizerSource getSourceAt (int index)
 Source at index.
void removeAllSources ()
 Remove all sources.

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.

References getControllerNamed().

Referenced by linkSetCurve().

◆ addSource()

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

Add source.

References linkSetController().

Referenced by removeAllSources().

◆ getBytesPerSample()

int Dragengine.Scenery.Synthesizer.getBytesPerSample ( )

Bytes per sample.

Referenced by getSampleCount().

◆ getChannelCount()

int Dragengine.Scenery.Synthesizer.getChannelCount ( )

Number of channels.

References getChannelCount().

Referenced by getChannelCount().

◆ 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().

References setControllerCount().

Referenced by indexOfControllerNamed().

◆ getControllerCount()

int Dragengine.Scenery.Synthesizer.getControllerCount ( )

Nnumber of controllers.

References setSampleCount().

Referenced by setControllerCount().

◆ 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.

Referenced by addLink().

◆ getLinkCount()

int Dragengine.Scenery.Synthesizer.getLinkCount ( )

Number of links.

Referenced by linkSetController().

◆ getSampleCount()

float Dragengine.Scenery.Synthesizer.getSampleCount ( )

Number of samples to create.

References getBytesPerSample().

Referenced by setSampleCount().

◆ getSampleRate()

int Dragengine.Scenery.Synthesizer.getSampleRate ( )

Sample rate.

References setChannelCount().

Referenced by setSampleRate().

◆ getSourceAt()

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

Source at index.

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

Referenced by removeAllSources().

◆ getSourceCount()

int Dragengine.Scenery.Synthesizer.getSourceCount ( )

Number of sources.

Referenced by removeAllSources().

◆ indexOfControllerNamed()

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

Index of named controller or -1 if not found.

References getControllerAt().

Referenced by removeAllLinks().

◆ 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().

References getLinkCount().

Referenced by addSource().

◆ 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().

References addLink(), and removeAllLinks().

Referenced by removeAllSources().

◆ linkSetRepeat()

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

Set repeat count along X axis of link.

Exceptions
EInvalidParamrepeat is less than 1.

Referenced by removeAllSources().

◆ new()

Synthesizer Dragengine.Scenery.Synthesizer.new ( )

Create synthesizer.

References new().

Referenced by new().

◆ removeAllLinks()

void Dragengine.Scenery.Synthesizer.removeAllLinks ( )

Remove all links.

References indexOfControllerNamed().

Referenced by linkSetCurve().

◆ removeAllSources()

void Dragengine.Scenery.Synthesizer.removeAllSources ( )

◆ setBytesPerSample()

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

Set bytes per sample.

References setSampleRate().

Referenced by setSampleCount().

◆ setChannelCount()

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

Set number of channels.

Referenced by getSampleRate().

◆ setControllerCount()

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

Set number of controllers.

Exceptions
EInvalidParamcount is less than 0.

References getControllerCount().

Referenced by getControllerAt().

◆ setSampleCount()

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

Set number of samples to create.

References getSampleCount(), and setBytesPerSample().

Referenced by getControllerCount().

◆ setSampleRate()

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

Set sample rate.

References getSampleRate().

Referenced by setBytesPerSample().


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