APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public abstract Class ModelAbstractOscillator

extends Object
implements ModelOscillator, ModelOscillatorStream, Soundbank
Class Inheritance
All Implemented Interfaces
javax.sound.midi.Soundbank, com.sun.media.sound.ModelOscillatorStream, com.sun.media.sound.ModelOscillator
Imports
java.io.IOException, javax.sound.midi.Instrument, .MidiChannel, .Patch, .Soundbank, .SoundbankResource, .VoiceStatus

A abstract class used to simplify creating custom ModelOscillator.
Author
Karl Helgason

Field Summary

Modifier and TypeField and Description
protected MidiChannel
protected int
protected boolean
protected float
protected float
protected int
protected VoiceStatus

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public float
public MidiChannel
public int
public String
getDescription()

Implements javax.sound.midi.Soundbank.getDescription.

Obtains a textual description of the sound bank, suitable for display.

public ModelInstrument
public Instrument
getInstrument(Patch patch)

Implements javax.sound.midi.Soundbank.getInstrument.

Obtains an Instrument from the given Patch.

public Instrument[]
getInstruments()

Implements javax.sound.midi.Soundbank.getInstruments.

Obtains a list of instruments contained in this sound bank.

public String
getName()

Implements javax.sound.midi.Soundbank.getName.

Obtains the name of the sound bank.

public int
public Patch
public ModelPerformer
public float
public SoundbankResource[]
getResources()

Implements javax.sound.midi.Soundbank.getResources.

Extracts a list of non-Instrument resources contained in the sound bank.

public float
public Soundbank
public int
public String
getVendor()

Implements javax.sound.midi.Soundbank.getVendor.

Obtains a string naming the company that provides the sound bank.

public String
getVersion()

Implements javax.sound.midi.Soundbank.getVersion.

Obtains the version string for the sound bank.

public VoiceStatus
public void
init()

public boolean
isOn()

public void
public void
noteOn(MidiChannel channel, VoiceStatus voice, int noteNumber, int velocity)

Implements com.sun.media.sound.ModelOscillatorStream.noteOn.

public ModelOscillatorStream
open(float samplerate)

Implements com.sun.media.sound.ModelOscillator.open.

public int
read(float[][] buffer, int offset, int len)

Implements com.sun.media.sound.ModelOscillatorStream.read.

public void
public void
setSampleRate(float samplerate)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelback to summary
protected MidiChannel channel
noteNumberback to summary
protected int noteNumber
onback to summary
protected boolean on
pitchback to summary
protected float pitch
samplerateback to summary
protected float samplerate
velocityback to summary
protected int velocity
voiceback to summary
protected VoiceStatus voice

Constructor Detail

ModelAbstractOscillatorback to summary
public ModelAbstractOscillator()

Method Detail

closeback to summary
public void close() throws IOException

Implements com.sun.media.sound.ModelOscillatorStream.close.

Annotations
@Override
getAttenuationback to summary
public float getAttenuation()

Implements com.sun.media.sound.ModelOscillator.getAttenuation.

Doc from com.sun.media.sound.ModelOscillator.getAttenuation.

Attenuation is in cB.

Annotations
@Override
getChannelback to summary
public MidiChannel getChannel()
getChannelsback to summary
public int getChannels()

Implements com.sun.media.sound.ModelOscillator.getChannels.

Annotations
@Override
getDescriptionback to summary
public String getDescription()

Implements javax.sound.midi.Soundbank.getDescription.

Doc from javax.sound.midi.Soundbank.getDescription.

Obtains a textual description of the sound bank, suitable for display.

Annotations
@Override
getInstrumentback to summary
public ModelInstrument getInstrument()
getInstrumentback to summary
public Instrument getInstrument(Patch patch)

Implements javax.sound.midi.Soundbank.getInstrument.

Doc from javax.sound.midi.Soundbank.getInstrument.

Obtains an Instrument from the given Patch.

Annotations
@Override
getInstrumentsback to summary
public Instrument[] getInstruments()

Implements javax.sound.midi.Soundbank.getInstruments.

Doc from javax.sound.midi.Soundbank.getInstruments.

Obtains a list of instruments contained in this sound bank.

Annotations
@Override
getNameback to summary
public String getName()

Implements javax.sound.midi.Soundbank.getName.

Doc from javax.sound.midi.Soundbank.getName.

Obtains the name of the sound bank.

Annotations
@Override
getNoteNumberback to summary
public int getNoteNumber()
getPatchback to summary
public Patch getPatch()
getPerformerback to summary
public ModelPerformer getPerformer()
getPitchback to summary
public float getPitch()
getResourcesback to summary
public SoundbankResource[] getResources()

Implements javax.sound.midi.Soundbank.getResources.

Doc from javax.sound.midi.Soundbank.getResources.

Extracts a list of non-Instrument resources contained in the sound bank.

Annotations
@Override
getSampleRateback to summary
public float getSampleRate()
getSoundBankback to summary
public Soundbank getSoundBank()
getVelocityback to summary
public int getVelocity()
getVendorback to summary
public String getVendor()

Implements javax.sound.midi.Soundbank.getVendor.

Doc from javax.sound.midi.Soundbank.getVendor.

Obtains a string naming the company that provides the sound bank.

Annotations
@Override
getVersionback to summary
public String getVersion()

Implements javax.sound.midi.Soundbank.getVersion.

Doc from javax.sound.midi.Soundbank.getVersion.

Obtains the version string for the sound bank.

Annotations
@Override
getVoiceback to summary
public VoiceStatus getVoice()
initback to summary
public void init()
isOnback to summary
public boolean isOn()
noteOffback to summary
public void noteOff(int velocity)

Implements com.sun.media.sound.ModelOscillatorStream.noteOff.

Annotations
@Override
noteOnback to summary
public void noteOn(MidiChannel channel, VoiceStatus voice, int noteNumber, int velocity)

Implements com.sun.media.sound.ModelOscillatorStream.noteOn.

Annotations
@Override
openback to summary
public ModelOscillatorStream open(float samplerate)

Implements com.sun.media.sound.ModelOscillator.open.

Annotations
@Override
@SuppressWarnings:deprecation
readback to summary
public int read(float[][] buffer, int offset, int len) throws IOException

Implements com.sun.media.sound.ModelOscillatorStream.read.

Annotations
@Override
setPitchback to summary
public void setPitch(float pitch)

Implements com.sun.media.sound.ModelOscillatorStream.setPitch.

Annotations
@Override
setSampleRateback to summary
public void setSampleRate(float samplerate)