|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jsyn.SynthPort com.softsynth.jsyn.SynthScalarPort com.softsynth.jsyn.SynthVariable
public class SynthVariable
SynthVariables are ports that can be set but not connected.
Method Summary | |
---|---|
double |
get(int partIndex)
|
double |
getCurrent()
|
double |
getCurrent(int partIndex)
This method reaches down to inside the native unit and returns the current value of the signal in its raw form. |
double |
getMax()
|
double |
getMin()
|
void |
set(double value)
|
void |
set(double value,
int partIndex)
|
void |
set(int time,
double value)
|
void |
set(int time,
double value,
int partIndex)
Set the value of a port that controls the instrument. |
void |
setAt(int time,
double value)
Deprecated. Set now has a selector with time as first parameter. |
void |
setAt(int time,
int partIndex,
double value)
Deprecated. Set now has a selector with time as first parameter. |
void |
setMax(double max)
Set maximum preferred value. |
void |
setMin(double min)
Set minimum preferred value. |
void |
setSignalType(int signalType,
int partIndex)
Set type for conversion when set() called. |
void |
setup(double min,
double value,
double max)
Conveniance method for setting minimum, current, and maximum values. |
Methods inherited from class com.softsynth.jsyn.SynthScalarPort |
---|
get |
Methods inherited from class com.softsynth.jsyn.SynthPort |
---|
getAlias, getName, getNumParts, getSignalType, getSignalType, getSound, setAlias, setSignalType, setSignalType, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void setSignalType(int signalType, int partIndex) throws SynthException
setSignalType
in class SynthPort
signalType
- Selects signal type. Legal values are:
SynthException
- If partIndex out of range or illegal signalType.public void setAt(int time, int partIndex, double value) throws SynthException
SynthException
- If partIndex out of range.set(int, double, int)
public void setAt(int time, double value) throws SynthException
SynthException
- If internal error occured.set(int, double, int)
public void set(int time, double value, int partIndex) throws SynthException
sawtooth.amplitude.set( 0.5 ); sawtooth.frequency.set( Synth.getTickCount() + 100, 220.0 );
time
- Time in ticks for setting to occur.value
- Floating point value to set port. Must be in units that
correspond to signal type of port.partIndex
- Index of part of multi-part port. Typically zero.
SynthException
- If partIndex out of range,
or port already connected, or port not settable.public void set(int time, double value) throws SynthException
SynthException
public void set(double value, int partIndex) throws SynthException
SynthException
public void set(double value) throws SynthException
SynthException
public double get(int partIndex) throws SynthException
get
in class SynthScalarPort
SynthException
- If port name is not recognized, or index out of range.public double getCurrent(int partIndex) throws SynthException
SynthException
- If port name is not recognized, or index out of range.public double getCurrent()
public void setMin(double min)
public double getMin()
public void setMax(double max)
public double getMax()
public void setup(double min, double value, double max) throws SynthException
SynthException
- If call to set() fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |