How to send a signal, that is unscaled, to a target, while avoiding the expr nodes?
-
I have a compressor threshold control, which I also use to do gain compensation by first inverting it and then applying it to the gain node.
Doing this with cable_expr is beyond simple. But cable_expr then wants to be compiled and in this case I'd rather have my network open rather than recompiling nodes every time I want to test out the exported plugin.
The parameter outputs -40 to 0, which is used to control the compressor threshold. I need to inverse this using regular (non-SNEX) nodes and plug that into the value knob of the gain node.
So this is a separate modulation signal, which means it all goes into the modulation container.
But I can't find a way to send things from that modulation container that aren't 0-1. The only node that "picks up" the signal and sends it is the peak node, but it only sends 0-1.
Which means that I first have to convert db to gain using the converter node, do the inversion using math nodes, take the peak node, plug it into another converter node, and then send that to the gain node, except gain works differently above 1 so now we go into more math again.
Am I missing something? Is peak_unscaled the missing node in ScriptNode?
What's the reason HISE can't auto-compile SNEX networks and swap them out when attempting to export a project that contains an uncompiled network which uses SNEX?
-
@aaronventure said in How to send a signal, that is unscaled, to a target, while avoiding the expr nodes?:
What's the reason HISE can't auto-compile SNEX networks and swap them out when attempting to export a project that contains an uncompiled network which uses SNEX?
A glitchfest waiting to happen.
Is peak_unscaled the missing node in ScriptNode
No. The peak outputs what the signal tells it to output and as usual this is a signal between 0...1 (it folds back the negative values to the absolute value, but apart from that there's no math involved). The
_unscaled
node options only mean that they won't scale the value to the target range but forward it as is.If you need to scale the peak output you have to use that with one of the many cable modulation options and while the
cable_expr
node is certainly the most flexible one, you should be able to achieve what you want with the existing nodes already.Have you looked at the
control.min_max
node? It allows you to scale a normalised input to a given range. -
Alright check this out. If I just abs the threshold value I'm sending and use peak to send that to the gain node, it goes CRAZY high. But if I first plonk that same peak node into smoothed_parameter_unscaled, then it behaves as I'd want it to.
-
@aaronventure probably a divide by small number thing that is smeared by the smoother?
-
@Christoph-Hart It's unrelated to smoothing, the parameter input is static and if I turn off the smoothing it's still the same.
here's a snippet
HiseSnippet 2098.3oc6Z0zSibjFtaaJy.yjumIatrq5CajHRiPXxjuTNfGv.wZiAKLgjbhTzcY6VzcUs5tLCNQ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NfUDrDTpNt6.15W1c0KqSfxWzEFesqiHneptqfaItA8Lv4nEyCGN50JMuDkxhylt69RvRVuL2O2BS2kOM4qkdZuqt2FIE42m.rzj39CfeSnp5WELHtiCF7DkH4gnuFeFQ9nPjRimHa2gE5asKAN9lPVUcd7rPBl5mEx91b.BGFhoQArH3LxZq7H8stde0I79zrCWQJynDr2N.6oMtGTKg355DAyhLKFzNyJ0TnlRZ9e1PkspMA3Fm8irAlEORo0s56EQjdGU0mXJ400I+E3PGPuXOo3kKLcwKulWHSkaqWHycre7uYO7hLOnmkRvnJo51PxOOn5vgQy6f66wSnl00pIixRtX6Tk9ADHhP2tjrGSqHFZzRedbsBp4QcogxOV7rIKpdiebSEpudu3y1aIhGb+IcwDe7LkmpGOybGuy9Co4N1CEBYd+QS+GPPX70sjpaqe6022E0GbWrG9X6P1wwWmfHfwCjT.9lJeHnKgZJZaU03rQ+v.9PpmissytT4l35y5D+vYchOaVm3GMqS7im0I9Iy5D+zqehhJCh+rYB+DnBoVaq9X1lCOJuYYi+O9pxrwB
While making this, I wanted to add an input toggle so you can toggle between the two to compare more easily without having to drag cables, but then the weirdest thing: input toggle had both at the same value.
I also tried plugging peak into an add node, and it's, again, reporting the same correct value.
It's only plugging the peak directly into the gain node that causes issues. Plugging it into any other node first that can then send that to a modulation target results in the correct value in the gain node.
So the peak -> gain interaction is weird.
It's not just display, the 400db gain in the screenshots above is FUCKING REAL. I have the limiter in the snippet, too.
EDIT: I updated the snippet to have the smoother and correct value plugged into gain. DO NOT disable the limiter on the master FX if you don't have one on your system.
The peak node interacts with the min and max and skew properties of the gain knob in the gain node, instead acting as a factor, where first converting it the actual value using smoothed_parameter_unscaled or any other such node which can send a modulation signal to target results in a correct raw value being sent to the gain knob instead.
So peak -> gain scales the gain knob based on its min, max, scale properties. Peak -> others is correct (i haven't tested all).