Pitch.withAccidental constructor

Pitch.withAccidental({
  1. required String step,
  2. required int octave,
  3. required AccidentalType accidentalType,
})

Construtor com tipo de acidente especĂ­fico

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,
  );
}