uk.org.toot.synth
Class MonophonicSynthChannel

java.lang.Object
  extended by uk.org.toot.synth.SynthChannel
      extended by uk.org.toot.synth.MonophonicSynthChannel
All Implemented Interfaces:
javax.sound.midi.MidiChannel, AudioProcess, AudioOutput, AudioPort
Direct Known Subclasses:
WhirlSynthChannel

public abstract class MonophonicSynthChannel
extends SynthChannel
implements AudioOutput

A SynthChannel which is monophonic. Supports glide, i.e. fingered portamento

Author:
st

Field Summary
 
Fields inherited from interface uk.org.toot.audio.core.AudioProcess
AUDIO_DISCONNECT, AUDIO_OK
 
Constructor Summary
MonophonicSynthChannel(java.lang.String name)
           
 
Method Summary
 void allNotesOff()
           
 void allSoundOff()
           
 void close()
          Close any resources opened by this AudioProcess.
 java.lang.String getLocation()
          Return a unique string representing the location.
 java.lang.String getName()
          Return a unique name for this audio port.
 void noteOff(int pitch)
           
 void noteOn(int pitch, int velocity)
           
 void open()
          Open any resources required by this AudioProcess.
 int processAudio(AudioBuffer buffer)
          Process the supplied buffer
 void setLocation(java.lang.String location)
           
 
Methods inherited from class uk.org.toot.synth.SynthChannel
controlChange, getBendFactor, getChannelPressure, getController, getMono, getMute, getOmni, getPitchBend, getPolyPressure, getProgram, getSolo, localControl, midiFreq, noteOff, programChange, programChange, resetAllControllers, setChannelPressure, setMono, setMute, setOmni, setPitchBend, setPolyPressure, setSolo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonophonicSynthChannel

public MonophonicSynthChannel(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: AudioPort
Return a unique name for this audio port. Typically by concatenating the logical, but not necessarily unique, port name with a unique decice name.

Specified by:
getName in interface AudioPort
Returns:
String - a unique port name

setLocation

public void setLocation(java.lang.String location)
Overrides:
setLocation in class SynthChannel

getLocation

public java.lang.String getLocation()
Description copied from interface: AudioOutput
Return a unique string representing the location. e.g. MultiSynth C Channel 2 e.g. Sequencer 17 This should be the same string as used by AudioBuffer.MetaInfo.

Specified by:
getLocation in interface AudioOutput
Returns:
String the location of this AudioOutput

noteOn

public void noteOn(int pitch,
                   int velocity)
Specified by:
noteOn in interface javax.sound.midi.MidiChannel
Specified by:
noteOn in class SynthChannel

noteOff

public void noteOff(int pitch)
Specified by:
noteOff in interface javax.sound.midi.MidiChannel
Specified by:
noteOff in class SynthChannel

open

public void open()
Description copied from interface: AudioProcess
Open any resources required by this AudioProcess.

Specified by:
open in interface AudioProcess

processAudio

public int processAudio(AudioBuffer buffer)
Description copied from interface: AudioProcess
Process the supplied buffer

Specified by:
processAudio in interface AudioProcess
Parameters:
buffer - the AudioBuffer to process.
Returns:
int AUDIO_OK or AUDIO_DISCONNECT.

close

public void close()
Description copied from interface: AudioProcess
Close any resources opened by this AudioProcess.

Specified by:
close in interface AudioProcess

allNotesOff

public void allNotesOff()
Specified by:
allNotesOff in interface javax.sound.midi.MidiChannel
Specified by:
allNotesOff in class SynthChannel

allSoundOff

public void allSoundOff()
Specified by:
allSoundOff in interface javax.sound.midi.MidiChannel
Specified by:
allSoundOff in class SynthChannel


Copyright © 2004, 2005, 2006, 2007, 2008, 2009 Steve Taylor. All Rights Reserved.