Class JJSwingRhythm
java.lang.Object
org.jjazz.jjswing.api.JJSwingRhythm
- All Implemented Interfaces:
Comparable<Rhythm>,Rhythm,ConfigurableMusicGeneratorProvider,MusicGeneratorProvider,YamJJazzRhythm
An advanced swing rhythm which uses a specific generator for the bass (walking, etc.).
-
Field Summary
Fields inherited from interface org.jjazz.rhythm.api.Rhythm
PROP_RESOURCES_LOADED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAccType(String rpMuteValue) Get the AccType corresponding to a RP_SYS_Mute value.intgetComplexityLevel(String rpVariationValue) Analyze the RP_Variation value produced by buildRhythmParameters() to retrieve the complexity level.The general features of this rhythm.getFile()Optional file from which this rhythm was loaded.getName()intList<RhythmParameter<?>> final List<RhythmVoice> getStyle()The Style object associated to this rhythm.getStylePart(String rpValue) Analyze a RhythmParameter String value produced by buildRhythmParameters() to retrieve the corresponding StylePart.String[]getTags()Can be any keyword strings used to describe the rhythm.A unique string identifier representing this rhythm.booleanTrue if it's an extended rhythm, false if it's a standard Yamaha rhythm.booleanvoidTell the rhythm it may load any memory-heavy resources.voidAsk the rhythm to release any memory-heavy resources.voidvoidtoString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jjazz.yamjjazz.rhythm.api.YamJJazzRhythm
getRhythmVoice
-
Constructor Details
-
JJSwingRhythm
- Throws:
IOException
-
-
Method Details
-
getFile
-
toString
-
getAccType
Description copied from interface:YamJJazzRhythmGet the AccType corresponding to a RP_SYS_Mute value.- Specified by:
getAccTypein interfaceYamJJazzRhythm- Parameters:
rpMuteValue- Can't be null- Returns:
- Can be null if rpMuteValue is an empty string.
-
getComplexityLevel
Description copied from interface:YamJJazzRhythmAnalyze the RP_Variation value produced by buildRhythmParameters() to retrieve the complexity level.- Specified by:
getComplexityLevelin interfaceYamJJazzRhythm- Parameters:
rpVariationValue- eg "Main A-2"- Returns:
- eg 2, or -1 if no match.
-
getStyle
Description copied from interface:YamJJazzRhythmThe Style object associated to this rhythm.- Specified by:
getStylein interfaceYamJJazzRhythm- Returns:
-
getStylePart
Description copied from interface:YamJJazzRhythmAnalyze a RhythmParameter String value produced by buildRhythmParameters() to retrieve the corresponding StylePart.- Specified by:
getStylePartin interfaceYamJJazzRhythm- Parameters:
rpValue- eg "Main A-2"- Returns:
- Main_A or null if no match
-
isExtendedRhythm
public boolean isExtendedRhythm()Description copied from interface:YamJJazzRhythmTrue if it's an extended rhythm, false if it's a standard Yamaha rhythm.- Specified by:
isExtendedRhythmin interfaceYamJJazzRhythm- Returns:
-
getMusicGenerator
- Specified by:
getMusicGeneratorin interfaceMusicGeneratorProvider
-
setMusicGenerator
- Specified by:
setMusicGeneratorin interfaceConfigurableMusicGeneratorProvider
-
isResourcesLoaded
public boolean isResourcesLoaded()- Specified by:
isResourcesLoadedin interfaceRhythm
-
loadResources
Description copied from interface:RhythmTell the rhythm it may load any memory-heavy resources.This will fire a PROP_RESOURCES_LOADED change event with newValue=true.
- Specified by:
loadResourcesin interfaceRhythm- Throws:
MusicGenerationException- See Also:
-
releaseResources
public void releaseResources()Description copied from interface:RhythmAsk the rhythm to release any memory-heavy resources.This will fire a PROP_RESOURCES_LOADED change event with newValue=false.
- Specified by:
releaseResourcesin interfaceRhythm- See Also:
-
getRhythmVoices
- Specified by:
getRhythmVoicesin interfaceRhythm- Returns:
- The voices for which this rhythm can generate music. Each voice must have a unique name.
-
getRhythmParameters
- Specified by:
getRhythmParametersin interfaceRhythm- Returns:
- The RhythmParameters that influence the way this rhythm generates music.
-
getTimeSignature
- Specified by:
getTimeSignaturein interfaceRhythm
-
getUniqueId
Description copied from interface:RhythmA unique string identifier representing this rhythm.It will be used by other serialized objects who want to refer this rhythm -typically a Song object.
- Specified by:
getUniqueIdin interfaceRhythm- Returns:
- A non-empty String with spaces trimmed.
-
getDescription
- Specified by:
getDescriptionin interfaceRhythm
-
getFeatures
Description copied from interface:RhythmThe general features of this rhythm.- Specified by:
getFeaturesin interfaceRhythm- Returns:
-
getPreferredTempo
public int getPreferredTempo()- Specified by:
getPreferredTempoin interfaceRhythm
-
getName
-
getAuthor
-
getVersion
- Specified by:
getVersionin interfaceRhythm- Returns:
- Default to "1"
-
getTags
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceRhythm- Parameters:
l-- See Also:
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfaceRhythm- Parameters:
l-- See Also:
-