Package org.jjazz.phrasetransform.api
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 Summary
Modifier and TypeMethodDescriptionstatic PhraseTransformManagerUse the first implementation present in the global lookup.default PhraseTransformgetPhraseTransform(String uniqueId) Get a specified PhraseTransform instance.Get all the available PhraseTransforms.default List<PhraseTransform>getPhraseTransforms(PhraseTransformCategory category) Get the PhraseTransforms which match the specified category.default List<PhraseTransform>getRecommendedPhraseTransforms(SizedPhrase inPhrase, SongPartContext context, boolean exclude0score) Get the available PhraseTransforms sorted by "fit score" for the specified parameters.voidrefresh()Force a rescan of all PhraseTransformProviders to get a refreshed list of PhraseTransforms.
-
Method Details
-
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
Get a specified PhraseTransform instance.- Parameters:
uniqueId-- Returns:
- Can be null
-
getPhraseTransforms
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)
-