-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add community feature setting to allow for notes to be displayed with either sharps or flats #3203
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -481,10 +481,15 @@ const int16_t lanczosKernelA16[1025] = { | |
0, }; | ||
|
||
|
||
|
||
//C C# D D# E F F# G G# A A# B | ||
const uint8_t noteCodeToNoteLetter[12] = {67, 67, 68, 68, 69, 70, 70, 71, 71, 65, 65, 66}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am weary to change the existing constant. What would the implications of that change be? Would I need to update the places that use the constant? |
||
const bool noteCodeIsSharp[12] = {0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0}; | ||
|
||
//C Db D Eb E F Gb G Ab A Bb B | ||
const uint8_t noteCodeToNoteLetterFlats[12] = {67, 68, 68, 69, 69, 70, 71, 71, 65, 65, 66, 66}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
const bool noteCodeIsFlat[12] = {0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the same table as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't end up using noteCodeIsFlat anyways, I should delete. I think I'd rather not change the existing constants and will just use noteCodeIsSharp |
||
|
||
|
||
/** | ||
* @brief How iterance is encoded: | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears in a lot of places now. Might be nicer to have
getNoteLetterAndAccidental(int32_t node, char& letter, char& accidental)
which checks the runtimeFeature and provides them, instead of duplicating the code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(There is no meaningful performance impact from an additional function call in display code, and a possible benefit from reduced code size by reducing duplication.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be made inline if there's a desire for avoiding the stack, but I agree, a function would be more DRY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense. Where should I put the function since it would be used from multiple files?