New Feature: SuspendOnSilence
-
@Christoph-Hart Nice one! I have to test this…
-
@ustk very much welcomed!
-
@Christoph-Hart noice
-
@Christoph-Hart That's great!
-
@Christoph-Hart this is good for both instruments and FX plug-ins?
-
@DanH Yes, it works in both targets.
-
@Christoph-Hart Great, now I want to recompile all my projects and make benchmarks ... Nice improvement!
-
I'm out of my element here (and thus the questions). Will use "gate" for shorthand.
-
Why wouldn't the gate close only on absolute silence? (So many questions here. Does real-time dithering in DAW necessarily provide dither noise in audio sent to plugins? Is there even such thing as "absolute silence" in the audio flowing to a plugin? If there is, must this be computed (e.g., based on sample rate and bit depth), and can it be?)
-
How long before the gate closes?
-
How long after the threshold is met before the gate opens?
Thank you.
-
-
@clevername27 the „gate“ opens immediately and closes with a „hold time“ of 500 ms.
Dithering is supposed to improve the sound quality of quiet signals (ballpark -40 - -50 dB) - the noise itself doesn‘t matter and can be cut away without issues. Also it won‘t cut the sound but just not process it, so even if you‘re really sensible about the lower dynamic end this won‘t have any real world sound impact.
-
@Christoph-Hart so so so useful. I’ve made a script to bypass unused modules in the past for that but this is the real solution. I love it
-
@Christoph-Hart This is fantastic update! God bless HISE.
Nice that the new feature "gate" is working with RNBO well! -
@Christoph-Hart I found 2 bugs regarding this new feature
At first, I am not using Scriptnode
I am only using theprocessBlock
CB to perform my recordings and other stuff that are waiting for a flag to start, but since it is now suspended (S
), evidently nothing happens.So I created an embedded DSP and disabled the
SuspendOnSilence
flag of the main DSP container -> theS
disappeared successfully.
But still, theprocessBlock
CB isn't firing (a simple console print shows nothing)Going back to the node to double check -> the
SuspendOnSilence
button disappearedRestart Hise and project:
S
isn't showingSuspendOnSilence
button doesn't reappearprocessBlock
CB still doesn't fire by itself
Now I need to sleep, the rooster is waking up already... Need a SuspendRoosterOnSilence
-
@ustk you have a rooster?!
-
@DanH not compatible with my cats, but my neighbor has many, with hens, geese... Joys of a 30 souls village :)
-
@Christoph-Hart So apparently
processBlock
is bypassed when a network is present, which I think is normal behaviour.
But then, without a network, there's no possibility to set theSuspendOnSilence
flag which makesprocessBlock
to be always gated when no signal is present. -
I changed it so that it doesn't suspend the script processors by default. I could add a scripting method that controls this behaviour, but using script processors without a DspNetwork is so 2016 that I don't want to spend too much time with this :)
-
@Christoph-Hart Mmm great! Thanks!
Yeah, that's old school but it's the only way (that I think, since you helped me a while back on that matter) to record a buffer from an input stream. -
@ustk said in New Feature: SuspendOnSilence:
@Christoph-Hart Mmm great! Thanks!
Yeah, that's old school but it's the only way (that I think, since you helped me a while back on that matter) to record a buffer from an input stream.So your using the process block to record incoming audio? Is that right? If so: "How are you doing that!!"
-
@Lindon Basically, you create a buffer and just copy the incoming stream into it. Since processBlock is continually firing, just set a flag (here the recordIndex is used as a flag) to tell when you want it to record the buffer.
reg recBuffer = Buffer.create(yourLength); reg recordIndex = -1; function processBlock(channels) { if (recordIndex != -1) { local numSamples = Math.min(recBuffer.length - recordIndex, channels[0].length); local temp = Buffer.referTo(recBuffer, recordIndex, numSamples); if (numSamples == channels[0].length) { channels[0] >> temp; } else { local s = Buffer.referTo(channels[0], 0, numSamples); s >> temp; } recordIndex += numSamples; if (recordIndex >= recBuffer.length) recordIndex = -1; } }
A simpler version to understand would simply be to copy the samples one by one in a for loop, but it's a bit greedy on cpu cycles. So this version Christoph gave me is much lighter since the copy process is made per block.
Bear in mind that you can't test this in Hise standalone because the inputs aren't activated.
Though I don't use the Hise plugin version for this, it should work (and the same for the exported project of course, it can't work in standalone unless activating the inputs) -
Bear in mind that you can't test this in Hise standalone because the inputs aren't activated.
I think you can test it by dragging an audio file into the HISE Controller DAW timeline...