We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
macOS 13 Ventura
Xcode 14
When recognizing a chord as shown below:
/// INSIDE MY PROJECT func recognizeChord() -> Chord? { var currentPitches: PitchSet = PitchSet() for (keyID, pressed) in midiHelper.MIDIKeysDown { if pressed { currentPitches.add(Pitch(intValue: keyID.clamped(to: 0..<128))) } } let rankings = Chord.getRankedChords(from: currentPitches, allowTheoreticalChords: true) return rankings.first }
The program hard crashes with an out of range exception for the Int8
/// INSIDE TONIC public var noteNumber: Int8 { let octaveBounds = ((octave + 1) * 12) ... ((octave + 2) * 12) var note = Int(noteClass.letter.baseNote) + Int(noteClass.accidental.rawValue) if noteClass.letter == .B && noteClass.accidental.rawValue > 0 { note -= 12 } if noteClass.letter == .C && noteClass.accidental.rawValue < 0 { note += 12 } while !octaveBounds.contains(note) { note += 12 } return Int8(note) // <--- Error Here }
The error occurs above D7 (MIDI Key 98).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
When recognizing a chord as shown below:
The program hard crashes with an out of range exception for the Int8
The error occurs above D7 (MIDI Key 98).
Crash Logs, Screenshots or Other Attachments (if applicable)
The text was updated successfully, but these errors were encountered: