New Feature: SuspendOnSilence
-
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...
-
@ustk said in New Feature: SuspendOnSilence:
@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)cool.. I must find some time to look at this... Thanks.
-
This is perfect! I can't see the option to turn the suspend on silence on my scriptnode chains, though. It works on the snippet that Christoph provided. Is there anything extra I need to do to have this? I'm on the latest Develop build, compiled today.
-
@tomekslesicki It's in the same place as the allow compilation option. Make sure you have no nodes selected.
-
@d-healey It should be there when I right-click on a chain, right? !https://imgur.com/a/Gdkyge3
-
@tomekslesicki I think if you open networks that have been saved before the addition of this feature, you need to save the network and reload it again - the property editor is being built from the XML data and it needs a resave to add the properties.
-
@Christoph-Hart thanks! I added it manually to the xml and it's working like a charm now :-)