Changing Impulses in Scriptnode.
-
@lalalandsynth yes, calling
irSlot.loadFile()
works when you hit compile but doesn't work within a comboBox callback... More precisely the callback doesn't seem to be triggered when using the comboBox.Here's the snippet :
HiseSnippet 2169.3oc2YEzaabbEdWRspgqKKhKhKB5g1AB4.MfBMosRZQSCDknHcYqkDAorhCBBrFs6PxoZ2c1t6rRjMv.AnW5sdN2JP+Czq8V9CTfBzC8uPO5eAs8MyrK2YIocjncLZKALrmYdy79duYdeu2ac+HlCINlEYXV4jYgDCyuq0vYA7IsmfoAF8NPLw.xkjnyOgDyM1eVHNNl3ZXZV9gBILqrgg72y2cerGNvgjOkgwoLpC4QTeJOe19s9UTOutXWxITeMo2oUOGVPalGKAPSYqFFgXmKviIGgEhUxxvbyNtTNKZHGyIwFlarOyc1vIrqBTxeJMldtGQLnowP3fTS2k44JPr3eazdB0yselUGaXXZ0O2GTV4CdGqCotz4ym6Kda4Bn7cn6OLKUDdkK.ul5vqgF7VAjL0fzFJHcaqgNQzPd9JB7bKqdAbRzHL310ghRViR+qRVsYfDA7593KHcifAy2QsOrQisQePiF28ipZCt9XN5RbDZuDWJ6SvWRFwh7ah9XT1ILlvay7CYAvfZaUTrsDmQU6NAioAj5dLrqb8tTORLnPVeFyqlRlp126dhyLf3vQ7IDTrDrntOA8qS.L3QuffvnI3HWGFbwg7YtIdjp1E0X8XBfhvL2QO2s1Fs0vriJCPfpdbLQplgX+PORu.WxTTCDmgbzvfKMNzCOSLsXnbizngdLNhMRsc4Q28IqFGw4GNfCviZCmvQvtuhEcAMXLJlBgFZla2o0cX9my1mMEQiQAfn3.DlyinmmvI1z.OvShFkD3vor.jHxPIdSw8QD3NcxtL1Ft27RH209KrqjASIt1K63p0HSlOx9Y.1V8U5bMr0cE6NUOswddmCQh0VFBvoU011VCjfISNNnlDJ1OyFs3RiFsx0ROOORzJWVPTD8x1XsfD+yIQ5NBgfPzSwPRqWbHoNigix8nIHKnW.kebHIc7xAsFo9TH7sTJp.BKtL38NoAuEd4XP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eqqhvg.Nuj4kHr9lFErg2UyFXPuxp2s6L8+VveUKMrWD52wBxa.b6w00E4lg6et0PhpMpyzZx5LQboDvBV9yZbl3uRRaF6LUyUmYWzh2nfEWZAKtpk1wmYxxHvEDbSKAwUlD+nkpctw82OBTZGYoyF4EpbBNB3xjkNfiv9DgeQ9EBxFAG8gzfSWL54P7zSWrX4gbRnftpvbWPtR480mUg3GBbNFKcJF2XU25Oz5loZaq9.uOA3aMV5z+FT+m90Ka4.MUQ0+G+pu5urr5+5w+46zRndnSA3REHKuwZemVKo8e+e+5Y7s9c9+Uow+cr9Ez1I7artecbmW05vDONkOAJWxcEHPvk5Qll0xkVAg5iDrzpNcTQkcfTatPUwxsklqHG+JYxwdZug5O2KNXeF6BerLwv509m4qTKUeIVukp26F0R02SgkaYMDHlkeTSYpkefbLRzhI5gDfxVz8RyWxW17ucc+xlgW6ur4wNbP8m.8nGGxhKF8P7om.9qX8IebLoaD42LPvRoOeaFNZkK87c6BF4J2yPLOIRR2kkdVs1+3O8O20r70tOL8JfJ1dpl7qnqnM915ys9FsG2W8Vxe8zWYkLLNjJHK5DbIwChIMTUsb.YDFnXxls3i7CYArrB2xecLfj1JPA1pUYP6w4P874y7NsFP7HX8WyuWqGAuBwQGJKEYs7EMuweo7Ude8tVJ3hDQln++3SoT9+09TJudfxahdqdSnCerSD6oNpV2DukeK4LfcGH+O7ph0ghwn4cqYY0ndCCefQ7oNNB286C9mUum6uF64Aqwd1YM1yGrF64CWi87SVi87Seo6QjLZuDNyWEJBSzuipLKyNAX3kr7Uuw+APvhLg.
I tested this in an empty scriptFx, using just a knob callback to print something on the console : the callback is not triggered.
-
@matt_sf That's because the parameter callbacks are forwarded to the active DSP network by default and thus the callbacks of the interface controls are not executed anymore, but I should probably add a warning somewhere that catches this problem since it's super unintuitive.
@lalalandsynth You need to change the convolution node to use an external slot (click on the icon next to the waveform and choose a external slot, then you can access it from outside. Oh and the convolution reverb must not load sample maps, that was just a glitch.
-
@christoph-hart said in Changing Impulses in Scriptnode.:
Oh and the convolution reverb must not load sample maps, that was just a glitch.
but it would be super cool if it did, even cooler (for the win) is if the granular in script node used sample maps....
-
@christoph-hart said in Changing Impulses in Scriptnode.:
You need to change the convolution node to use an external slot (click on the icon next to the waveform and choose a external slot, then you can access it from outside.
Yep, did that , still does not work.
-
@lalalandsynth @Christoph-Hart @UrsBollhalder loading IRs into scriptnode actually works but only if you have AudioWaveforms tiles into your GUI. Like this :
Add External AudioFile Slots to the
filters.convolution
node :
Link the AudioWaveform tiles to the nodeConvolution FX + set the correct sampleIndexes :
So the user can load custom IRs into a scriptFx, but it only works this way (or am I really missing something ?).
I couldn't find any way to load them with a comboBox.
The thing is, when one is using the Convolution Reverb Module, we must declare a reference like this :const var ConvolutionReverb1 = Synth.getAudioSampleProcessor("Convolution Reverb1");
But this doesn't work (obviously) with a convolution node, so we can't use the
AudioSampleProcessor.setFile()
function. -
@Matt_SF Have you figure out how to change impulses via script?
I found some scripts that work in the scriptFX script, but having roadblock changing them from the Interface script because the FX has an actie DSP network.const var irSLot = Engine.createAndRegisterAudioFile(0); // if you want to load an IR from a combobox, use this call: irSLot.loadFile("{PROJECT_FOLDER}MyFile.wav");
-
@dustbro errr it's been quite some time and I think I hit the same roadblock you're facing, aka how to access the scriptnode convo slot from the outside... At that time I think I used HISE's convoFx for my project
I won't be home before this evening, but I'll still take a look, see if I can help -
@dustbro got home and found a solution, but it's not perfect yet : it only works if you have only one convolution node in the graph :
HiseSnippet 1684.3oc2X80aSbDDeO6bAhoffJnpOUcJpOXjfnXfRqDpBm3XCtEmXEGRoBgh1b2Z6Uducud25j3RQBo9Bu0m4s9Qnu123KPkpT+hv2f1Y28Ne2gc9mUgBMQJJ6ryNyuc1Y9M6dsCEtjnHQHxZgsFEPPVejcmQbY+Z8wTNp4ZHqKX2BGIIgNFQqNJ.GEQ7PVVEumRf0Bygz+756tJlg4tjTQHz1BpK4ATepLUZ6peKkwZf8HaQ8yn8sp1zUvqIXhg.dJZuLJ.6N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ZYsErQA8EbpqRjQiDjthuXHWl.26ii1BSYpb8sIgQZibF6kWB9ExyWW3AAG6FXWHHNpMV1WUvnZZ.YmjvkbGmklCW4RT.SjbQSSDAfiul7RcMyhYXVMIjpQP4VAiUaFssZVWLCssgsGfsxllXiAeJUOicT.Ct66ghUyzyJzF6yB47oI.bLwm+KBGmWgh8Drg57hb.7J1coL3doQKkUkYNvnxtXjCRZXlgUH6HfGKt+gwf0g5UO3oB5kEW.zhxi2TFcZgOH2XTabH79DEz0ukHYDTZjtzTZ5zkm1doijDnnbxIa.YeS.JqTUPbdn8kjflvJnSsqq9KUOcttD7TIhGA3LQSX8iw8e+qlbmCTM4c+u9xW96S59W062tRUk6gq0.L0.g2o162p5Dd+E+0IayW8m8+i6ZpqtOs1PIZByfd6eled6VCYRpreHA6cT69DRg3BtyZ3Bp7dBYPdbd3CVUHF3i0sZloa8l8JLWvL44r6.6W8iU0sF9D8XG0UPctGAhDpKfU4H97F+4I8yaDbh+7Fa3JA2uEbQ+n.QT9BChOcK35zQYE9vH3A7jeXSUa0rxqIvgScpWe2FvlbpqoCVNLT2eNo0alqRV7n9LKUlwOyxbu28YV9.3AC4tM7BIXrCU0cqNeOBCpEzX7igj+tXfjHQZ9b4VBtH4tWoGzaRfKN1qGIOeyz1PqHkX2AoRtb0MILBNaR6mW8APxFNrkl9YlhEUN0eUrodd8o1F35nJ.c9v8gdE+e8C8dm75k2E9vG6FJ1w07nOUd5Y0Rf8MW+gqWvtkZry3OMjs5oLHefgaGWWUH95.g4zWyMlg0byYXM2ZFVyWLCq41yvZ9xYXMe0QtFUykUFJE9lRNPP65l67aUmigrWclN5e.OSrvS.
The trick seems to declare the scriptFx as an "AudioSampleProcessor".
I'll take more time later to see how to adress different convo nodesEdit : odd. When I load the snippet on my mac it doesn't recognize the ScriptFx as an audio processor, but i worked on my PC... I'll take a look at it again tomorrow
-
@Matt_SF Make sure you use the latest build, I think I've recently fixed stuff around this topic.
Oh, and there was indeed an issue with it only detecting the first slot, but this should be fixed now, so you can do
const var s = Synth.getAudioSampleProcessor("Script FX1"); const var first = s.getAudioFile(0); const var second = s.getAudioFile(1); second.loadFile("something");
-
@Christoph-Hart I do have the latest build on my PC but I may be a only few commits late on my mac. I'll try this tomorrow, thanks Christoph !
-
@Matt_SF You're guaranteed to be one commit behind the fix for multiple files, because I've just pushed it a few minutes ago :)
-
@Matt_SF @Christoph-Hart Thank you so much! This is exactly what I needed. :couple_with_heart_man_man:
-
@dustbro have you tried using the hardcoded master fx? For a static effect like this it‘s recommended for final product as it removes the scripting overhead.
-
@Christoph-Hart I have no idea what that even means
Is there a link to docs so I can read up on it? -
@dustbro Basically, it's the Effect Slot unit's custom network version.
You can select/swap your compiled custom dll networks with this unit and code them via script using the same API as with the older FX modules. -
@dustbro simply compile your scriptFx, add a hardcoded fx module and select your custom fx in the list, and voilà.
Very neat indeed -
sweet! I'm gonna check this out now
-
@Christoph-Hart Is there a version of this for poly effects or synths?
-
@d-healey poly effect yes. Synths no, but that‘s where the new SilentSynth comes in handy (actually it‘s exactly made for this purpose).
-