Can't remove Child Modules
-
@bendurso What are you trying to remove, do want to remove the "Saturator" from "Effect Slot1"?
according to the documentation you should useEffectSlot1.clear();
to remove the effect loaded in that slot
and the EffectSlot1 should be referenced with this
so
const var EffectSlot1 = Synth.getSlotFX("Effect Slot1");
does it not work?
-
@ulrik Nono, I want to remove the Child processor to add the module with Engine.addModuleStateToUserPreset.
-
@bendurso modulestate refers to having modules to be saved in preset
-
@ulrik so what exactly do you want to do, maybe I have misunderstood your question?
-
@ulrik Yes, I'm trying to add the module to the user preset without the child processor :)
-
@bendurso Ok, I see the problem, I don't know how to do that, sorry
-
@bendurso You have to delete the child processor from the chain in the module tree. For example if you have a filter and you are modulating the frequency with an LFO, the LFO is the child processor, so you need to delete it.
This is not something you do through scripting.
-
@ulrik said in Can't remove Child Modules:
Ok, I see the problem, I don't know how to do that, sorry
No problem. thanks anyway :)
@d-healey said in Can't remove Child Modules:
You have to delete the child processor from the chain in the module tree.
Oh, but it doesn't actually have any custom child processors.
This is the complete XML of the processor:
<Processor Type="SlotFX" ID="Effect Slot1" Bypassed="0"> <ChildProcessors> <Processor Type="Saturator" ID="Effect Slot1_Saturator" Bypassed="0" Saturation="0.0" WetAmount="1.0" PreGain="0.0" PostGain="0.0"> <ChildProcessors> <Processor Type="ModulatorChain" ID="Saturation Modulation" Bypassed="0" Intensity="1.0"> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> </Processor>
And I'm trying to save Effect Slot1_Saturator, which only contains the built in modulator.
<ChildProcessors> <Processor Type="ModulatorChain" ID="Saturation Modulation" Bypassed="0" Intensity="1.0"> <ChildProcessors/>
-
@bendurso got a snippet?
-
@d-healey Here I made a simple example:
HiseSnippet 843.3oc2Vs0aSCCE1tqFXc.BjPBdLpOsgllR1M5fG.1ZGTAcqZYbQBglbcNc0ZI1UINCpP6+L+C.6jrljstwVkFHQdnpmKe1e9bytanjAQQxPDt19iFBH7cItiDpAaMfxEn1MQ36S5PiTPnUppMGMjFEAdHLdl2XTfmsJJ46mubSpOUvfbUHzGkbF7dd.Wkqs6qdG22eapGrOOnf2q9p1LoXKouLVymYH1ngT1QzCgcnF2pPPukFM.geJom2x1dNqyZ33r7Zq0vtWiUXazak9zUVEn81vtgCci05auJBeqVdbkLzUQUPjdQ2T5Mxcf7ahzM3i7HdOevH3fb06bpZzVC39dcOM3DgP3pcyCUyjFpdDoC2iOVedH6AIFrxQTLngqTlRUKQImKhRaK88LKvEPObA5UMkdOj3xB4CU4VLbaNRagNa1mpySEoUpunJ6iIaI0dHTKEPOB1NTKLFw7qaaunk9mEdQsZsDGxEvRTOuNRuXeH4.su7CQPX2PHBTy+iZVE9p2tY8maUuU+9.SY45KUNG3RUwgTczn9hk8cOHPdL3kbPa4CAZ9DoQ+k5I6kAQR3t9WGC6jEdQ+XASwkBKoXGoB1UL+B09QsYqcRMqyZpe+IZybzCk99P3DMapWCuLfyKhC5AgKZcL0OFF6nNmTNoeqqVRmklIJ3nTzVvU6NDxjyKKblPYAJKUp+2GZ2jpnlJkLcZ+FBgJtgN3lvw59zz5lYIMgniTxg5N0yUToKsKk.xp2MSBxLniGkJrLEOhHtZTwIEWil.6I1DLwS6UjtOjzkqXClLeqLA9piZ2z7Majx8HosG4jsJY6O+Wd9QFWtCwzip28zaAJ12VlPybYyXctFyXKRhamRh4HiGQjvimPl77ixyxR0ZxrExgeBTuNPFKTEKD0SpJeKlNqHiTmU2MyY7xJReLI+TX8uu0ZOYrhKNrCUEx+NBS1INvUeMMCzLVH.e8FQvULSbRksMxFB4BBuDgeo+xL5XjwYFcN03+M6Q.kEJOfkdifImemDM5XqH4gLypeQkV1xAkbKQw5r.86FNfwJuTmC3xSKvUlVfqNs.WaZAt9zB7YSKvF+Yflm085XkLHsWDg5zsUx0pXbKAU2UkzVh9sSMpQa
(I also tried changing "ModulatorChain" with "Modulator", "Saturation Modulation", or "ChildProcessors"). And still the same error.
-
@bendurso Looks like a bug, seems to happen with any effect that has a modulation chain.
-
@d-healey Ok, thanks for confirming. @Christoph-Hart is it a bug or we're doing something wrong?
-
@HISEnberg I was checking your solved post https://forum.hise.audio/topic/9825/add-module-state-to-user-preset-help
Does "RemovedChildElements" still works for you?
-
@bendurso No I never solved this but I would recommend just rolling your own saturator algo in scriptnode. There is a SNEX example which is basically the same function as the stock saturator in the snippet browser. I don't think you will have this problem if you do that.
-
@HISEnberg I hadn't thought of that—thanks for the idea. I actually used the saturator as an example, but I'm using a chain of dynamic effects, including the saturator and phaser, both of which have modulation. Still, I could definitely redo them using Faust or the built-in functions of Scriptnode. Thank you :)