ChartSession constructor

ChartSession({
  1. required List<ChartSlot> slots,
  2. required List<ExpectedAttack> attacks,
  3. required int bpm,
  4. required double chorusBeats,
  5. int split = 60,
  6. bool strict = false,
  7. bool strictRhythm = false,
  8. bool omit5 = true,
  9. int swing = 50,
  10. String? voicing,
  11. PassCriteria pass = const PassCriteria(),
  12. NoteNaming naming = NoteNaming.latin,
})

Implementation

ChartSession({
  required this.slots,
  required List<ExpectedAttack> attacks,
  required this.bpm,
  required this.chorusBeats,
  this.split = 60,
  this.strict = false,
  this.strictRhythm = false,
  this.omit5 = true,
  this.swing = 50,
  this.voicing,
  this.pass = const PassCriteria(),
  this.naming = NoteNaming.latin,
}) : attacks = List.unmodifiable(attacks.toList()..sort(_byBeat)),
     assert(bpm > 0),
     assert(chorusBeats > 0) {
  assert(
    this.attacks.every((a) => a.slot >= 0 && a.slot < slots.length),
    'um ataque aponta para um acorde que a grade não tem',
  );
}