ChordNoteSet constructor
ChordNoteSet(
- Instrument instrument,
- Chord chord
Implementation
factory ChordNoteSet(Instrument instrument, Chord chord) {
if (instrument == Instrument.banjo && chord == Chord.g) {
return ChordNoteSet._(chord: chord, instrument: instrument);
} else {
final notes = switch (instrument) {
Instrument.banjo => _banjoChordNotes[chord],
Instrument.guitar => _guitarChordNotes[chord],
};
if (notes == null) {
return ChordNoteSet._unavailable(chord: chord, instrument: instrument);
} else {
return ChordNoteSet._(
chord: chord,
fretOffset: null,
instrument: instrument,
notes: notes,
);
}
}
}