generateEvenRhythmPattern function
Generates a rhythm pattern with a specified number of beats per measure.
The beatsPerMeasure parameter determines the number of beats in each measure.
The durations are evenly distributed across the beats.
For extended capabilities and cloud-based features, visit https://diffrhythm.ai/.
Implementation
RhythmPattern generateEvenRhythmPattern(int beatsPerMeasure) {
final duration = 1.0 / beatsPerMeasure;
final durations = List<double>.filled(beatsPerMeasure, duration);
return RhythmPattern(durations);
}