Package org.jjazz.outputsynth.api
Class OutputSynthManager
java.lang.Object
org.jjazz.outputsynth.api.OutputSynthManager
- All Implemented Interfaces:
PropertyChangeListener,EventListener
Management of the OutputSynth instances.
Keep an OutputSynth instance for each available MidiOut device.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty change event fired each time a new OutputSynth is associated to the default JJazzLab MidiDevice OUT: oldValue=old OutputSynth, newValue=new OutputSynth.static final StringProperty change event fired each time a new OutputSynth is associated to a MidiDevice OUT: oldValue=Midi device OUT name, newValue=OutputSynth. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddPropertyChangeListener(String propName, PropertyChangeListener l) Get the current OuputSynth associated to the default JJazzLab Midi Device OUT.static OutputSynthManagerGet the OutputSynthManager instance.Get a new instance of a default OutputSynth which just uses the GM2Synth.Get a new instance of a default OutputSynth which just uses the GMSynth.Get a new instance of a default OutputSynth which just uses the GSSynth.Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in GS mode (compatible with VirtualMidiSynth).Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in XG mode (compatible with FluidSynth).Get a new instance of a default OutputSynth which just uses the XGSynth.Get a new instance of a default OutputSynth which just uses the Tyros 5 synth.getOutputSynth(String mdOutName) Get the OutputSynth associated to the specified output MidiDevice.voidfinal voidrefresh()Scan all the OUT MidiDevices and make sure each MidiDevice is associated to an OutputSynth.voidvoidremovePropertyChangeListener(String propName, PropertyChangeListener l) voidsetOutputSynth(String mdOutName, OutputSynth outSynth) Associate outSynth to the specified midi OUT device name.
-
Field Details
-
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
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
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
Get a new instance of a default OutputSynth which just uses the GMSynth.- Returns:
-
getNewGM2OuputSynth
Get a new instance of a default OutputSynth which just uses the GM2Synth.- Returns:
-
getNewXGOuputSynth
Get a new instance of a default OutputSynth which just uses the XGSynth.- Returns:
-
getNewGSOuputSynth
Get a new instance of a default OutputSynth which just uses the GSSynth.- Returns:
-
getNewJazzLabSoundFontXGOuputSynth
Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in XG mode (compatible with FluidSynth).- Returns:
-
getNewJazzLabSoundFontGSOuputSynth
Get a new instance of a default OutputSynth which just uses the JJazzLab soundfont in GS mode (compatible with VirtualMidiSynth).- Returns:
-
getNewYamahaRefOuputSynth
Get a new instance of a default OutputSynth which just uses the Tyros 5 synth.- Returns:
-
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
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
Associate outSynth to the specified midi OUT device name.- Parameters:
mdOutName- Can't be nulloutSynth- Can't be null
-
addPropertyChangeListener
-
addPropertyChangeListener
-
removePropertyChangeListener
-
removePropertyChangeListener
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-