Class YamJJazzRhythmProvider
java.lang.Object
org.jjazz.yamjjazz.rhythm.api.YamJJazzRhythmProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jjazz.rhythm.spi.RhythmProvider
RhythmProvider.Info -
Field Summary
FieldsFields inherited from interface org.jjazz.rhythm.spi.RhythmProvider
PREFIX_IGNORED_SUBDIR, SUBDIR_MAX_DEPTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdaptedRhythm(Rhythm r, TimeSignature ts) Provide a new rhythm which is an adapted version of r for a different time signature.Get the built-in rhythms.getFileRhythms(boolean forceRescan, MultipleErrorsReport errRpt) Get the file-based rhythms.getInfo()Descriptive information about this provider.static YamJJazzRhythmProviderfinal String[]Get the file extensions accepted by readFast().booleanReturn true if RhythmProvider has settings which can be modified by end-user.static booleanisMine(RhythmInfo ri) Read extFile plus the content of the associated Yamaha standard file .sty or .prs.voidShow a modal dialog to modify the user settings of this RhythmProvider.
-
Field Details
-
RP_ID
- See Also:
-
FILE_EXTENSION
- See Also:
-
-
Constructor Details
-
YamJJazzRhythmProvider
public YamJJazzRhythmProvider()
-
-
Method Details
-
getInstance
-
getSupportedFileExtensions
Description copied from interface:RhythmProviderGet the file extensions accepted by readFast().No dot, lowercase.
- Specified by:
getSupportedFileExtensionsin interfaceRhythmProvider- Returns:
- E.g. "prs", "sty". Can be an empty list if RhythmProvider has only builtin rhythms.
-
getInfo
Description copied from interface:RhythmProviderDescriptive information about this provider.- Specified by:
getInfoin interfaceRhythmProvider- Returns:
-
showUserSettingsDialog
public void showUserSettingsDialog()Description copied from interface:RhythmProviderShow a modal dialog to modify the user settings of this RhythmProvider.The RhythmProvider is responsible for the persistence of its settings. The method does nothing if hasUserSettings() returns false.
- Specified by:
showUserSettingsDialogin interfaceRhythmProvider- See Also:
-
hasUserSettings
public boolean hasUserSettings()Description copied from interface:RhythmProviderReturn true if RhythmProvider has settings which can be modified by end-user.- Specified by:
hasUserSettingsin interfaceRhythmProvider- Returns:
- @see showUserSettingsDialog()
-
getBuiltinRhythms
Description copied from interface:RhythmProviderGet the built-in rhythms.- Specified by:
getBuiltinRhythmsin interfaceRhythmProvider- Parameters:
errRpt- Can't be null. RhythmProvider should update this object so that the framework can notify user about problems.- Returns:
- All non file-based rhythms provided by this RhythmProvider. List can be empty but not null.
-
getFileRhythms
Description copied from interface:RhythmProviderGet the file-based rhythms.User-provided rhythm files should be scanned in the User directory for rhythm files, see FileDirectoryManager.getUserRhythmDirectory(). SUBDIR_MAX_DEPTH levels of subdirectories should be scanned. Subdirectories starting with PREFIX_IGNORED_SUBDIR must be ignored.
- Specified by:
getFileRhythmsin interfaceRhythmProvider- Parameters:
forceRescan- If true RhythmProvider should not rely on its cached data.errRpt- Can't be null. RhythmProvider should update this object so that the framework can notify user about problems.- Returns:
- All non builtin rhythms provided by this RhythmProvider. List can be empty but not null.
-
readFast
Read extFile plus the content of the associated Yamaha standard file .sty or .prs.- Specified by:
readFastin interfaceRhythmProvider- Parameters:
extFile- The extension file (.yjz)- Returns:
- Can't be null
- Throws:
IOException- In case of file reading problem
-
getAdaptedRhythm
Description copied from interface:RhythmProviderProvide a new rhythm which is an adapted version of r for a different time signature.- Specified by:
getAdaptedRhythmin interfaceRhythmProvider- Parameters:
r-ts-- Returns:
- Can be null if no adapted rhythm is available.
-
isMine
-