Why Does Every ScriptNode Delay Break My Playback?
-
Since I first started with HISE two years ago, whenever I use a Delay Node in a ScriptNode (macOS), the audio engine sputters, coughs and distorts.
- Message delays? Work great.
- Module Tree audio delays? No problem.
I've tried different block sizes, computers, operating systems, buffer sizes, poly/buss configurations, Xcode versions, over 36 different HISE builds, Networks with just a Delay Node, and so on.
Does anyone have any ideas? I'd really appreciate it.
-
@clevername27 What are you trying to achieve ? (Delay FX ?, some other kind of processing ?...)
Use a
control.pma
node in acontainer.fix8_block
between your network's parameter and the delay node (and use ajdsp.jdelay
node) :HiseSnippet 1490.3oc2X8zaaTDEeVaOIMNsEJTUg3jOlBUQ1gzjfPn3D63hE0IVYcS6svjYGGO06NyxtiShAwctwE9TvE9H.eDPhO.UhabKbfq.uY2016ZuwMwMsUBGoHOu48l4279+yM8jTluuzCYjuUeWFx3lXy9BUmJcHbApdUjwswMH9JlWgPRa22k36yrPFFYejlfwB4PAeNeysI1DAkMhDBcfjSYOl6vUin1r7WxssqQrXs3Nw3d0x0oRQEosrGfmr3hHWBsK4X1tDMaYvnuf32AY7QXqRqVp8FTxZaTZ0UnzU1X8U9z0oLR61r0J8v0Wci1q1lPKtBxXtcr3JomohnX9HibaKs5a1QdpH7BNf6yOxloWTBYB2bH4ZRaK8STSEUoC21p4.EkOBYfaNRskMTscWbCtEeH8Qpu2MXiBijHtBzHSR3kMA7JcQvKEHYDCR4BgzcvlTOtqZzNZ7rHtt.rlf5gk.Jg7hL9UbEIvfPsrCoKqlGrXn.KsVwhOn.7u6+Ys6InJtTTPJ1UpX6IV594+17Kj+6xWX7sZ2N08zWimz1l4k51ZWCuoI3RhdNGw7dPgSH18XCYDd9I0oyc4zozvWcLFkh5BtZOWVz5o6TfhTav2dR8pDEQaThnA74x7TbMbLpxNABIBMQKfqx76pjtPPwD1OvyQZ0ylnR5NoC5h1.zGIrgZCkvmq5GOn7J3iUbp9XWVHdGbSth1IcLlIELBZpWGXLJx7V3cfzBT0H.lCW6YyZXXwqbXX9nvP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EW8e7hTsWe.NDtEzQiEdUra4tb1sWxH+WGCDm8+0CD+FYzu2D2gCg5IOLZd.sO6MBn.uaQPCVKfanWWnD5jwqY6.Y7NjRSdTSH3JypfexrJ3pypfObVEbsYUv0mUA23kKntfTT+Z5PSnGql6DzlhgwNBxQ1gQDn+C7sJzHD
-
@Matt_SF Thank you for your reply and taking the time for the ScriptNode Network. A few follow-up questions, if inclined…
Delay Resolution/Cardinality
I need sample-level resolution for the Delay, which would be two decimal places of milliseconds.
The
Module Tree
'sDelay Effect
, and thejsp.jdelay Node
, only support whole numbers (no decimal places) , so I can't use them. TheModule Tree's Simple Gain Effect
supports two decimal places in itsDelay
parameter!Am I missing something here, or can I simply use
SimpleGain
when I need a delay with 1/100 millisecond resolution/cardinality?Block Sizes
All of my
ScriptNode Networks
are (appear to be) simple, but (based on the docs), I wrap them each inDynamic Block Nodes
, so users can adjust the block size in case there are problems.Is that overkill, and a
container.fix8_block
is suitable for all myScriptNode Networks
(or are the special cases)?Thanks!
-
Delay Resolution/Cardinality
@clevername27 said in Why Does Every ScriptNode Delay Break My Playback?:
the jsp.jdelay Node, only support whole numbers (no decimal places)
jdelay
supports 2 decimal places, I don't see any problem hereIn this example, remove the modulation cable and adjust it manually, you'll hear a granularity of 0.02ms, which is approx 1 sample at 48kHz so all is good:
HiseSnippet 1796.3oc0X8zaaTDEeV6rNINoUszhJGsDHQJpJx1I0oQfTb9mainNwJ1j1aoS1cb7f2clkcWmDCpRHwEtw4xo9QfqbC9.vItiPvIt09A.AuYmc8ta7FGa2j.MUpIyal2L+1eu+Lu4UylqQbb31HkrM5ZQPJypVuKys05svTFZqMPJWWsJ1wkXmSJZstVXGGhNRQI8CEBTldBj2OuZk0vFXlFITDBsGmpQdL0j5FJsV4OkZXTAqSZPMir5EKukFmsN2f2AvSZ07HKrVa7gjswhkkRE8HrSKjxGol+9kHjkVnotNdgEzKUpzxOX4EWt.tY9EwGTnzxKVbwkJ9fkZhTxroN0kaW2E6RbPJSrFWua8V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Te67Fjl3NFt8IGM.H8xW7hebk9gzGDARd2reZvT9aL+kUjUJWwl7EcfD3cCQzqe+W+8Ol+mqjHh951kQCljdUBHJ+HRRy5gqb6JtnB029mLU8pUPit0C.wHZ8dHTzvUNjPnyFRSpVqE14Bxi5BBSY7pleDnIYtEuhYlV0gdXQHkV7DKWW0D987Ay0eVkP8FbJkfG9pjRIUrjKwxDnbUX3javva3hjANipEAepBYlQl60ah94GeMNm7sSDiRBeqSCr8gDWG+G+wHZxRH8tFaKcwssetNAx7FxhBoy.uCDD50CjK6j2CnP.enEirtFH0wZd+o5mt5o04PXCvGJ0H6CU96JOT9PO6Va7q99PxFO021jnODHOZv+TWT90hGJIuNIzb2aSJN6y96m+W+1JmkW8pcb4PnsLjb.VzALXLppYMNusI160Tuw803NxImQ8I3iHdsVziMdWuwM41l4dHApgSTtSgyp4huL6G9CCayEsF5lKtilK.gF1XliE2gTHlAjXRavYDmXROkFESTihwyV41gEYq+o+3SjhhsJAUTAnhHG1TkCDVLpvZXVLDAiisSUEO0NX3uuxlLL7X85D3KWemvxJitAcLbHOgp61pPTECEWLp3Ggs0AanVr13jdPsX8L6XP7NZEY8IzfkLWV8achgqmOCtcvuEzEuXsnZ5.LVmJtyYS1QDCHj1Ciuipeln.owiIqxY7ftgD5ArKw0ld3gj3WhmzGzpttXs1gRtc4cIFDQAZQpO+wva5v1dODX73hBib65Rzd8dpR3lSjHI2ahc6J0MafchM8P0I1Kb7N9ck8JNBExe91ik9NpPN8h47L249u2deUzv2qhyvDqYy2WS1mbQBio7j.e2L+2RUULNWAzQmtbMS3pm80zhuU8oXwwUwEFWEWbbU79iqhkFWEWZbU7AmuhhJC7qnVDm.kKUaS4SlTjUJ4Exf9WvXAvrK
Block Sizes
The blockSize you use really depends on your network's CPU consumption and the artefacts any modulation can bring. So you can never have the best of the two worlds and it's always a compromise anyway as the benefit of a small block size increases the CPU usage so there's a breakeven point you want to live in. Now the idea of leaving the user to adjust it in case of specific problems on its side is not bad, but what you gain on the CPU you will lose it with a more pronounced zipper effect for instance with some parameters.
I am currently in the same case, where I leave my dynamic size to 8, because I can't get rid of a zipper issue I have with higher sizes. But yeah, of course my CPU is very high now.
In short, can you live with the CPU cycles you get from your network at a block size of 8? If yes, the leave it as is, if no, then set it higher and try to reduces other issues the higher size will rise
-
@ustk Thanks for your response (and @Matt_SF), and thank you for the code example.
Can you tell me what is different about
jdelay
fromcore.gain
, and why you are splitting the signal in theNetwork
?For dynamic blocks, I present this interface to user; the values are stored in a preference file for new incantations of the plugin, and in a custom preset system for restoring DAW states. I'd offer you the code, but I don't think you need it, considering you're teaching me here .
-
@clevername27 said in Why Does Every ScriptNode Delay Break My Playback?:
Can you tell me what is different about
jdelay
fromcore.gain
Not sure what you are asking here. One is a delay and the other a gain, but you know this already
and why you are splitting the signal in the
Network
?It was just for you to hear the comb filtering as you move the parameter with 0.02 steps increment. So you could hear the "smooth granularity"
For dynamic blocks, I present this interface to user;
Hmmm… seems a bit technical for users, no? Many of them are not necessarily confident enough with interface buffers length, so understanding internal blocksize might be confusing… (not trying to be pedantic here)
-
@clevername27 said in Why Does Every ScriptNode Delay Break My Playback?:
Can you tell me what is different about jdelay from core.gain
Christoph will have to confirm but my guess is that the delay in the Gain module si similar to the
fix.delay
node. This one fades between two delay buffers to avoid pitch shifting.The
jdsp.delay
node uses an interpolating delay line. -
Can you tell me what is different about jdelay from core.gain
Not sure what you are asking here. One is a delay and the other a gain, but you know this already
Lol, I meant
core.delay
.Hmmm… seems a bit technical for users, no? Many of them are not necessarily confident enough with interface buffers length, so understanding internal blocksize might be confusing… (not trying to be pedantic here)
Good point - I don't make commercial plugins with HISE; they're functional prototypes for other developers and research. Also, I can use the pop-ups myself to easily try different values, and then go back change the dynamic ones to fixed.
All good on everything else - cheers!
-