-
Notifications
You must be signed in to change notification settings - Fork 143
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
Compressor improvement #63
Compressor improvement #63
Conversation
General compressor improvements: - pulled gain apart for monitoring and multichannel support - improved readability - improved makeup-gain calculations - added block processing
Renamed some more faust internals and removed an unnecessary variable, with the added bonus of improving inlining as well when looking at the assembly.
Reduced the cost of parameter changes by only recalculating the affected internals, inlined all calculations to reduce method calls.
Fixed recalculating release on SetRelease and resetting makeup gain when disabling auto makeup
Some additional documentation (unfinished)
Added fast pow10f and approximations for log2f and log10f
Cleaning up some documentation, added getters for the parameters (for monitoring the state of the compressor, when desired), using the faster pow10f and log10f from my additions to dsp.h
Maybe have to check up on best practices of inline functions, the recalculation of the internals might be better off outside the header file. |
inline directive in class definition is superfluous
Looks great! I'll be able to test it today or tomorrow and get it merged. I had actually just starting to make a lot of similar (some identical) changes while working on a project that needed several of compressors. Thanks for the contribution! |
This tests well. I haven't checked with too many input sources yet, but the auto makeup gain is nice. One thing that would be nice (maybe for the entire library) is to be able to set a 0dB value. I imagine this won't be much of an issue on the Daisy Pod, etc. where the maximum output is a reasonable line level, but with the Daisy patch there's an extra 6dB of headroom so with Auto Makeup Gain the output gets close to 20Vpp. That said, maybe that should be something that can be set for the whole library via a DaisySPConfig struct or something because everything is based on nominal 0dB==1.0 right now. Overall, this is most likely good to go. I'm going to run a few more tests in a little and then I'll get it merged. |
Great 👍 I'm using it on my Patch as well, but running the output straight into a performance mixer with 20dB headroom so I didn't experience any issues. For other modules it might be too hot indeed. The auto makeup gain is based on this topic where the auto makeup gain of TASCAM products is explained:
It would be easy enough to implement a 0dB = -6dB correction (adding it to the threshold in the processing stage, but not in the calculation of the makeup gain), so that's easily fixed when there a library-wide configuration option is available. It would be a nuisance to use if it would be implemented as a regular option for the compressor. |
Improved the compressor a lot, as this was one of the modules I currently use most. Would appreciate any feedback 👍
Some changes I made:
And, as mentioned in #59 , added block processing (for single- and multichannel). The single sample process methods inside these block processing methods get fully inlined, so there's a performance gain for those using these methods.