MIDI CC -> gain automation sounds bad

Official support for: mutools.com
KVRian
666 posts since 27 Nov, 2011

Post Mon Feb 08, 2021 1:54 am

Here's a simple device I created that gives me CC control over gain. I've used an amplifier and mixer strip module. Both produce the same distortion (?) effect when moving the controller. Is there a clean way to control gain via CC?

https://www.youtube.com/watch?v=J2eruw6Qg1o

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Mon Feb 08, 2021 1:41 pm

Please zip & share this little project that demonstrates the issue. Thanks.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Mon Feb 08, 2021 2:56 pm

Sure, the sequence is on C0 and it happens by quickly moving CC 12. I'll see if I can record the MIDI data later today so it's reproducible just by pressing play.
MuProject-20210208-142632 automate midi cc.MuProject.zip
You do not have the required permissions to view the files attached to this post.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Mon Feb 08, 2021 7:25 pm

Here's a recorded version. Note that it's less pronounced when playing back the recorded MIDI data than when playing live. But, it's still apparent at spots. I definitely don't want it happening when playing live either though! The live sound is clearly audible in the video.
MuProject-20210208-142632 automate midi cc with clip.MuProject.zip
You do not have the required permissions to view the files attached to this post.

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Mon Feb 08, 2021 9:42 pm

Thx for the projects. I assume it's zipper noise due to the fact that the MIDI CC data is a bit too rough to create smooth ampitude fades. Try smoothing the gain modulation data: Connect the CC to Mod out to an Mod to Audio converter, next a 1P Lowpass, next Audio to Mod, then that smoothed modulation to the gain mod jack. Set the 1P Lowpass to a balanced value so that the zipping disappears but changes are still immediate enough. Does this help?

Another way to avoid zipper noise is to use the MIDI CC to directly automate the Amplifier Gain parameter. Parameter automations are always automatically smoothed to avoid such zipper noise.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Mon Feb 08, 2021 10:53 pm

mutools wrote:
Mon Feb 08, 2021 9:42 pm
Thx for the projects. I assume it's zipper noise due to the fact that the MIDI CC data is a bit too rough to create smooth ampitude fades. Try smoothing the gain modulation data: Connect the CC to Mod out to an Mod to Audio converter, next a 1P Lowpass, next Audio to Mod, then that smoothed modulation to the gain mod jack. Set the 1P Lowpass to a balanced value so that the zipping disappears but changes are still immediate enough. Does this help?
Yep that does the trick. Very interesting, too. I know that DAWs do parameter smoothing, but never really knew how. Now I have some idea!
Another way to avoid zipper noise is to use the MIDI CC to directly automate the Amplifier Gain parameter. Parameter automations are always automatically smoothed to avoid such zipper noise.
This did not work for me, although it's possible I misunderstood the suggestion. I right-clicked the mixer module's gain slider, chose "map midi controller" and wiggled the knob. That led to the same kind of zipper noise as my original approach.

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Tue Feb 09, 2021 10:55 am

padillac wrote:
Mon Feb 08, 2021 10:53 pm
Another way to avoid zipper noise is to use the MIDI CC to directly automate the Amplifier Gain parameter. Parameter automations are always automatically smoothed to avoid such zipper noise.
This did not work for me, although it's possible I misunderstood the suggestion. I right-clicked the mixer module's gain slider, chose "map midi controller" and wiggled the knob. That led to the same kind of zipper noise as my original approach.
I double-checked the automatic parameter smoothing when tweaking a parameter via MIDI CC and it all works as expected here. So i'm curious for more details why you conclude it doesn't work, eg by sharing a project that demonstrates the issue.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Tue Feb 09, 2021 12:00 pm

Sure, here's a project that demonstrates it:
MuProject-20210208-142632 automate midi cc.MuProject.zip
It actually demonstrates a second, unrelated issue: when an audio sequence plays via midi controller and is stopped partway through, there's a pop. I guess it cuts the sound off completely rather than doing a quick fade out.

Here's a video of them both in action. For the CC zipper noise, I believe you'll need to listen through headphones / monitors, but it is obvious. The popping is apparent on any speakers.

https://www.youtube.com/watch?v=tt-8Qcxr-WE
You do not have the required permissions to view the files attached to this post.

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Tue Feb 09, 2021 12:53 pm

padillac wrote:
Tue Feb 09, 2021 12:00 pm
It actually demonstrates a second, unrelated issue: when an audio sequence plays via midi controller and is stopped partway through, there's a pop. I guess it cuts the sound off completely rather than doing a quick fade out.
Indeed there is no auto fade out when playing audio sequences. The audio sequence stops upon the note off. If that's in the middle of a (bass) sound, there may be a click. Same would be the case if you play an audio sequence in the composer and the part ends in the middle of a (bass) sound.
For the CC zipper noise, I believe you'll need to listen through headphones / monitors, but it is obvious.
I double-checked the smoothing and it works ok. Note that smoothing always is a balance between smoothing the rough edges to avoid zipper noise but still keep the signal instant/edgy enough so to be able to do sharp automations eg stutter effects, rhytmic gated pads etc. So the smoothing is a balanced aspect, not an absolute aspect.

