Scriptnode Synthesizer (how to :)
-
-
@ulrik thanks for confirming! yes I know about the parameter! But I think is the "Allow Compilation". Disabled that and I'm able to run the standalone compiled. But I get no sound from a Faust Oscillator once compiled (I do with the factory oscillator).
Will continue investigating -
Confirmed. No sound out from Faust Nodes on Scriptnode Synthesizer Module once compiled. (allow compilation for nodes disabled)
HiseSnippet 1188.3oc4W0raiTDDtG6zYiCAEVzdXO5CbHqTHxNrrfDGv4Gavh0dsxDh3VTmwssa4d5dnm1wwf3YfWCdL3Qfa7ZvavRUSOS7LgYCdMrKHvQJZ55md9lp9ppqdfQGvii0FhWsyWDwId6P8WnrSNYBSnHcOk38dTshe4H1rX6kwBEmb7hHVbLeHwyq5WfV4UaCRxue6yOlIYp.9RQDxEZQ.+4hPgcozAs9JgT1gMjetHLm0OsU2.s5DsTOCPTUZCRDKXJaLuOCMqBk3sY6gBq13aYVdLwaii0CW3OQOW4r+BQr3JIGWzj3CajSbGsbHhX7YxISDxgCx9xiIDO5fkwgpt3vin8DCE2JOe7.UTeoG4iGdUJBupEfWyWE7JARd4fzFNH8PpefQDYWpAwy6P6prbyHVPwTiyVh2OSOQCFnrGDxlx6XfE25vdOqQi8qC+6Ie1nYp.qPqpqU80V9KT68js+9sqs8Orc86pZznR0guFiVJ4lRUiYZy843dpYgWwM6W+ZlbF+VCgO+hwzMWsXZf6qNmgZUWkv9hHd55kjhlkjAHogM3out6oLKCSJox.6h3Fq.gi2o7qAFtKEUidJOdpUGkXaXDT5.6f2V1TNkKozQpYVgZ74B.1B.A6RyKpI4FfR5Ig27B7geZIXbuk2MgB5CEI.ZIWMNqfo1lfkuDKjDVdXAojhROLuXxejpAjb8vYRlsHyGK2SU.otBzMjSohE1E4aGb2xgMd0otFkVsVZhYEg6CoCD1fIki2JkfWHA+lFuUyRfsGMhGXWB1Mnc9l6sSxe6PoVFTbbxjt9IP4woRT5g75nXdrHlaZdOM9+kUswezJ23Oq809zWmVEatxAs7sJJRqyYeI8k27M0QEuUqM9qWJWc0f6exIa0xvnuHLRxaqtlKgVqIX78gdovXGRalzhLvdZkNZhVIBxS5NiaMhwi4l7XuzOnirVX1hkRdTqy3RNKNGq7CZ8bXfGlAhS70LV75eJeo4qGScvsNV1T++Fsfq9+9Vv2WnaKZ6arFVy+kmgSg4g+SAyyzyvwl5wfxdbpo9yBcyEAPTo3xXb.pJ3.Tt0Mv0Hf74pgIKdI7KUYSbsWpxlYJyMHXetct1LMoxM8Y3DALNrK8z3nTQ84yIGIk543DfhThODVRjMPKWj01xqhyhLvdTndFNtnCweIK9blPhlcA2DmrIOf13.3OnJoeROIZGV.DSWLfAGdCka3PuPpgaNH31TzcgV9LEtKYm55hK.hBSlYEurU0bC55ZVgqfzZEbi2g1M9BTa.SRt.OIFwJA2SWDxAQzzGPSt.Io.b2AfqgefSyZipJ2AU0nmHgcp6vLHQo53fDBcdy1EoJCXF3hkvkghu0XO2DwKUfe2YqfjcOgJ0zkytzicSQYQ+ZKeKOxW7cEN2veJetKBT3zI.MaRGY3eKo3tz5GaQ7miMPOmYFysw2AXji05ogrD93ZcGk2JUOgr.i9x.2faX3bqDIPZTkbo9Zzd355MIWmkuPFdHL4zkAAXa4ODp7K2mCWCe9n0vmmtF97wqgOOaM74SVCe9z60Gbn0ilY0gtNWffAsSHWddsULnGcRQJ42gxd18S
-
@Christoph-Hart can you confirm this is the actual state of the Scriptnode Synth Module with Faust? Or it's just me pulling a boneheaded move?
-
@Christoph-Hart I finally found the bastard! Parameters makes Scriptnode synth to crash. Is this a simple fix???
-
@Christoph-Hart any way to get this sorted? :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands:
-
@hisefilo can you upload a patch that demonstrates this?
-
@Christoph-Hart Sure.
- Save this (or any other faust code) into [Project Folder]/DspNetworks/CodeLibrary/faust/
import("stdfaust.lib"); /////////////////////////////////////////////////////////////////////////////////////////////////// // // Additive synthesizer, must be used with OSC message to program sound. // It as 8 harmonics. Each have it's own volume envelop. // /////////////////////////////////////////////////////////////////////////////////////////////////// // // OSC messages (see BELA console for precise adress) // For each harmonics (%rang indicate harmonic number, starting at 0) : // vol%rang : General Volume (vol0 control the volume of the fundamental) // A%rang : Attack // D%rang : Decay // S%rang : Sustain // R%rang : Release // /////////////////////////////////////////////////////////////////////////////////////////////////// // GENERAL midigate = button("gate"); midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1); midigain = nentry("gain", 0.5, 0, 10, 0.01); // pitchwheel bend = ba.semi2ratio(hslider("bend [midi:pitchwheel]",0,-2,2,0.01)); gFreq = midifreq * bend; partiel(rang) = os.oscrs(gFreq*(rang+1))*volume with { // UI vol = hslider("vol%rang", 1, 0, 1, 0.001); a = 0.01 * hslider("A%rang", 1, 0, 400, 0.001); d = 0.01 * hslider("D%rang", 1, 0, 400, 0.001); s = hslider("S%rang", 1, 0, 1, 0.001); r = 0.01 * hslider("R%rang", 1, 0, 800, 0.001); volume = ((en.adsr(a,d,s,r,midigate))*vol) : max (0) : min (1); }; process = par(i, 8, partiel(i)) :> / (8) <: _,_;
- Load this snippet
HiseSnippet 1564.3oc4Z8zSabDEeVaFRLk1jzFUki9POjnlf10dsATODCXn0JAhElhZOQGVO1LhcmY6tiAbppTOz68qP9lznp9EoeC5kdt8M6rq8ZpgPbgQIpFIDyedyueu27du44YncjviFGKhPVk1aXHEYsHtyPt7nMNhv3nVMQVygcrQqOLjDGS6hrrJ9kpQrJMGJ4ye9z0I9DtGcbWHz9BlG84r.lbbusa7Llu+Vjtz8XA4lsaiVdB9FBew.fEEw1nPh2wj9zcHpoU.irleytLoHpijHow.iVWzcXmiDmx0yeeVL6PeppgCpCrP5t2R32UwXUunMNh42scl1FiPV31i08hZc+93sYcYi5erM3tICTdrD4sGVEljdEmfdN4omcN5MEJYkiRyooz8vc7hXgxwin3yGfawkzndDvrmmJ54hrdMdCALAtbo.xwzshfFiD3g0ssebY3WO5K5Mf6IYBdYAeGgj9B9CezB+vBkV3GWn74GpWuoNlBlHguOMZpCq1oit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PjlFIDooqQPolQPwHwKMm03kUdaPYWaifhiQPohQPopQPw0HnTyHnT2HnLawK5IeEwnisAvvw.XTw.XT0.X3Z.LpY.Lpa.LtZwGyieRkyARko.xp5OKubc2UpTakJIfLexsyiVafTD.eA7rKo7h.pxjZSInC6yEwqopds6EQ+dz3yRcsmcCU9ksOvTzDxc8a8mGehv+FO2QBJNFAkJFAkpFAEWifRMifRcifx4yjz4T0sqtGIpOUlbud4uJDq7bPeGO52v6+dNmzY+I.KRGywt1pUsqVU+ZrbZxSwDilnIReYW5mSTeoRsy+FioYwPSb2QVm6lfVD2Jde0ndD+LdXU.stPbb.I4l7loGF1H26X.wKRbfm90oTJ2sS5AxVyS9eunDdaU6xidsas+R.qK6.OO0YIOAxpOcYpLCxTcFjwcFjo1LHS8YPlkmAYV4RkQ8LcomppbfgNZuYhykk0lbxg95qDG8O+bH0QA
- Compile DspNetworks .dll
- Compile a standalone app and run it (crash!)
I've tryied:
-Not allowing compilation on Dspnetwork once dll is already compiled, but parameters are not working
-Compiling .dlls on a ScriptFX and then load the same network on the ScriptNode Synth -
@Christoph-Hart look at this analog beauty!!! Yep. faust analog synth!
Fingers crossed for parameter fix to start using this :folded_hands: -
@hisefilo Alright, I've digged into it. First of all: don't use the scriptnode synthesizer after you've compiled a node. Just like with FX: once you've compiled them you should use the Hardcoded module to wrap the C++ class directly without going through scriptnode.
Now the problem is that there is no hardcoded synthesizer (yet), but that's where the mysterious "Silent Synth" comes in: you can use it in conjunction with a PolyphonicHardcodedFX module and (if the exported network has the
HasTail
flag enabled that suggests that it's ringing out), it will render a silent voice that then goes through the FX where you can add the synthesizer signal.So after exporting the DLL you need this signal chain:
Be aware that in order to kill the voices after they ring off you need to add a voice management node to the network that sends a reset message. The best option is to connect a voice_manager to a envelope's CV output, but since you're in faust land, you can just use the node with the awesome name
silent_killer
, which checks the buffer and just sends a note off signal when the buffer gets silent (there's a slight CPU overhead, but it's negligible next to your sine wave oscillator madness).Edit: oh and you need to pull the latest HISE build, I've fixed an issue in the silent killer node where it didn't generate the correct polyphonic version.
-
-
Too many parameters are not supported in custom compiled dll nodes, right?
All custom nodes with more than 15 parameters crash here.
-
@Christoph-Hart Well. just 3 words! We Love You!!!!!!!!!!
You've just opened the pandora's box. I was toying around with the Polyphonic Hardcoded Module but never on the silent synth (dumb of me)
One important note: the silent_killer thing will only work if you have used the convention "gate" label for the Faust trigger. AHDSR with GT connected to a voice_killer worked for me as far as I'm not using that convention.
Also, Gain chain does not affect the synth (as far as it's placed on the FXs chain I guess). Is this ok? I need to do gain modulation directly on Faust code or adding extra nodes in Scriptnode. LFOs ADSRs, etc
@resonant I haven't reached the 15 parameters mark yet. but I will.
-
@hisefilo said in Scriptnode Synthesizer (how to :):
@resonant I haven't reached the 15 parameters mark yet. but I will.
This issue happens on effect plugins for me. But 15 or 16 is a low amount for advanced projects, it should be at least 32.
-
@resonant I'm working on big projects and never hit that limitation. Try modularizing your effects or use a slider pack if you want to control a parameter set that is somehow connected (eg. filter bank).
If you can't modularize for some reason you can raise the hardcoded limit here:
-
@Christoph-Hart I'm really stuck trying to implement sustain on Scriptnode Synthesizer and Faust.
Is there any tip or advice? I get hanging notes if I use the silent_killer and I get no sustain if I use an AHDRS.... any clue??HiseSnippet 1350.3oc4X0sahbCE1CDSfroc6VU0tpWwkYkRhXH+V0K5l.jVTKDzRZzdWjyLFvhYroyXRBspua6iPeT5aP6wimgwSJvRHMq1pRjhvme74ym+7wzIP3PCCEAHqRWLYDEYsIt6DtbPsADFG0rNx5SwgiCkvpqjzPI5zIiHggTWjkU9uWIiUo0PQe9yu6ThGg6PSIgPWJXNzeh4yjoT675ej44cFwkdAy2P58ecSGAulvSLFvSdbEzHhyPReZahRrbXjUgFtLoHnqj.fAYs1oB2IcGHtkqk+RVH6ZOpZgMpKrQZxmI7bUHVQEUa.yysSx4NDgrvcR8B40dgu.2h4xlRO0a7YQLJmpgo+vJWV3kOC7rMgWEC3MCHYY.o0zP5E3tNArQxTNJ77LbStjFzi.tcS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a89RlWnc5qpGM1nCd7kLpMURmeTovprooMOxn5IPTwGrVzKgPcuUM4xzlSlEQPZrpAs7pg5I3xTL8RLkeC0Cxq2MqTOnBqbYR2yM6SbQ7N1UueiscNrxba+bwf.Z3.Xd+62wn86LO74ezd3h3Sf132PmuCNe1VTlG2Lbhlj1rGwl3lgWp35P7R1dHbcpPLzmDcU9p8D+ODCd3SbBDWEewo5vULhBjQvi9cvJgaoVW1FcioeK4FVXZ0cf2nMacptB5r2Jny9qfNGrB5b3JnyQqfNGuPcTumMNsUMUBPnSinjKKK8c45b4+ltd4Jp
declare options "[midi:on][nvoices:128]"; import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01)) : si.polySmooth(gate,0.999,1); gain = hslider("gain",0.5,0,1,0.01); s = hslider("sustain[midi:ctrl 64]",0,0,1,1); cutoff = hslider("cutoff[midi:ctrl 1]",1000,50,4000,0.01) : si.smoo; t = button("gate"); freq = f*bend; gate = t+s : min(1); envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain; process = os.sawtooth(freq)*envelope : fi.lowpass(3,cutoff) <:_,_; effect = dm.zita_light;