-
-
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?
Conversation
@@ -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 comment
The 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)
@@ -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 comment
The 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)
@@ -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 comment
The 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 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 | ||
|
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)
let chord = Chord(.C, type: .minorSeventhSharpFive) | ||
XCTAssertEqual(chord.description, "Cm7♯5") | ||
} | ||
|
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)
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 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)
@@ -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 comment
The 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)
Hi Matt, thanks for this, we're currently adding a lot more esoteric
chords, so this is perfect.
We are going to make some modifications to getRankedChords to be able to
identify better these esoteric chords, thanks for your patience and help!
…On Sat, Apr 13, 2024 at 06:46 hound[bot] ***@***.***> wrote:
***@***.***[bot]* commented on this pull request.
------------------------------
In Sources/Tonic/ChordType.swift
<#40 (comment)>:
> @@ -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"
Switch and Case Statement Alignment Violation: Case statements should
vertically align with their enclosing switch statement.
(switch_case_alignment)
------------------------------
In Sources/Tonic/ChordType.swift
<#40 (comment)>:
> @@ -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"
Switch and Case Statement Alignment Violation: Case statements should
vertically align with their enclosing switch statement.
(switch_case_alignment)
------------------------------
In Sources/Tonic/ChordType.swift
<#40 (comment)>:
> @@ -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]
Switch and Case Statement Alignment Violation: Case statements should
vertically align with their enclosing switch statement.
(switch_case_alignment)
------------------------------
In Sources/Tonic/ChordType.swift
<#40 (comment)>:
> 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
+
Trailing Whitespace Violation: Lines should not have trailing whitespace.
(trailing_whitespace)
------------------------------
In Tests/TonicTests/ChordTests.swift
<#40 (comment)>:
> @@ -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) } )
+ let chord = Chord.getRankedChords(from: pitchSet)
+ XCTAssertEqual(chord.map { $0.description }, ["Cmaj7♯5"])
+ }
+
+ func testMinorSeventhSharpFive() {
+ let notes: [Int8] = [60, 63, 68, 71]
+ let chord = Chord(.C, type: .minorSeventhSharpFive)
+ XCTAssertEqual(chord.description, "Cm7♯5")
+ }
+
Trailing Whitespace Violation: Lines should not have trailing whitespace.
(trailing_whitespace)
------------------------------
In Tests/TonicTests/ChordTests.swift
<#40 (comment)>:
> @@ -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) } )
+ let chord = Chord.getRankedChords(from: pitchSet)
+ XCTAssertEqual(chord.map { $0.description }, ["Cmaj7♯5"])
+ }
+
Trailing Whitespace Violation: Lines should not have trailing whitespace.
(trailing_whitespace)
------------------------------
In Tests/TonicTests/ChordTests.swift
<#40 (comment)>:
> @@ -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) } )
Closing Brace Spacing Violation: Closing brace with closing parenthesis
should not have any whitespaces in the middle. (closing_brace)
—
Reply to this email directly, view it on GitHub
<#40 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKRXV5FYJAYKNSBFPYGCKTY5EZKJAVCNFSM6AAAAABGFPON6WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSOJZGI3DMMJQG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This adds a minorSeventhSharpFive chord.
There may be something funny going on with Chord.getRankedChords. I tried using that method but it didn't find the new chord. However, using Chord(.C, type: .minorSeventhSharpFive) works in the test.
*Fixed a couple of typos in comments too