-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
MIDI range MKII (extracted from microtonal PR) #5868
Merged
Merged
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
78a587b
Initial batch, mostly non-conflicting files
he29-net 911b137
Batch 2
he29-net 4443733
Batch 3 + selectively comment out Microtuner occurences
he29-net 0b9a902
Fix issues in InstrumentTrack.cpp
he29-net 8834884
Revert lmms_constants.h (changes not needed here)
he29-net 0602882
Fixes in preset and Piano* classes
he29-net 33bad8a
Implement temporary out-of-range keys drawing in PianoView
he29-net 2d0c787
Implement out-of-range key drawing for PianoRoll
he29-net 6771dda
Fix double application of the upgrade routine on the first instrument…
he29-net a8292fe
Fix and clean the default project template
he29-net 0394a6d
Avoid playing out-of-range notes; add missing range saving / loading;…
he29-net 49fa1d8
Update src/gui/PianoView.cpp
he29-net 4cb8f7f
Fix the out-of-range avoidance condition
he29-net 46c1b46
Add upgrade routine for VeSTige, LV2 and Carla presets
he29-net 59317da
The Great Purge (and a modified preset upgrade routine)
he29-net 5d5de8c
Update src/core/DataFile.cpp
he29-net d9d3f44
Update src/gui/editors/PianoRoll.cpp
he29-net f6687f9
Unified check if an instrument is affected by MIDI range change
he29-net ba0903f
Update src/core/DataFile.cpp
he29-net 0df3f42
Merge branch 'master' into midi_range_2
he29-net 3ca536c
Update src/gui/PianoView.cpp (fix typo)
he29-net f83e272
Add a comment explaining the computation of maximum PianoView width.
he29-net 48ba16a
Merge branch 'master' into midi_range_2
he29-net 1ebf7a3
Fix note descriptions in Xpressive
he29-net a5e4dc0
Simplify out-of-range note release
he29-net b303d9f
Purge most of the microtuner-related commented-out code
he29-net File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Is there a way to gain this through math and our constants?
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.
I don't think they could be derived "mathematically"; the first two are arbitrary constants that describe how many notes from one 12-EDO octave are deemed "special" when making a piano keyboard, the other two count how many of these special keys are available in total. And since the black-white order is also arbitrary, there is no easy mathematical formula that says how many special keys are in the last, incomplete octave.
It could be determined by an algorithm though, by simply checking
Piano::KeyTypes KEY_ORDER[]
(defined inPiano.cpp
for some reason, not the header file), i.e. runningisBlackKey()
andisWhiteKey()
for all keys and, well, counting them. Or, more efficiently, count all complete octaves using a simple formula, and finishing the count by looping through the last, incomplete octave.Either way seems pretty convoluted and probably would have to run in the constructor (can you initialize a constant in the constructor? Actually, can you initialize static anything in a constructor, since there is only one "instance"?)
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.
All good then. Just wanted to check. 👍