Class CompositeRhythm
java.lang.Object
org.jjazz.yamjjazz.rhythm.api.CompositeRhythm
- All Implemented Interfaces:
Comparable<Rhythm>,Rhythm,ConfigurableMusicGeneratorProvider,MusicGeneratorProvider,YamJJazzRhythm
A YamJJazzRhythm whose tracks can be replaced by tracks from other rhythms (or possibly from base rhythm).
- See Also:
-
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.The underlying base rhythm of this CompositeRhythm.intgetComplexityLevel(String rpValue) Analyze the RP_Variation value produced by buildRhythmParameters() to retrieve the complexity level.getDestRhythmVoice(RhythmVoice rvSrc) Get the destination RhythmVoice of rvSrc.The general features of this rhythm.getFile()Optional file from which this rhythm was loaded.Get all the mapped source RhythmVoices.getName()intList<RhythmParameter<?>> getStyle()The Style object associated to this rhythm.getStylePart(String rpValue) Analyze a RhythmParameter String value produced by buildRhythmParameters() to retrieve the corresponding StylePart.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.voidvoidsetDestRhythmVoice(RhythmVoice rvSrc, RhythmVoice rvDest) Map a RhythmVoice from this rhythm to another RhythmVoice (from this rhythm or another).voidMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jjazz.rhythm.api.Rhythm
compareTo, getTags, getVersionMethods inherited from interface org.jjazz.yamjjazz.rhythm.api.YamJJazzRhythm
getRhythmVoice
-
Constructor Details
-
CompositeRhythm
-
-
Method Details
-
getBaseRhythm
-
setDestRhythmVoice
Map a RhythmVoice from this rhythm to another RhythmVoice (from this rhythm or another).Fire a PROP_RHYTHM_VOICE_MAPPING change event.
- Parameters:
rvSrc- From this CompositeRhythmrvDest- If null mapping is removed. Container must be a YamJJazzRhythm.
-
getDestRhythmVoice
Get the destination RhythmVoice of rvSrc.- Parameters:
rvSrc- From this CompositeRhythm- Returns:
- Null if not mapped
-
getMappedSrcRhythmVoices
-
getFeatures
Description copied from interface:RhythmThe general features of this rhythm.- Specified by:
getFeaturesin interfaceRhythm- Returns:
-
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:
-
isResourcesLoaded
public boolean isResourcesLoaded()- Specified by:
isResourcesLoadedin interfaceRhythm
-
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.
-
getFile
-
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
-
getPreferredTempo
public int getPreferredTempo()- Specified by:
getPreferredTempoin interfaceRhythm
-
getTimeSignature
- Specified by:
getTimeSignaturein interfaceRhythm
-
getName
-
getAuthor
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceRhythm- Parameters:
l-- See Also:
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfaceRhythm- Parameters:
l-- See Also:
-
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:
rpValue- 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
-