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

WIP: Added new static Chord function to provide chord possibilities from [Notes] #19

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

maksutovic
Copy link
Collaborator

To help make #17 a reality, @aure and I are working on a new static function in Chord that can take an array of Note and provide ranked possible chords. This is still WIP (specifically around the demo portion of the code) but currently passing new test and will open up alot of possibilities.

@@ -90,7 +96,8 @@ class ChordIdentifier: ObservableObject {
}

private func getPotentialChords() -> [Chord] {
return ChordTable.shared.getAllChordsForNoteSet(noteSet)
return Chord.getRankedChords(from: notes)
//return ChordTable.shared.getAllChordsForNoteSet(noteSet)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment Spacing Violation: Prefer at least one space after slashes for comments. (comment_spacing)

func noteOff(pitch: Pitch) {
pitchSet.remove(pitch)
notes.removeAll(where: {$0.pitch == pitch})
}

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)

}

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)

@@ -90,7 +96,8 @@ class ChordIdentifier: ObservableObject {
}

private func getPotentialChords() -> [Chord] {
return ChordTable.shared.getAllChordsForNoteSet(noteSet)
return Chord.getRankedChords(from: notes)
//return ChordTable.shared.getAllChordsForNoteSet(noteSet)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment Spacing Violation: Prefer at least one space after slashes for comments. (comment_spacing)

func noteOff(pitch: Pitch) {
pitchSet.remove(pitch)
notes.removeAll(where: {$0.pitch == pitch})
}

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)

}

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)

@aure aure merged commit e7bfca2 into AudioKit:main Jan 23, 2024
26 checks passed
@MattRapchat
Copy link

Nice guys!! Excited to test this

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