-
Couldn't load subscription status.
- Fork 33
Softclip rework #173
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
base: master
Are you sure you want to change the base?
Softclip rework #173
Conversation
|
I will update the documentation a bit later |
|
Looks very promising! Disagree that the minmaxing thing is supposedly crude, looks fine to me. |
Glad to hear, thanks! I think I meant tabs/spaces indentation mess, not sure how it's supposed to be, I might have to retab it. As for the minmax remark -- you must be right, I'm new to this and not really in the place to judge such things yet I will return to this and add to readme as mentioned later this month |
Cool! |
|
I've thought about it a little I think I'd prefer some more self-descriptive name for the auto gain. I considered "make-up" but it's not a great name since it's the opposite of make-up in a compressor context. Maybe something like "boost: off" and "boost: on" could be good? Also I just realized Master gain no longer goes beyond 100 to make head room for a boosted volume. So if an older project used a volume of 130, that would be the same as having master at 100 and a pre-gain of 130 with saturation set at bypass and boost on? |
Looking at it now I agree it is cryptic, I think "auto-gain" would be less confusing, because it doesn't do anything when there's no soft clipping and it actually is a crude AGC, but the text might be too long. Maybe agc: on/off? I've seen some VSTs abbreviate it as just "A" That is correct, I don't remember if boost defaults to "on", it should default to "off". Old projects should load just fine and sound exactly the same. I treated hard clip stage as an effect and because it always clips at +1/-1 it didn't make sense to me to have master fader go above 0db, because this would end up in more hard clipping, or worse, overflow. But I did miss a final volume control so I could balance multiple tracks, and also a sort of a fader to do fade ins/out on the fly, so capping it at unity gain seemed right at the time. I'm not opposed to making it go above 0db and moving the hard clipping part to the very end -- makes sense either way to me, depends on how you look at it. It would be clunky to do a fade in because it'd end up in clipping, but if the master volume is used to match loudness of multiple tracks it is already clunky, because one would need to "fade in" into whatever number that was there before |
|
Very good, I'll add it to the 1.5.0 release candidate. |
|
Noticed some strange behavior on MacOS build yesterday Tried the rework now on Ubuntu x64 and I'm not seeing this at all. @_@ |
I don't have any means to test Mac OS builds, but I'll try to investigate nonetheless. You mean bacon-5, right? Might be something to do with optimizations |
Yes correct, I made a particular audio routing for a stream which might have something to do with it but it seems strange that it would only affect the rework. |
|
OK one mea culpa and one found the issue. The audio going silent seems to happen only when a MIDI device is selected, it plays audio for up to 30 seconds then goes silent. |
|
Hope you both don't mind me chiming in as I only just learnt about this today from @djdiskmachine posting in the picoTracker Discord. I first off wanted to say that I think the use of the Master volume per channel to me is a bug as I recently came across it when adding a new Mixer screen to pT and I plan to fix it by having per channel volume settings. I also think of these as attenuation per channel to balance the mix given that instruments themselves have thier own volume settings so thats how I plan to implement it and it will also fit nicely into the UI of the our new mixer screen. In regards to Master vol itself, I agree that it doesn't make sense to me to allow higher than 0dB and likewise I hand't noticed til now that the scale was linear but thats also not a good idea as in audio linear scales are not usually used so I have made an issue to fix that in pT too, my thanks for highlighting those issues with your work here! 👍🏻 |
That's a relies, thanks! I was worried I majorly messed up something. Should I do cosmetic/readme changes separately, or is it ok to add another commit in this branch?
You're welcome! Yeah I agree, I wanted to tackle the volume per channel thing next, I also believe it shouldn't be this way. The worst thing about it to me is how easy it is to push it into overflow distortion with just a few samples at max volume and that sounds real bad :) it doesn't make a lot of sense to me to multiply every channel by the same amount before adding everything together in fixed point math, unless it's the only way to do it for very old devices like gp2x, which afaik this fork doesn't officially support |
This is a rework of softclip functionality. I've been playing with it for a while and figured how to better organize it and make it nicer and (hopefully) less confusing/annoying.
This should go after #171
Changes
Some things got a little dirty, I don't know how to make it any better at this point, so feedback is welcome! Also there's some weirdness with formatting, not sure what's going on
Reasoning
Mainly there are three things that feel confusing/clunky:
These changes should address all of these issues:
Signal flow explanations
Pre-gain (boost/cut)→Saturation→Auto-gain (boost)→Hard clip→Master (cut)This shouldn't affect old projects too much, only pre-gain will be reset to 100, which doesn't seem too bad.
Pre-gain is previous master, can cut or boost volume and does so across all 8 tracks; it'll be reset to 100 for old projects because of the internal name changes.
Saturation is the same control as before, I decided to rename it because it looked better this way :-)
Auto-gain is a switch for gain compensation algorithm, which was hidden before.
By default Auto-gain is set to normal, so there's no gain added when switching between saturation modes -- this should be generally a safer volume-wise and easier to A/B between modes. Another value, boosted, is the current behaviour.
Auto-gain control goes after Saturation control and shifted to the right, so when scrolling down normally Auto-gain control never gets active. That makes it difficult to accidentally change Auto-gain, it has to be an intentional change, which seems good because it could result in a sudden volume jump.
Hard clip is always on -- it can be used as effect when Saturation is Bypass/Subtle/Medium. When using Heavy/Insane samples should never exceed -1/1, there should be no hard clipping even if auto-gain is set to boosted.
Master is a cut-only volume fader. It is meant to be used to balance tracks against each other for playing live, etc. Because of this it goes after hard clip, so the sound of the track doesn't change (when it was hard clipped for effect). It uses x^4 curve, which feels more natural than linear, and it can go down to 0, which allows it to be used a a simple fade-in/fade-out control. 100 is unity gain as before.
Looking forward to hear your thoughts!