org.tritonus.midi.device.fluidsynth
Class FluidSynthesizer

java.lang.Object
  extended by org.tritonus.share.midi.TMidiDevice
      extended by org.tritonus.share.midi.TDirectSynthesizer
          extended by org.tritonus.midi.device.fluidsynth.FluidSynthesizer
All Implemented Interfaces:
MidiDevice, Synthesizer

public class FluidSynthesizer
extends TDirectSynthesizer
implements Synthesizer


Nested Class Summary
 
Nested classes/interfaces inherited from class org.tritonus.share.midi.TMidiDevice
TMidiDevice.Info, TMidiDevice.TReceiver, TMidiDevice.TTransmitter
 
Nested classes/interfaces inherited from interface javax.sound.midi.MidiDevice
MidiDevice.Info
 
Constructor Summary
FluidSynthesizer(MidiDevice.Info info)
          Constructor.
 
Method Summary
 Instrument[] getAvailableInstruments()
           
 MidiChannel[] getChannels()
           
 Soundbank getDefaultSoundbank()
           
 long getLatency()
           
 Instrument[] getLoadedInstruments()
           
 int getMaxPolyphony()
           
 VoiceStatus[] getVoiceStatus()
           
 boolean isSoundbankSupported(Soundbank soundbank)
           
 boolean loadAllInstruments(Soundbank soundbank)
           
 boolean loadInstrument(Instrument instrument)
           
 boolean loadInstruments(Soundbank soundbank, Patch[] patchList)
           
 int loadSoundFont(java.lang.String filename)
           
 boolean remapInstrument(Instrument from, Instrument to)
           
 void setBankOffset(int sfontID, int offset)
           
 void setDefaultSoundBank(int sfontID)
           
 void setGain(float gain)
           
 void setReverbPreset(int reverbPreset)
           
static void setTrace(boolean bTrace)
          Sets tracing in the native code.
 void unloadAllInstruments(Soundbank soundbank)
           
 void unloadInstrument(Instrument instrument)
           
 void unloadInstruments(Soundbank soundbank, Patch[] patchList)
           
 
Methods inherited from class org.tritonus.share.midi.TMidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceiver, getReceivers, getTransmitter, getTransmitters, isOpen, open
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sound.midi.MidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceiver, getReceivers, getTransmitter, getTransmitters, isOpen, open
 

Constructor Detail

FluidSynthesizer

public FluidSynthesizer(MidiDevice.Info info)
                 throws java.lang.Exception
Constructor.

Throws:
java.lang.Exception
Method Detail

setDefaultSoundBank

public void setDefaultSoundBank(int sfontID)

loadSoundFont

public int loadSoundFont(java.lang.String filename)

setBankOffset

public void setBankOffset(int sfontID,
                          int offset)

setGain

public void setGain(float gain)

setReverbPreset

public void setReverbPreset(int reverbPreset)

getMaxPolyphony

public int getMaxPolyphony()
Specified by:
getMaxPolyphony in interface Synthesizer

setTrace

public static void setTrace(boolean bTrace)
Sets tracing in the native code. Note that this method can either be called directly or (recommended) the system property "tritonus.TraceFluidNative" can be set to true.

See Also:
TDebug

isSoundbankSupported

public boolean isSoundbankSupported(Soundbank soundbank)
Specified by:
isSoundbankSupported in interface Synthesizer

loadAllInstruments

public boolean loadAllInstruments(Soundbank soundbank)
Specified by:
loadAllInstruments in interface Synthesizer

unloadAllInstruments

public void unloadAllInstruments(Soundbank soundbank)
Specified by:
unloadAllInstruments in interface Synthesizer

unloadInstruments

public void unloadInstruments(Soundbank soundbank,
                              Patch[] patchList)
Specified by:
unloadInstruments in interface Synthesizer

loadInstruments

public boolean loadInstruments(Soundbank soundbank,
                               Patch[] patchList)
Specified by:
loadInstruments in interface Synthesizer

unloadInstrument

public void unloadInstrument(Instrument instrument)
Specified by:
unloadInstrument in interface Synthesizer

loadInstrument

public boolean loadInstrument(Instrument instrument)
Specified by:
loadInstrument in interface Synthesizer

getAvailableInstruments

public Instrument[] getAvailableInstruments()
Specified by:
getAvailableInstruments in interface Synthesizer

getChannels

public MidiChannel[] getChannels()
Specified by:
getChannels in interface Synthesizer

getDefaultSoundbank

public Soundbank getDefaultSoundbank()
Specified by:
getDefaultSoundbank in interface Synthesizer

getLatency

public long getLatency()
Specified by:
getLatency in interface Synthesizer

getLoadedInstruments

public Instrument[] getLoadedInstruments()
Specified by:
getLoadedInstruments in interface Synthesizer

getVoiceStatus

public VoiceStatus[] getVoiceStatus()
Specified by:
getVoiceStatus in interface Synthesizer

remapInstrument

public boolean remapInstrument(Instrument from,
                               Instrument to)
Specified by:
remapInstrument in interface Synthesizer