Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.media.sound
Class ModelAbstractOscillator

    java.lang.Object
      com.sun.media.sound.ModelAbstractOscillator

All Implemented Interfaces:
  ModelOscillator, ModelOscillatorStream, javax.sound.midi.Soundbank

    public abstract class ModelAbstractOscillator

extends java.lang.Object
implements ModelOscillator, ModelOscillatorStream, javax.sound.midi.Soundbank

A abstract class used to simplify creating custom ModelOscillator.

Author:
  Karl Helgason

Constructor Summary
`ModelAbstractOscillator()`

Method Summary
`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)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ModelAbstractOscillator

    public ModelAbstractOscillator()

Method Detail

### init

    public void init()

### close

    public void close()
               throws java.io.IOException

  Specified by:
    `close` in interface `ModelOscillatorStream`
  Throws:
    `java.io.IOException`

### noteOff

    public void noteOff(int velocity)

  Specified by:
    `noteOff` in interface `ModelOscillatorStream`

### noteOn

    public void noteOn(javax.sound.midi.MidiChannel channel,
                       javax.sound.midi.VoiceStatus voice,
                       int noteNumber,
                       int velocity)

  Specified by:
    `noteOn` in interface `ModelOscillatorStream`

### read

    public int read(float[][] buffer,
                    int offset,
                    int len)
             throws java.io.IOException

  Specified by:
    `read` in interface `ModelOscillatorStream`
  Throws:
    `java.io.IOException`

### getChannel

    public javax.sound.midi.MidiChannel getChannel()

### getVoice

    public javax.sound.midi.VoiceStatus getVoice()

### getNoteNumber

    public int getNoteNumber()

### getVelocity

    public int getVelocity()

### isOn

    public boolean isOn()

### setPitch

    public void setPitch(float pitch)

  Specified by:
    `setPitch` in interface `ModelOscillatorStream`

### getPitch

    public float getPitch()

### setSampleRate

    public void setSampleRate(float samplerate)

### getSampleRate

    public float getSampleRate()

### getAttenuation

    public float getAttenuation()

  Description copied from interface: `ModelOscillator`
  Attenuation is in cB.

  Specified by:
    `getAttenuation` in interface `ModelOscillator`
  Returns:

### getChannels

    public int getChannels()

  Specified by:
    `getChannels` in interface `ModelOscillator`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `javax.sound.midi.Soundbank`

### getPatch

    public javax.sound.midi.Patch getPatch()

### open

    public ModelOscillatorStream open(float samplerate)

  Specified by:
    `open` in interface `ModelOscillator`

### getPerformer

    public ModelPerformer getPerformer()

### getInstrument

    public ModelInstrument getInstrument()

### getSoundBank

    public javax.sound.midi.Soundbank getSoundBank()

### getDescription

    public java.lang.String getDescription()

  Specified by:
    `getDescription` in interface `javax.sound.midi.Soundbank`

### getInstrument

    public javax.sound.midi.Instrument getInstrument(javax.sound.midi.Patch patch)

  Specified by:
    `getInstrument` in interface `javax.sound.midi.Soundbank`

### getInstruments

    public javax.sound.midi.Instrument[] getInstruments()

  Specified by:
    `getInstruments` in interface `javax.sound.midi.Soundbank`

### getResources

    public javax.sound.midi.SoundbankResource[] getResources()

  Specified by:
    `getResources` in interface `javax.sound.midi.Soundbank`

### getVendor

    public java.lang.String getVendor()

  Specified by:
    `getVendor` in interface `javax.sound.midi.Soundbank`

### getVersion

    public java.lang.String getVersion()

  Specified by:
    `getVersion` in interface `javax.sound.midi.Soundbank`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD