Class RhythmEngine
java.lang.Object
org.episteme.social.arts.music.RhythmEngine
Procedural generation of rhythmic patterns by style/period.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA rhythmic cell represented as note durations in subdivisions of a beat.static enum -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]applySwing(int[] straightPattern, double swingRatio) Applies swing feel to a straight rhythm pattern.static doublecalculateGrooveQuotient(int[] pattern, int beatsPerMeasure) Calculates the groove quotient (syncopation measure) of a pattern.static List<int[]> generatePattern(RhythmEngine.RhythmStyle style, int measures, int beatsPerMeasure) Generates a rhythmic pattern for a given style and number of measures.static List<RhythmEngine.RhythmCell> Gets characteristic patterns for a style.
-
Method Details
-
generatePattern
public static List<int[]> generatePattern(RhythmEngine.RhythmStyle style, int measures, int beatsPerMeasure) Generates a rhythmic pattern for a given style and number of measures. -
applySwing
public static int[] applySwing(int[] straightPattern, double swingRatio) Applies swing feel to a straight rhythm pattern. -
calculateGrooveQuotient
public static double calculateGrooveQuotient(int[] pattern, int beatsPerMeasure) Calculates the groove quotient (syncopation measure) of a pattern. -
getStylePatterns
Gets characteristic patterns for a style.
-