|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.InstrumentAdapter jmsltutorial.SineInstrument
public class SineInstrument
This Instrument owns a simple JSyn SineCircuit, and plays it with pitch and amplitude
Constructor Summary | |
---|---|
SineInstrument()
Constructor makes no references to JSyn units. |
Method Summary | |
---|---|
void |
buildFromAttributes()
We don't want to do any JSyn allocation in the constructor. |
int |
getNumOutputs()
In this case return 1. |
java.lang.Object |
getOutput()
Instrument interface. |
java.lang.Object |
getOutput(int part)
Instrument interface. |
static void |
main(java.lang.String[] args)
Test your instrument. |
java.lang.Object |
off(double playTime,
double timeStretch,
double[] dar)
turn instrument off at specified time. |
java.lang.Object |
on(double playTime,
double timeStretch,
double[] dar)
turn instrument on with specified data at specified time |
double |
play(double playTime,
double timeStretch,
double[] dar)
Specify sonic behavior in play() A MusicShape calls its Instrument's play() method for each element, and waits until the time returned by play() before proceeding to the next element. |
double |
update(double playTime,
double timeStretch,
double[] dar)
optionally define update(). |
Methods inherited from class com.softsynth.jmsl.InstrumentAdapter |
---|
close, getDimensionNameSpace, getInterpreter, getMixerClassName, getMusicDevice, getName, getTransposition, noteOff, noteOn, noteOnFor, open, setDimensionNameSpace, setInterpreter, setMixerClassName, setMusicDevice, setName, setTransposition, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SineInstrument()
Method Detail |
---|
public void buildFromAttributes() throws java.lang.Exception
buildFromAttributes
in interface AttributeBuildable
java.lang.Exception
public java.lang.Object getOutput()
getOutput
in interface OutputProvider
getOutput
in class InstrumentAdapter
public java.lang.Object getOutput(int part)
getOutput
in interface OutputProvider
getOutput
in class InstrumentAdapter
public int getNumOutputs()
getNumOutputs
in interface OutputProvider
getNumOutputs
in class InstrumentAdapter
public java.lang.Object on(double playTime, double timeStretch, double[] dar)
on
in interface Instrument
on
in class InstrumentAdapter
Instrument.on(double, double, double[])
public java.lang.Object off(double playTime, double timeStretch, double[] dar)
off
in interface Instrument
off
in class InstrumentAdapter
com.softsynth.jmsl.Instrument#off(double, Object)
public double play(double playTime, double timeStretch, double[] dar)
play
in interface Instrument
play
in class InstrumentAdapter
public double update(double playTime, double timeStretch, double[] dar)
update
in interface Instrument
update
in class InstrumentAdapter
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |