Interface PhraseTransformManager


public interface PhraseTransformManager
The PhraseTransformManager is the central place to get information about installed PhraseTransforms.

Implementation should populate the database upon creation.

See Also:
  • Method Details

    • getDefault

      static PhraseTransformManager getDefault()
      Use the first implementation present in the global lookup.

      If nothing found, use the default implementation which relies on all PhraseTransformProvider implementations found in the global lookup.

      Returns:
    • refresh

      void refresh()
      Force a rescan of all PhraseTransformProviders to get a refreshed list of PhraseTransforms.
    • getPhraseTransforms

      List<PhraseTransform> getPhraseTransforms()
      Get all the available PhraseTransforms.
      Returns:
    • getPhraseTransform

      default PhraseTransform getPhraseTransform(String uniqueId)
      Get a specified PhraseTransform instance.
      Parameters:
      uniqueId -
      Returns:
      Can be null
    • getPhraseTransforms

      default List<PhraseTransform> getPhraseTransforms(PhraseTransformCategory category)
      Get the PhraseTransforms which match the specified category.
      Parameters:
      category -
      Returns:
    • getRecommendedPhraseTransforms

      default List<PhraseTransform> getRecommendedPhraseTransforms(SizedPhrase inPhrase, SongPartContext context, boolean exclude0score)
      Get the available PhraseTransforms sorted by "fit score" for the specified parameters.
      Parameters:
      inPhrase -
      context -
      exclude0score - if true PhraseTransforms with a fit score==0 are ignored.
      Returns:
      First PhraseTransform is the most adapted to the specified parameters (highest fit score, last PhraseTransform is the less adapted.
      See Also:
      • PhraseTransform#getFitScore(org.jjazz.phrase.api.SizedPhrase, org.jjazz.midi.api.Instrument)