Class DefaultMidiMixManager
java.lang.Object
org.jjazz.midimix.api.DefaultMidiMixManager
- All Implemented Interfaces:
PropertyChangeListener,EventListener,MidiMixManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a MidiMix for the specified rhythm.Create a new MidiMix for the specified song.Find a mix which must be existing.Try to get a MidiMix for the specified Rhythm in the following order:Get a MidiMix for the specified song in the following order.static DefaultMidiMixManagervoid
-
Constructor Details
-
DefaultMidiMixManager
public DefaultMidiMixManager()
-
-
Method Details
-
getInstance
-
findMix
Description copied from interface:MidiMixManagerGet a MidiMix for the specified song in the following order.1. If the mix for song s already exists, just return it
2. Load mix from song mix file
3. Create a new mix for s using findMix(Rhythm) for each song's rhythm- Specified by:
findMixin interfaceMidiMixManager- Parameters:
s-- Returns:
- A valid MidiMix usable for the specified song.
- Throws:
MidiUnavailableException
-
findExistingMix
Description copied from interface:MidiMixManagerFind a mix which must be existing.If you're not sure if a MidiMix was already created for the specified song, use findMix(Song) instead.
- Specified by:
findExistingMixin interfaceMidiMixManager- Parameters:
s-- Returns:
- Can't be null
-
findMix
Description copied from interface:MidiMixManagerTry to get a MidiMix for the specified Rhythm in the following order:1. Load mix from the default rhythm mix file
2. Create a new mix for r- Specified by:
findMixin interfaceMidiMixManager- Parameters:
r-- Returns:
- Can't be null
-
createMix
Description copied from interface:MidiMixManagerCreate a new MidiMix for the specified song.Use the default rhythm mix for each song's rhythm. Create UserRhythmVoices key if song as some user phrases.
- Specified by:
createMixin interfaceMidiMixManager- Parameters:
sg-- Returns:
- Throws:
MidiUnavailableException- If there is not enough available channels to accomodate song's rhythms, or other errors.
-
createMix
Description copied from interface:MidiMixManagerCreate a MidiMix for the specified rhythm.Create one InstrumentMix per rhythm voice, using rhythm voice's preferred instrument and settings, and preferred channel (except if several voices share the same preferred channel) .
- Specified by:
createMixin interfaceMidiMixManager- Parameters:
r- If r is- Returns:
- A MidiMix associated to this rhythm. Rhythm voices are used as keys for InstrumentMixes.
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-