|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jsyn.Synth
public class Synth
Provides general control over synthesizer, constants. Provides a shared synthesis context.
SynthUnit
,
SynthSample
,
SynthEnvelope
,
SynthTable
Field Summary | |
---|---|
static java.lang.String |
copyright
|
static int |
DEBUG_GET_ALLOCS
|
static int |
DEBUG_REPORT
|
static int |
DEBUG_THREAD
|
static double |
DEFAULT_FRAME_RATE
|
static int |
FLAG_AUTO_STOP
FLAG_AUTO_STOP is used with SynthEnvelopeQueue and SynthSampleQueue to make an instrument stop automatically when the data is finished. |
static int |
FLAG_DISABLE_OUTPUT
FLAG_DISABLE_OUTPUT turns off the audio output feature for machines that do not support full duplex recording. |
static int |
FLAG_ENABLE_INPUT
FLAG_ENABLE_INPUT turns on the audio capture feature. |
static int |
FLAG_LOOP_IF_LAST
FLAG_LOOP_IF_LAST is used with SynthEnvelopeQueue and SynthSampleQueue to request that the last block of data queued be looped until another block is queued. |
static int |
FLAG_NON_REAL_TIME
Request that the synthesis occur as fast as possible, which may be slower or faster than real-time. |
static int |
FLAG_SKIP_IF_OTHERS
FLAG_SKIP_IF_OTHERS is used with SynthEnvelopeQueue and SynthSampleQueue. |
static int |
NO_DEVICE
Use with start() when no device desired. |
static int |
NUM_SIGNAL_TYPES
Number of signal types supported. |
static int |
openCount
Is engine started? |
static int |
PRIORITY_HIGH
|
static int |
PRIORITY_LOW
Priority for SynthUnit execution. |
static int |
PRIORITY_MEDIUM
|
static int |
RATE_AUDIO
|
static int |
SIGNAL_TYPE_FULL_RANGE
General signal type for full range scalars. |
static int |
SIGNAL_TYPE_HALF_LIFE
Halflife in seconds. |
static int |
SIGNAL_TYPE_OSC_FREQ
Oscillator frequency in Hertz in the range of +/- Samplerate/2 |
static int |
SIGNAL_TYPE_RAW_SIGNED
Signed signal in the range of -1.0 to +1.0 |
static int |
SIGNAL_TYPE_RAW_UNSIGNED
UNSigned signal in the range of 0.0 to +2.0 |
static int |
SIGNAL_TYPE_SAMPLE_RATE
Sample reader rate in the range of 0.0 to Samplerate*2 |
static int |
SIGNAL_TYPE_SVF_FREQ
Frequency for StateVariableFilter in Hertz. |
static int |
SIGNAL_TYPE_TIME
Time in seconds. |
static int |
SILENT
Value for verbosity, no debug output. |
static int |
TERSE
Value for verbosity, sparse debug output. |
static int |
timeAdvance
Variable that can be used by applications to schedule algorithmically generated events a minimum time in the future. |
static int |
VERBOSE
Value for verbosity, full debug output. |
static int |
verbosity
Deprecated. Use setTrace() instead. |
static int |
VERSION
Version of the Java code for JSyn that you compiled with. |
Constructor Summary | |
---|---|
Synth()
|
Method Summary | |
---|---|
static void |
checkEngineErrors()
Used by sleep routines to keep FIFOs clear. |
static int |
debug()
|
static int |
debug(int command,
int data)
|
static java.lang.String |
errorCodeToString(int errorCode)
|
static int |
getExpirationDate()
|
static int |
getFrameCount()
Returns index of last calculated frame. |
static double |
getFrameRate()
Rate that frames are generated, typically 44100.0. |
static int |
getFramesPerTick()
|
static int |
getObjectCount()
|
static SynthContext |
getSharedContext()
|
static int |
getTickCount()
Get current time in ticks. |
static double |
getTickRate()
|
static int |
getTrace()
|
static double |
getUsage()
Returns the fraction of critical resources used by synthesis context. |
static int |
getVersion()
Version of the Java code in the JSyn JAR file. |
static int |
hashName(java.lang.String name)
Convert a String to a hash value that is used internally in CSyn for fast name lookup. |
static void |
initialize()
Initialize Library. |
static void |
requestVersion(int requestedVersion)
If the existing version is earlier than the requested version, then the user will be instructed to upgrade to the latest version of JSyn. |
static void |
setTrace(int mask)
Set trace flags for debugging. |
static void |
sleepForTicks(int ticks)
Sleep for the specified number of ticks. |
static void |
sleepUntilTick(int tick)
Sleep until the specified tick is reached. |
static void |
start(int flags)
|
static void |
start(int flags,
double frameRate)
|
static void |
start(int flags,
double frameRate,
int inputDeviceID,
int numInputChannels,
int outputDeviceID,
int numOutputChannels)
Starts execution of process that performs synthesis. |
static void |
startEngine(int flags)
Starts execution of process using default frameRate. |
static void |
startEngine(int flags,
double frameRate)
Calls initialize() and start( flags, frameRate ). |
static void |
stop()
Stops execution of process that performs synthesis. |
static void |
stopEngine()
Stops execution of process that performs synthesis. |
static void |
terminate()
Terminate library. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VERSION
getVersion()
,
Constant Field Valuespublic static final java.lang.String copyright
public static int openCount
public static final int SILENT
public static final int TERSE
public static final int VERBOSE
public static int verbosity
public static final int RATE_AUDIO
public static final int PRIORITY_LOW
public static final int PRIORITY_MEDIUM
public static final int PRIORITY_HIGH
public static final int SIGNAL_TYPE_RAW_SIGNED
public static final int SIGNAL_TYPE_RAW_UNSIGNED
public static final int SIGNAL_TYPE_OSC_FREQ
public static final int SIGNAL_TYPE_SAMPLE_RATE
public static final int SIGNAL_TYPE_HALF_LIFE
public static final int SIGNAL_TYPE_TIME
public static final int SIGNAL_TYPE_SVF_FREQ
public static final int SIGNAL_TYPE_FULL_RANGE
public static final int NUM_SIGNAL_TYPES
public static final int NO_DEVICE
public static final int FLAG_NON_REAL_TIME
public static final int FLAG_LOOP_IF_LAST
public static final int FLAG_AUTO_STOP
public static final int FLAG_ENABLE_INPUT
public static final int FLAG_DISABLE_OUTPUT
public static final int FLAG_SKIP_IF_OTHERS
public static final int DEBUG_REPORT
public static final int DEBUG_THREAD
public static final int DEBUG_GET_ALLOCS
public static int timeAdvance
public static final double DEFAULT_FRAME_RATE
Constructor Detail |
---|
public Synth()
Method Detail |
---|
public static int getVersion()
VERSION
public static SynthContext getSharedContext()
public static int debug()
public static int debug(int command, int data)
public static int getExpirationDate()
public static double getUsage()
public static int getObjectCount()
public static int getFrameCount()
public static int getTickCount()
public static int getFramesPerTick()
public static double getFrameRate()
public static double getTickRate()
public static void sleepUntilTick(int tick) throws SynthException
SynthException
- If timer not running.public static void checkEngineErrors() throws SynthException
SynthException
public static void sleepForTicks(int ticks) throws SynthException
SynthException
- If timer not running.public static void startEngine(int flags, double frameRate) throws SynthException
frameRate
- Calculation rate in Hertz, typically 44100.0.
SynthException
- If engine cannot be started or if plugin is an old version, or expired.public static void start(int flags, double frameRate, int inputDeviceID, int numInputChannels, int outputDeviceID, int numOutputChannels) throws SynthException
flags
- used to select options. Legal flags are Synth.FLAG_NON_REAL_TIME, Synth.FLAG_ENABLE_INPUT, Synth.FLAG_DISABLE_OUTPUT.frameRate
- Calculation rate in Hertz, typically 44100.0.inputDeviceID
- PortAudio hardware audio device ID for input, Synth.NO_DEVICE for no input.numInputChannels
- Number of input channels to use. Typically 0 or 2.outputDeviceID
- PortAudio hardware audio device ID for output, Synth.NO_DEVICE for no output.numOutputChannels
- Number of output channels to use. Typically 0 or 2.
SynthException
- If engine cannot be started or if plugin is an old version, or expired.public static void start(int flags, double frameRate) throws SynthException
SynthException
public static void start(int flags) throws SynthException
SynthException
public static void startEngine(int flags) throws SynthException
SynthException
- If engine cannot be started or if plugin is an old version, or expired.public static void stopEngine() throws SynthException
SynthException
- If engine cannot be stopped.public static void stop() throws SynthException
SynthException
- If engine cannot be stopped.public static void requestVersion(int requestedVersion)
public static void initialize() throws SynthException
SynthException
- If engine cannot be started or if plugin is an old version, or expired.public static void terminate() throws SynthException
SynthException
- If engine cannot be stopped.public static java.lang.String errorCodeToString(int errorCode)
public static int hashName(java.lang.String name)
public static void setTrace(int mask)
public static int getTrace()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |