Open-Source Faust Transient Shaper
-
-
@clevername27 hi)I can't load this into hise. I loaded the code into faust and got the dsp file. But when I load it into hise, nothing happens.
-
@udalilprofile
I tried using this project in a VST and tested it in my DAW, I had no problems.There is also a scriptnode example called "transient designer" here, in the forum.
Both examples are good starting points.
https://forum.hise.audio/post/45656Without making any further changes, I think this FAUST version introduces too much distortion.
(opinion of a newbie). -
@udalilprofile Can you post a code snippet?
-
@Mighty23 Interesting…is it possible you're clipping, since TDs often raise the signal level?
-
@clevername27 said in Open-Source Faust Transient Shaper:
often raise the signal level?
Yes, I think that's it. The signal increases and there is nothing to "shape" it. Many "commercial" transient shapers often do not disturb even at extreme values.
-
@clevername27I copied the code from your link and placed it in Faust. Then I got the dsp and tried to create a node in hise. I can't load it.
-
-
@udalilprofile show us your scriptNode implementation...
-
-
Does this code work for you?
When I load this, as soon as I tweak the Sustain knob, it breaks the sound and creates sound glitch.
declare name "Whetstone Transient Shaper"; declare author "Evermind"; import("stdfaust.lib"); WINDOW = 30 / 1000; low_cutoff = hslider("v:Whetstone Transient Shaper/[2]Low Cutoff[unit:Hz]",10,10,20000,10); high_cutoff = hslider("v:Whetstone Transient Shaper/[3]High Cutoff[unit:Hz]", 20000,20,20000,10); do_monitor = button("v:Whetstone Transient Shaper/h:[4]Monitoring/[0]Monitor selected band") : ba.toggle : vbargraph("v:Whetstone Transient Shaper/h:[4]Monitoring/[1]ON[style:led]", 0, 1); attack = hslider("v:Whetstone Transient Shaper/[0]Attack[unit:dB]",0,-12,+12,0.1) : ba.db2linear : si.smoo; sustain = hslider("v:Whetstone Transient Shaper/[1]Sustain[unit:dB]",0,-12,+12,0.1) : ba.db2linear : si.smoo; process = sp.stereoize(split_shape_merge); split_shape_merge = _ : split_active_and_passive : (_ <: _ * get_gain(_ : change)), ba.bypass1(do_monitor != 1, *(0)) :> _; //split signal into two parts $active, $passive //$active is resonant low- and high-passed between low_cutoff and high_cutoff respectively. This is fed directly to output if monitoring is on //$passive is resonant high- and low-passed between low_cutoff and high-cutoff respectively split_active_and_passive = _ <: (fi.resonhp(low_cutoff, 1, 1) : fi.resonlp(high_cutoff, 1, 1)), (fi.resonlp(low_cutoff, 1, 1) + fi.resonhp(high_cutoff, 1, 1)); //$active is analyzed with RMS over N ms divided by a lag filter applied to the RMS to get a rise speed over time to get $change change = ba.slidingRMS(ba.sec2samp(WINDOW)) <: _ - si.lag_ud(WINDOW, WINDOW); //If $change is positive, $gain is $attack //If $change is negative, $gain is $sustain //Smooth $gain get_gain(x) = ba.if(x > 0, attack,sustain) : si.lag_ud(WINDOW,WINDOW);