Reverse Delay Faust
-
Hi there, I've found this Reverse Delay code for Faust online but when I try to use it it in script node it cracks a lot. Does anyone know how to fix it?
declare name "reversedelay"; import("stdfaust.lib"); MAX_DELAY = 48000; phasor_phase(dtime,phase)= ((os.lf_rawsaw(dtime)+phase)% dtime) :int; //phase shift in sample indexphasor(dtime,phase) = phasor_phase(dtime*2,phase)<: <=(dtime),(*(-1)+dtime*2),_ : select2; //folded triangle delay_module(dtime,phase) = rwtable(MAX_DELAY,0.0,indexphasor(dtime,phase):int,_,indexphasor(dtime,phase+1):int):window with{ window = *( sin(0.5*ma.PI* phasor_phase(dtime,phase)/dtime)); };//init have to be 0.0 floating point reversedelay_mono(dtime) = _<:delay_module(dtime,0),delay_module(dtime,dtime/2):>_; reversedelay_pingpong(dtime,spread,fb) = (si.bus(2),pingpong_premix :>reversedelay_mono(dtime),reversedelay_mono(dtime)) ~ distribute with{ distribute = _,_<:*(1-spread),*(spread),*(spread),*(1-spread):+,+:fbgain; pingpong_premix = _,_<:_,*(spread),*(0),*(1-spread):>+,+; fbgain = *(fb) ,*(fb*si.interpolate(spread,1,0.5)); }; reversedelay_pingpong_mix(dtime,spread,fb,mix) = _,_<:_,_,reversedelay_pingpong(dtime,spread,fb):ro.cross2 : si.interpolate(mix),si.interpolate(mix); process =reversedelay_pingpong_mix(hslider("delaytime",20000,0,MAX_DELAY-1,1),hslider("spread",0,0,1,0.001),hslider("fb",0,0,0.9999,0.001),hslider("mix",0,0,1,0.001));
-
@treynterrio what part of it cracks a lot? Using one of the parameter sliders or something else? You could try changing the windowing to something smoother like a hann or Blackman. I also have a decent reverse delay model built in RNBO that works in HISE if you are interested.
-
@HISEnberg I think it's because of the window. I would appreciate the rnbo reverse delay
-
@HISEnberg Anyone interested just DM me :) *
-
@HISEnberg me)
-
@HISEnberg me too
-
@DabDab Cool I didn't know there would be so much interest. I will upload it on the forum in a couple of days!
-
@HISEnberg haha... yeah. I am always ready to learn new things.