KlattSyn

From STX Wiki
Jump to navigationJump to search

KlattSyn : CObj

The KlattSyn STx class provides an interface to the C++ implementation using the KlattSyn SPAtom.

See the KlattSynTB.sts toolbox file for an example.

Constructor

The KlattSyn class constructor initialised the instance to default values.

Usage:

KlattSyn

Parameters:

The constructor takes no parameters.

Result:

Always returns 0.

Examples:

#KLSYNinstance := cobj new KlattSyn

if '$#KLSYNinstance[?]' != 'instance' em '-1 ; Could not instantiate KlattSyn object'

KlattSyn Member Functions

The KlattSyn class implements the following member functions. See CObj Member Functions for a list of functions implemented in the parent class.

beginKlattSynDialog

The beginKlattSynDialog method displays a stand-alone real-time synthesis dialog allowing the user to modify every parameter used in the synthesis process. It is used, for example, in the KlattSynDialog toolbox function to display the following dialog:

Dialog klatt synthesiser.png

The display is divided into global settings, formant settings and voicing settings. When the synthesis process is started, the global settings become unavailable because they concern the whole synthesis and cannot be changed during execution. The real-time synthesis can be started using the "Start RT Synth" button which produces direct sound output. The "Save to file" box allows the user to select a target file and the duration in frames to save the synthesis output to a wave file. A description of the parameters can be found in [Parameter description part]

beginStopDialog

This method provides an user interface that allows the user to modify the Gain0 synthesis parameter (for amplitude adjustment) and to stop the synthesis.

initialize

The initialise method initializes the class' internal SPU. This method must be called before the method startSynthesis.

Usage:

inst initialize tconfig ; tframe [ ; path ; srate ; nspfr ; synmode ; outmode ]

Parameters:
tconfig
The global configuration table. See the KLATTSYN SPAtom documentation for details.
tframe
The frame parameter table. See the KLATTSYN SPAtom documentation for details.
path
The location of the file to which synthesis output should be written.
srate
The sampling rate.
nspfr
The number of samples per synthesis frame.
synmode
The synthesis mode. This can be either 'list' (each entry of tframe contains the parameters for one frame) or 'loop' (tframe contains one parameter set which is used for each parameter frame).
outmode
The output mode. See the KLATTSYN SPAtom documentation for details.
Result:

Returns an empty string on success or -1 on failure.

startSynthesis

Starts the actual synthesis process.

Navigation menu

Personal tools