note_creation.py model_output_to_notes() corrected notes attempt#154
Open
emmathesaw wants to merge 2 commits intospotify:mainfrom
Open
note_creation.py model_output_to_notes() corrected notes attempt#154emmathesaw wants to merge 2 commits intospotify:mainfrom
emmathesaw wants to merge 2 commits intospotify:mainfrom
Conversation
mgodave
reviewed
Dec 9, 2024
mgodave
left a comment
There was a problem hiding this comment.
Altogether this looks good. I would encourage you to add some tests to test that the correction works as expected. I would be especially interested to see if the int coercion works as expected.
|
|
||
| #apply the correction offset to align pitch (created corrected_notes instead of estimated notes) | ||
| corrected_notes = [ | ||
| (note[0], note[1], int(note[2] - pitch_offset_correction), note[3], note[4]) |
There was a problem hiding this comment.
What is the implication of this cast to int? My understanding is that this truncates the decimal portion of the result, is this the desired behavior?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a visual pitch discrepancy in Basic Pitch's piano canvas compared to the exported MIDI files. A pitch offset correction was added to the note creation process, attempting to align displayed and exported pitches while maintaining their accuracy of the transcription.
This is referencing #147