|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 AttributeBuildablejava.lang.Exceptionpublic java.lang.Object getOutput()
getOutput in interface OutputProvidergetOutput in class InstrumentAdapterpublic java.lang.Object getOutput(int part)
getOutput in interface OutputProvidergetOutput in class InstrumentAdapterpublic int getNumOutputs()
getNumOutputs in interface OutputProvidergetNumOutputs in class InstrumentAdapter
public java.lang.Object on(double playTime,
double timeStretch,
double[] dar)
on in interface Instrumenton in class InstrumentAdapterInstrument.on(double, double, double[])
public java.lang.Object off(double playTime,
double timeStretch,
double[] dar)
off in interface Instrumentoff in class InstrumentAdaptercom.softsynth.jmsl.Instrument#off(double, Object)
public double play(double playTime,
double timeStretch,
double[] dar)
play in interface Instrumentplay in class InstrumentAdapter
public double update(double playTime,
double timeStretch,
double[] dar)
update in interface Instrumentupdate in class InstrumentAdapterpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||