Record Class CompositeMusicGenerator.DelegateUnit
java.lang.Object
java.lang.Record
org.jjazz.rhythmmusicgeneration.api.CompositeMusicGenerator.DelegateUnit
- Record Components:
songPart-rvBase- The base RhythmVoicemg- The MusicGenerator delegaterv- The delegate RhythmVoice to be used by mg.rpVariationValue- The delegate rhythm's variation to be used by mg. Will be ignored if delegate rhythm does not use the RP_SYS_Variation parameter.postProcessor- An optional post-processor of the phrase generated by mg. If null no postprocessing is done. For example this can be used to harmonize notes velocities.
- Enclosing class:
CompositeMusicGenerator
public static record CompositeMusicGenerator.DelegateUnit(SongPart songPart, RhythmVoice rvBase, MusicGenerator mg, RhythmVoice rv, String rpVariationValue, Consumer<Phrase> postProcessor)
extends Record
A delegate unit for a base RhythmVoice in the songPart context.
-
Constructor Summary
ConstructorsConstructorDescriptionDelegateUnit(SongPart songPart, RhythmVoice rvBase, MusicGenerator mg, String rpVariationValue) Constructor to use when rvBase has no delegate (delegates to itself).DelegateUnit(SongPart songPart, RhythmVoice rvBase, MusicGenerator mg, RhythmVoice rv, String rpVariationValue, Consumer<Phrase> postProcessor) Creates an instance of aDelegateUnitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mg()Returns the value of themgrecord component.Returns the value of thepostProcessorrecord component.Returns the value of therpVariationValuerecord component.rv()Returns the value of thervrecord component.rvBase()Returns the value of thervBaserecord component.songPart()Returns the value of thesongPartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DelegateUnit
public DelegateUnit(SongPart songPart, RhythmVoice rvBase, MusicGenerator mg, RhythmVoice rv, String rpVariationValue, Consumer<Phrase> postProcessor) Creates an instance of aDelegateUnitrecord class.- Parameters:
songPart- the value for thesongPartrecord componentrvBase- the value for thervBaserecord componentmg- the value for themgrecord componentrv- the value for thervrecord componentrpVariationValue- the value for therpVariationValuerecord componentpostProcessor- the value for thepostProcessorrecord component
-
DelegateUnit
public DelegateUnit(SongPart songPart, RhythmVoice rvBase, MusicGenerator mg, String rpVariationValue) Constructor to use when rvBase has no delegate (delegates to itself).- Parameters:
songPart-rvBase-mg-rpVariationValue-
-
-
Method Details
-
getBaseRhythm
-
getDelegateRhythm
-
toDebugString
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
songPart
-
rvBase
-
mg
-
rv
-
rpVariationValue
Returns the value of therpVariationValuerecord component.- Returns:
- the value of the
rpVariationValuerecord component
-
postProcessor
Returns the value of thepostProcessorrecord component.- Returns:
- the value of the
postProcessorrecord component
-