Pitch.withAccidental constructor
Pitch.withAccidental({
- required String step,
- required int octave,
- required AccidentalType accidentalType,
Constructor with a specific accidental type.
Implementation
factory Pitch.withAccidental({
required String step,
required int octave,
required AccidentalType accidentalType,
}) {
return Pitch(
step: step,
octave: octave,
alter: accidentalToAlter[accidentalType] ?? 0.0,
accidentalType: accidentalType,
);
}