Audio Spike when loading a Neural Network node.
-
I have multiple Neural Network nodes that are wrapped in a Branch node. I am using a slider to control the branch to switch from one NN node to the next. Each NN is loaded with a model of the same guitar amp, but each model is of increasing distortion (Gain). This is all working fine, except that the first time you switch to any of the NN nodes, there is an audible audio spike (a pop, if you will). This only happens the first time. Once you have cycled through all of the NN nodes, it no longer "pops".
I have tried using soft_bypass instead on the branch node, but I have the same problem there.
The NN models are ADIA-X Json files and I am loading them into each NN node using the following method.
const var tf = Engine.createNeuralNetwork("TensorFlowNetwork");
//Loads ADIA-X JSON inot NNs
tf.loadTensorFlowModel(MLmodel_1);Does anyone has any insight into how I can stop or minimize this "pop?
-
No thoughts here? I could really use some advise.
I hate to be a pest, but this might be a dealbreaker for this project. -
@scottmire you could use a ramp whose Gate parameter you reset every time you switch, and feed that ramp output to a gain node.
This will kill the volume when you trigger the gate and then slowly ramp up. You can plug it into a table instead, and then into a gain node, to set the curve for the ramp up.
This should allow you to mute the output while you're doing the switching.
-
@aaronventure
Thank you so much for the response!
The problem is that I'm simulating the "GAIN" (or distortion) knob of a guitar amp by "mapping" multiple neural network amp models (each with increasing gain) to the different levels of a "GAIN" slider. As you turn the knob, NN models are being swapped out. It needs to be seamless. Whether it's a "pop" or a brief moment of silence, it's the same problem.
Again, it only does this once when you cycle through all of the NN models, after that, they are loaded and the "pop" goes away.My thinking is that, using the Branch node, only the first NN model is loaded and the rest are loaded as they are selected with the Branch node. If all of the NN nodes were outside of the Branch, they would all load at once. Is it possible to control the on/off of a node directly through script, without using a soft_bypass node?
-
@scottmire actually yes, see the DSPNetwork and Node APIs.
You'll need to get a reference to the ScriptFX and the network name as well, then you can get a node reference by its ID (mouse over the node name and it'll show the ID. You can then call Node.setBypassed.
-
@aaronventure
I placed the neural network node in a soft_bypass node and for the life of me, I can't seem to get a reference to the soft_bypass node. I am really struggling here....My network is called "theAmp" and the ID of soft_bypass node is "wrapneural1"......could you please show me how you would code the references?