Gain effect - #15955
Conversation
|
Currently it allows to change the gain from -24 db to 24 db, would it be better to have additional parameters to set the range of the gain, like minimum and maximum gain? |
|
Welcome at Mixxx! What do you understand as 'gain'? IMO if you want to adjust the gain of the samplers in a more visible way than in the smaller control in the GUI (and maybe eq, pan ...) it would be better to add a dedicated sampler-channel in the mixer. A powerful gain can create distorted music and even damage equipment, there should be a safety/limiter to not 'overgain' the input (clipping). |
|
Thanks for the response, I signed the agreement. I forgot to mention, this effect is related to the issue #14679, about having a dedicated utility effect for controlling the gain at any stage in the effect chain itself. I'm open to discussing and implementing a better way to implement this if possible. About overgain safety, I can add clipping to this effect as a toggle button. |
f8bd03f to
57b4a28
Compare
| pOutput[i] = pInput[i] * gain_ramped; | ||
|
|
||
| if (clip) { | ||
| pOutput[i] = math_clamp(pOutput[i], -1.0f, 1.0f); |
There was a problem hiding this comment.
Hard clipping like that creates extra audible artefacts.
It sounds better if you introduce a tanh clipper.
57b4a28 to
d863269
Compare
|
@daschuer can you review the changes? |
|
@daschuer could you please confirm your change request has been addressed? |
|
Btw. I use Audacity to create a 440 Hz test sound and to visualize the recordings. |
|
TODO: Add ramping when enabling and disabling. |
|
Good tip about audacity, much more accurate than judging by ear. I'll keep this in mind while testing for ramping or similar issues. |
|
@daschuer Can you review the changes made? |
daschuer
left a comment
There was a problem hiding this comment.
Works like a charm now. And LGTM. Well done.





Simple one knob effect for audio gain.