Open Matt54 opened 7 months ago
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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041666:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041668:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041670:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041674:
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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041680:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041683:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#discussion_r1564041687:
@@ -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 https://github.com/AudioKit/Tonic/pull/40#pullrequestreview-1999266107, 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