-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Lb302 cleanup #8132
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
Draft
rubiefawn
wants to merge
13
commits into
LMMS:master
Choose a base branch
from
rubiefawn:refac/lb302
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Lb302 cleanup #8132
+472
−763
Conversation
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
Makes the following changes to the Lb302 plugin: - Use non-static data member initializers where possible - Find suitable homes for several loose constants - Use std::numbers::pi instead of M_PI - Use std::array and std::unique_ptr instead of manual memory management - Change some plain-old-data classes with only public members to structs - Change some ints to more descriptive types such as f_cnt_t, fpp_t, etc - Attempt to conform any lines I touched to current code conventions
This should be the last of the functions from `<cmath>`
Begone, SIGNAL() SLOT() macro magic!!
...and move them to be inside the classes that own them
- Remove Lb302Note as it is just function parameters with extra steps - Clean up Lb302Synth::initNote() - Clean up Lb302Synth::process() - Move the GET_INC() helper to an anon namespace, rename to phaseInc() - Make computeDecayFactor() a lambda next to its only callsite
To avoid implicit casts, it's all supposed to be floats
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.
Makes the following changes to the Lb302 plugin for increased maintainability and readability:
std::numbers::piinstead ofM_PIstd::arrayandstd::unique_ptrinstead of manual memory managementclasses with only public members tostructsints tof_cnt_t,fpp_t, etc. to better communicate their purpose and avoid weird implicit casting nonsensefloats tosample_twhere appropriate to better communicate their purposestd::floats end infand are notdoubles to appease MSVCSIGNALandSLOTmacros to whatever they should be post-Qt6 upgradestruct/classmember layout for better localityThe above list is not comprehensive and is destined to expand.