-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InstrumentSoundShaping refactoring (#7229)
* Accessors for volume, cutoff, resonance Add private accessors for the volume, cutoff and resonance parameters (envelope and LFO). This makes the code less technical and more readable as it for example removes lots of static casts. The casts are now done in a special helper method that returns the parameters for a given target. * Remove EnvelopeAndLfoParameters array Remove the `EnvelopeAndLfoParameters` array and use explicit instances for volume, cutoff, resonance. This simplifies construction and initialization of the instances. Besides the array this also removes the `Target` enum and the `NumTargets` value. To simplify storage and retrieval of the parameters three private methods have been added which provide the node names of the volume, cutoff and resonance parameters. Adjust `InstrumentSoundShapingView` to the removed `NumTargets` property. * Use references instead of pointers Use references to the volume, cutoff and resonance parameters instead of pointers. * Remove friend relationship Remove the friend relationship between `InstrumentSoundShaping` and its related view by providing the models via getters. * Get rid of targetNames Get rid of `InstrumentSoundShaping::targetNames` by using translations and strings directly. Move the remaining stuff into `InstrumentSoundShapingView` until it is removed there as well. * Explicit EnvelopeAndLfoViews Remove the array of EnvelopeAndLfoViews and use dedicated instances instead. This also enables the final removal of the remaining `targetNames`. * Move the code of some getters Move the code of some getters into the header file. * Several code review changes Apply some code review proposals. Co-authored-by: Sotonye Atemie <[email protected]> --------- Co-authored-by: Sotonye Atemie <[email protected]>
- Loading branch information
1 parent
f44aa3e
commit 8821d88
Showing
4 changed files
with
124 additions
and
106 deletions.
There are no files selected for viewing
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.