mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-30 11:53:41 -04:00
* 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 <sakertooth@gmail.com> --------- Co-authored-by: Sotonye Atemie <sakertooth@gmail.com>
1.9 KiB
1.9 KiB