Class OutputSynthManager

java.lang.Object
org.jjazz.outputsynth.api.OutputSynthManager
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class OutputSynthManager extends Object implements PropertyChangeListener
Management of the OutputSynth instances.

Keep an OutputSynth instance for each available MidiOut device.

  • Field Details

    • PROP_MDOUT_OUTPUTSYNTH

      public static final String PROP_MDOUT_OUTPUTSYNTH
      Property change event fired each time a new OutputSynth is associated to a MidiDevice OUT: oldValue=Midi device OUT name, newValue=OutputSynth.
      See Also:
    • PROP_DEFAULT_OUTPUTSYNTH

      public static final String PROP_DEFAULT_OUTPUTSYNTH
      Property change event fired each time a new OutputSynth is associated to the default JJazzLab MidiDevice OUT: oldValue=old OutputSynth, newValue=new OutputSynth.

      The change event is also fired when default JJazzLab MidiDevice OUT changes.

      See Also:
  • Method Details

    • getInstance

      public static OutputSynthManager getInstance()
      Get the OutputSynthManager instance.

      Upon creation the OutputSynthManager preloads all the OutputSynth associated to each available OUT MidiDevice.

      Returns:
    • refresh

      public final void refresh()
      Scan all the OUT MidiDevices and make sure each MidiDevice is associated to an OutputSynth.

      Should be called if the list of available OUT MidiDevices has changed.

    • getNewGMOuputSynth

      public OutputSynth getNewGMOuputSynth()
      Get a new instance of a default OutputSynth which just uses the GMSynth.
      Returns:
    • getNewGM2OuputSynth

      public OutputSynth getNewGM2OuputSynth()
      Get a new instance of a default OutputSynth which just uses the GM2Synth.
      Returns:
    • getNewXGOuputSynth

      public OutputSynth getNewXGOuputSynth()
      Get a new instance of a default OutputSynth which just uses the XGSynth.
      Returns:
    • getNewGSOuputSynth

      public OutputSynth getNewGSOuputSynth()
      Get a new instance of a default OutputSynth which just uses the GSSynth.
      Returns:
    • getNewJazzLabSoundFontXGOuputSynth

      public OutputSynth getNewJazzLabSoundFontXGOuputSynth()
      Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in XG mode (compatible with FluidSynth).
      Returns:
    • getNewJazzLabSoundFontGSOuputSynth

      public OutputSynth getNewJazzLabSoundFontGSOuputSynth()
      Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in GS mode (compatible with VirtualMidiSynth).
      Returns:
    • getNewYamahaRefOuputSynth

      public OutputSynth getNewYamahaRefOuputSynth()
      Get a new instance of a default OutputSynth which just uses the Tyros 5 synth.
      Returns:
    • getDefaultOutputSynth

      public OutputSynth getDefaultOutputSynth()
      Get the current OuputSynth associated to the default JJazzLab Midi Device OUT.

      If no Midi Device OUT defined, then return a shared instance of a GM Output Synth.

      Returns:
      Can't be null
    • getOutputSynth

      public OutputSynth getOutputSynth(String mdOutName)
      Get the OutputSynth associated to the specified output MidiDevice.
      Parameters:
      mdOutName - A Midi device OUT name, can't be null or empty
      Returns:
      Can't be null.
    • setOutputSynth

      public void setOutputSynth(String mdOutName, OutputSynth outSynth)
      Associate outSynth to the specified midi OUT device name.
      Parameters:
      mdOutName - Can't be null
      outSynth - Can't be null
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener l)
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propName, PropertyChangeListener l)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener l)
    • removePropertyChangeListener

      public void removePropertyChangeListener(String propName, PropertyChangeListener l)
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener