public ChordChangeHandlerBaseLine(FlatSecondFilter filter, Song song, short srcBarIndex, Chord orgChord) { this.filter = filter; this.song = song; this.srcBarIndex = srcBarIndex; this.orgChord = orgChord; }
protected Chord CreateMajorChord(short degree) { Chord chord = new Chord(this, degree); if (minorFlag) { degree -= 3; degree = RoundNote(degree); } switch (degree) { case 1: //1st case 6: //4th chord.ThirdNoteType = Chord.ThirdNoteTypes.MAJOR; chord.FifthNoteType = Chord.FifthNoteTypes.NORMAL; chord.SeventhNoteType = Chord.SeventhNoteTypes.MAJOR; break; case 3: //2nd case 5: //3rd case 10: //6th chord.ThirdNoteType = Chord.ThirdNoteTypes.MINOR; chord.FifthNoteType = Chord.FifthNoteTypes.NORMAL; chord.SeventhNoteType = Chord.SeventhNoteTypes.MINOR; break; case 8: //5th chord.ThirdNoteType = Chord.ThirdNoteTypes.MAJOR; chord.FifthNoteType = Chord.FifthNoteTypes.NORMAL; chord.SeventhNoteType = Chord.SeventhNoteTypes.MINOR; break; case 12: //7th chord.ThirdNoteType = Chord.ThirdNoteTypes.MINOR; chord.FifthNoteType = Chord.FifthNoteTypes.FLATTED; chord.SeventhNoteType = Chord.SeventhNoteTypes.MINOR; break; default: if (IsValidDegree(RoundNote((short)(degree + 3)))) { chord.ThirdNoteType = Chord.ThirdNoteTypes.MINOR; } else if (IsValidDegree(RoundNote((short)(degree + 4)))) { chord.ThirdNoteType = Chord.ThirdNoteTypes.MAJOR; } if (IsValidDegree(RoundNote((short)(degree + 7)))) { chord.FifthNoteType = Chord.FifthNoteTypes.NORMAL; } else if (IsValidDegree(RoundNote((short)(degree + 6)))) { chord.FifthNoteType = Chord.FifthNoteTypes.FLATTED; } else if (IsValidDegree(RoundNote((short)(degree + 8)))) { chord.FifthNoteType = Chord.FifthNoteTypes.SHARPED; } if (IsValidDegree(RoundNote((short)(degree + 11)))) { chord.SeventhNoteType = Chord.SeventhNoteTypes.MAJOR; } else if (IsValidDegree(RoundNote((short)(degree + 10)))) { chord.SeventhNoteType = Chord.SeventhNoteTypes.MINOR; } else if (IsValidDegree(RoundNote((short)(degree + 9)))) { chord.SeventhNoteType = Chord.SeventhNoteTypes.DOUBLE_FLATTED; } break; } return(chord); }