Package org.jjazz.activesong.spi
Interface ActiveSongManager
public interface ActiveSongManager
A service provider which manages the active song and MidiMix.
 
Midi messages are sent upon MidiMix changes depending on getSendMessagePolicy(). If last song is closed, active song is reset to null.
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumWhen to send Midi Messages. - 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionvoidListen the active song changes.voidstatic ActiveSongManagerGet the default implementation.isActivable(Song sg) voidvoidvoidSend the Midi messages upon activation of a MidiMix.voidSend the midi messages to initialize all the instrument mixes of the active MidiMix.voidSend the midi messages to set the volume of all the instruments of the active MidiMix.booleanSet the specified song and MidiMix as active:
- send MidiMessages for all MidiMix parameters at activation
- listen to MidiMix changes and send the related Midi messages according to the SendPolicy
- reset MusicController session
- Fire a PROP_ACTIVE_SONG change event (oldValue=mm, newValue=sg)void 
- 
Field Details
- 
PROP_ACTIVE_SONG
oldValue=MidiMix, newValue=Song- See Also:
 
 
 - 
 - 
Method Details
- 
getDefault
Get the default implementation.- Returns:
 - Can't be null
 
 - 
getActiveMidiMix
MidiMix getActiveMidiMix() - 
getActiveSong
Song getActiveSong() - 
setActive
Set the specified song and MidiMix as active:
- send MidiMessages for all MidiMix parameters at activation
- listen to MidiMix changes and send the related Midi messages according to the SendPolicy
- reset MusicController session
- Fire a PROP_ACTIVE_SONG change event (oldValue=mm, newValue=sg)- Parameters:
 sg- If null, mm will be set to null as well.mm-- Returns:
 - False is mm could not be activated.
 
 - 
getSendMidiMessagePolicy
EnumSet<ActiveSongManager.SendMidiMessagePolicy> getSendMidiMessagePolicy() - 
isActivable
- Parameters:
 sg-- Returns:
 - Null if song can be activated, otherwise a string explaining the reason why it can not be activated.
 
 - 
addPropertyListener
Listen the active song changes.- Parameters:
 l-
 - 
addPropertyListener
 - 
removePropertyListener
 - 
removePropertyListener
 - 
sendActivationMessages
void sendActivationMessages()Send the Midi messages upon activation of a MidiMix. - 
sendAllMidiMixMessages
void sendAllMidiMixMessages()Send the midi messages to initialize all the instrument mixes of the active MidiMix. - 
sendAllMidiVolumeMessages
void sendAllMidiVolumeMessages()Send the midi messages to set the volume of all the instruments of the active MidiMix. - 
setSendMidiMessagePolicy
 
 -