Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

Matt54
Copy link
Member

@Matt54 Matt54 commented Apr 13, 2024

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

@@ -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"
Copy link

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"
Copy link

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]
Copy link

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

Copy link

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")
}

Copy link

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"])
}

Copy link

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) } )
Copy link

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)

@maksutovic
Copy link
Collaborator

maksutovic commented Apr 13, 2024 via email

@aure
Copy link
Member

aure commented Dec 18, 2024

I would accept the typos in another PR, but I think this chords addition is not nearly as complete as Max's latest PR, so I will close this unmerged. I hope you understand, soon you can try the new chords set and see if that works for you (or try Max's fork).

@aure aure closed this Dec 18, 2024
@Matt54
Copy link
Member Author

Matt54 commented Dec 18, 2024

Sounds good - thanks @aure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants