public abstract class ModelAbstractOscillator extends java.lang.Object implements ModelOscillator, ModelOscillatorStream, javax.sound.midi.Soundbank
| Modifier and Type | Field and Description |
|---|---|
protected javax.sound.midi.MidiChannel |
channel |
protected int |
noteNumber |
protected boolean |
on |
protected float |
pitch |
protected float |
samplerate |
protected int |
velocity |
protected javax.sound.midi.VoiceStatus |
voice |
| Constructor and Description |
|---|
ModelAbstractOscillator() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
float |
getAttenuation()
Attenuation is in cB.
|
javax.sound.midi.MidiChannel |
getChannel() |
int |
getChannels() |
java.lang.String |
getDescription() |
ModelInstrument |
getInstrument() |
javax.sound.midi.Instrument |
getInstrument(javax.sound.midi.Patch patch) |
javax.sound.midi.Instrument[] |
getInstruments() |
java.lang.String |
getName() |
int |
getNoteNumber() |
javax.sound.midi.Patch |
getPatch() |
ModelPerformer |
getPerformer() |
float |
getPitch() |
javax.sound.midi.SoundbankResource[] |
getResources() |
float |
getSampleRate() |
javax.sound.midi.Soundbank |
getSoundBank() |
int |
getVelocity() |
java.lang.String |
getVendor() |
java.lang.String |
getVersion() |
javax.sound.midi.VoiceStatus |
getVoice() |
void |
init() |
boolean |
isOn() |
void |
noteOff(int velocity) |
void |
noteOn(javax.sound.midi.MidiChannel channel,
javax.sound.midi.VoiceStatus voice,
int noteNumber,
int velocity) |
ModelOscillatorStream |
open(float samplerate) |
int |
read(float[][] buffer,
int offset,
int len) |
void |
setPitch(float pitch) |
void |
setSampleRate(float samplerate) |
protected float pitch
protected float samplerate
protected javax.sound.midi.MidiChannel channel
protected javax.sound.midi.VoiceStatus voice
protected int noteNumber
protected int velocity
protected boolean on
public void init()
public void close()
throws java.io.IOException
close in interface ModelOscillatorStreamjava.io.IOExceptionpublic void noteOff(int velocity)
noteOff in interface ModelOscillatorStreampublic void noteOn(javax.sound.midi.MidiChannel channel,
javax.sound.midi.VoiceStatus voice,
int noteNumber,
int velocity)
noteOn in interface ModelOscillatorStreampublic int read(float[][] buffer,
int offset,
int len)
throws java.io.IOException
read in interface ModelOscillatorStreamjava.io.IOExceptionpublic javax.sound.midi.MidiChannel getChannel()
public javax.sound.midi.VoiceStatus getVoice()
public int getNoteNumber()
public int getVelocity()
public boolean isOn()
public void setPitch(float pitch)
setPitch in interface ModelOscillatorStreampublic float getPitch()
public void setSampleRate(float samplerate)
public float getSampleRate()
public float getAttenuation()
ModelOscillatorgetAttenuation in interface ModelOscillatorpublic int getChannels()
getChannels in interface ModelOscillatorpublic java.lang.String getName()
getName in interface javax.sound.midi.Soundbankpublic javax.sound.midi.Patch getPatch()
public ModelOscillatorStream open(float samplerate)
open in interface ModelOscillatorpublic ModelPerformer getPerformer()
public ModelInstrument getInstrument()
public javax.sound.midi.Soundbank getSoundBank()
public java.lang.String getDescription()
getDescription in interface javax.sound.midi.Soundbankpublic javax.sound.midi.Instrument getInstrument(javax.sound.midi.Patch patch)
getInstrument in interface javax.sound.midi.Soundbankpublic javax.sound.midi.Instrument[] getInstruments()
getInstruments in interface javax.sound.midi.Soundbankpublic javax.sound.midi.SoundbankResource[] getResources()
getResources in interface javax.sound.midi.Soundbankpublic java.lang.String getVendor()
getVendor in interface javax.sound.midi.Soundbankpublic java.lang.String getVersion()
getVersion in interface javax.sound.midi.Soundbank