Interface RhythmVoiceInstrumentProvider

All Known Implementing Classes:
DefaultRhythmVoiceInstrumentProviderImpl

public interface RhythmVoiceInstrumentProvider
A service provider to find an appropriate Instrument to render a RhythmVoice in a MidiMix.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name reserved for the default implementation, see getProvider().
  • Method Summary

    Modifier and Type
    Method
    Description
    Find the most appropriate Instrument on the system to render the specified RhythmVoice in a MidiMix.
    The id of the provider.
    Return a provider.
  • Field Details

    • DEFAULT_ID

      static final String DEFAULT_ID
      Name reserved for the default implementation, see getProvider().
      See Also:
  • Method Details

    • getProvider

      static RhythmVoiceInstrumentProvider getProvider()
      Return a provider.

      Search for implementations in the global lookup: return the first one with Id different from DEFAULT_ID, otherwise return the one with DEFAULT_ID.

      Returns:
      Can't be null
      Throws:
      IllegalStateException - If no provider found.
    • getId

      String getId()
      The id of the provider.
      Returns:
    • findInstrument

      Instrument findInstrument(RhythmVoice rv)
      Find the most appropriate Instrument on the system to render the specified RhythmVoice in a MidiMix.
      Parameters:
      rv -
      Returns:
      Can't be null. It may be the VoidInstrument for drums/percussion.