On top of that note that when controlling a gain parameter with a MIDI CC, then the full gain range is divided in *only* 128 steps, because of MIDI. That's quite course for audio gain. The smoothing does a very good job filling the MIDI value gaps, but it's not perfect, because smoothing is a balanced thing, as explained before. I hope you understand what i mean.

If you want to have more control over the smoothing then best to set up custom smoothing. This can be done using the method explained earlier: viewtopic.php?p=8026540#p8026540
Then use a very low lowpass filter. If that's even not enough then you could use a 2P lowpass filter or even a more steep filter. Please give it a try.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Fri Feb 12, 2021 5:13 am

mutools wrote:
Tue Feb 09, 2021 12:53 pm
padillac wrote:
Tue Feb 09, 2021 12:00 pm
It actually demonstrates a second, unrelated issue: when an audio sequence plays via midi controller and is stopped partway through, there's a pop. I guess it cuts the sound off completely rather than doing a quick fade out.
Indeed there is no auto fade out when playing audio sequences. The audio sequence stops upon the note off. If that's in the middle of a (bass) sound, there may be a click. Same would be the case if you play an audio sequence in the composer and the part ends in the middle of a (bass) sound.
Is there any way to quantize note offs in real time, like we can quantize the note on? Or tell the sequence to play to the end? Because at least that way I can create sequences with neatly trimmed clips. It's not really a problem when working in the composer, but as you can see I'm mapping the sequences to keys and playing live. Really I'm just trying to find any way to avoid the pop when stopping a bass clip.
For the CC zipper noise, I believe you'll need to listen through headphones / monitors, but it is obvious.
I double-checked the smoothing and it works ok. Note that smoothing always is a balance between smoothing the rough edges to avoid zipper noise but still keep the signal instant/edgy enough so to be able to do sharp automations eg stutter effects, rhytmic gated pads etc. So the smoothing is a balanced aspect, not an absolute aspect.
Did you watch the video? Because it's pretty obvious what's happening, and that it's not desirable. In fact, it demonstrates that you can't effectively do sharp automations with it without causing some kind of weird distortion / zipping / whatever. Anyway, we've found a way of getting the behavior I want. It's just a bit surprising - I don't see this in other DAWs.

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Fri Feb 12, 2021 5:28 am

padillac wrote:
Fri Feb 12, 2021 5:13 am
Is there any way to quantize note offs in real time, like we can quantize the note on? Or tell the sequence to play to the end?
Not yet. But i expect that more options will be added in the next main versions.
Because at least that way I can create sequences with neatly trimmed clips. It's not really a problem when working in the composer, but as you can see I'm mapping the sequences to keys and playing live. Really I'm just trying to find any way to avoid the pop when stopping a bass clip.
I understand. But MuLab 8 is not yet designed for that. I expect that MuLab 9 will already give more such options.

Maybe something can be done in M8 by using the sequence player in a PolySynth with a main amp envelope with some release time. I'll see if i can share an example.
Did you watch the video?
Of course i did. And i explained what i think is going on.
Because it's pretty obvious what's happening, and that it's not desirable. In fact, it demonstrates that you can't effectively do sharp automations with it without causing some kind of weird distortion / zipping / whatever.
The sharper a transition the more it will pop. That's the nature of sound.
I don't see this in other DAWs.
I'd be surprised because sound physics are not DAW specific.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Fri Feb 12, 2021 5:58 am

I suppose it's just different decisions in parameter smoothing. Here's Ableton for comparison. Same audio clip, same MIDI controller and CC:

https://www.youtube.com/watch?v=6VRPRkyRscA

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Fri Feb 12, 2021 11:37 am

To make the test complete there should be 2 tests:
One test with moderate manual CC changes (like in your last video), and one test with programmed sharp 0 -> 127 -> 0 changes.
When the smooth factor is lower then test 1 will be give worse results, test 2 will give better results.
When the smooth factor is higher then test 1 will be give better results, test 2 will give worse results.
Indeed it is about a balance. I remember when choosing the smooth factor i certainly did not want to compromise the sharp transitions too much, so maybe MuLab's smooth factor is lower than Live's. But that would mean that in Live sharp CC changes would sound a bit more fluffy.

KVRAF
10925 posts since 24 Jun, 2008 from Europe

Post Sat Feb 13, 2021 1:49 pm

mutools wrote:
Fri Feb 12, 2021 5:28 am
Because at least that way I can create sequences with neatly trimmed clips. It's not really a problem when working in the composer, but as you can see I'm mapping the sequences to keys and playing live. Really I'm just trying to find any way to avoid the pop when stopping a bass clip.
Maybe something can be done in M8 by using the sequence player in a PolySynth with a main amp envelope with some release time. I'll see if i can share an example.
Ok there is a way in M8, though you need the latest M8.7.3 update for that.
You can use an Audio Sequence Player inside the PolySynth and use an amp envelope to create a smooth release. It's important that the Sequence Player's Stop Mode is set to never so it continues playing even after the note-off has been released and so the amp envelope can do its job.
See attached example project.
You do not have the required permissions to view the files attached to this post.

KVRian

Topic Starter

666 posts since 27 Nov, 2011

Post Sat Mar 13, 2021 11:40 pm

Very cool!! Thank you

Return to “MUTOOLS”