ChartSession constructor
ChartSession({ - required List<ChartSlot> slots,
- required List<ExpectedAttack> attacks,
- required int bpm,
- required double chorusBeats,
- int split = 60,
- bool strict = false,
- bool strictRhythm = false,
- bool omit5 = true,
- int swing = 50,
- String? voicing,
- PassCriteria pass = const PassCriteria(),
- 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',
);
}