-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added minorSeventhSharpFive #40
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,12 +110,15 @@ public enum ChordType: String, CaseIterable, Codable { | |
/// Half Diminished Ninth: Minor Third, Diminished Fifth, Minor Seventh, Minor Ninth, Perfect Eleventh | ||
case halfDiminishedEleventh | ||
|
||
/// Minor Seventh Flat Five: Major Third, Diminished Fifth, Major Seventh | ||
/// Major Seventh Flat Five: Major Third, Diminished Fifth, Major Seventh | ||
case majorSeventhFlatFive | ||
|
||
/// Major Seventh Sharp Five: Major Third, Augmented Fifth, Major Seventh | ||
case majorSeventhSharpFive | ||
|
||
/// Minor Seventh Flat Five: Minor Third, Diminished Fifth, Major Seventh | ||
case minorSeventhSharpFive | ||
|
||
/// Minor Ninth Flat Five: Major Third, Diminished Fifth, Major Seventh, Major Nine | ||
case majorNinthFlatFive | ||
|
||
|
@@ -208,6 +211,7 @@ public enum ChordType: String, CaseIterable, Codable { | |
case .halfDiminishedEleventh: return [.m3, .d5, .m7, .m9, .P11] | ||
case .majorSeventhFlatFive: return [.M3, .d5, .M7] | ||
case .majorSeventhSharpFive: return [.M3, .A5, .M7] | ||
case .minorSeventhSharpFive: return [.m3, .A5, .m7] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch and Case Statement Alignment Violation: Case statements should vertically align with their enclosing switch statement. (switch_case_alignment) |
||
case .majorNinthSharpEleventh: return [.M3, .P5, .M7, .M9, .A11] | ||
case .dominantFlatNinthSharpEleventh: return [.M3, .P5, .m7, .m9, .A11] | ||
case .dominantFlatFive: return [.M3, .d5, .m7] | ||
|
@@ -270,6 +274,7 @@ extension ChordType: CustomStringConvertible { | |
case .minorEleventh: return "m11" | ||
case .halfDiminishedEleventh: return "ø11" | ||
case .majorSeventhFlatFive: return "maj7♭5" | ||
case .minorSeventhSharpFive: return "m7♯5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch and Case Statement Alignment Violation: Case statements should vertically align with their enclosing switch statement. (switch_case_alignment) |
||
case .majorSeventhSharpFive: return "maj7♯5" | ||
case .majorNinthSharpEleventh: return "maj9♯11" | ||
case .dominantFlatFive: return "7♭5" | ||
|
@@ -333,6 +338,7 @@ extension ChordType: CustomStringConvertible { | |
case .halfDiminishedEleventh: return "Ø11" | ||
case .majorSeventhFlatFive: return "^7b5" | ||
case .majorSeventhSharpFive: return "^7#5" | ||
case .minorSeventhSharpFive: return "m7#5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch and Case Statement Alignment Violation: Case statements should vertically align with their enclosing switch statement. (switch_case_alignment) |
||
case .majorNinthSharpEleventh: return "^9#11" | ||
case .dominantFlatFive: return "7b5" | ||
case .dominantSharpFive: return "7#5" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,19 @@ class ChordTests: XCTestCase { | |
XCTAssertEqual(chord.map { $0.description }, ["Cmaj7♭5"]) | ||
} | ||
|
||
func testMajorSeventhSharpFive() { | ||
let notes: [Int8] = [60, 64, 68, 71] | ||
let pitchSet = PitchSet(pitches: notes.map { Pitch($0) } ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing Brace Spacing Violation: Closing brace with closing parenthesis should not have any whitespaces in the middle. (closing_brace) |
||
let chord = Chord.getRankedChords(from: pitchSet) | ||
XCTAssertEqual(chord.map { $0.description }, ["Cmaj7♯5"]) | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace) |
||
func testMinorSeventhSharpFive() { | ||
let notes: [Int8] = [60, 63, 68, 71] | ||
let chord = Chord(.C, type: .minorSeventhSharpFive) | ||
XCTAssertEqual(chord.description, "Cm7♯5") | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace) |
||
func testMajorNinthFlatFive() { | ||
let notes: [Int8] = [60, 64, 66, 71, 74] | ||
let pitchSet = PitchSet(pitches: notes.map { Pitch($0) } ) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)