Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gui Smooth EQ: fx_jr_smooth_eq, fx_jr_smooth_eq_preview(0)
- #@gui : note = note("Based on the Butterworth Bandpass script, includes band shelf equalisers.")
- #@gui : sep = separator(), note = note("<b>Low Pass</b>")
- #@gui : Frequency Power = float(8,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Resonance = float(0,0,5)
- #@gui : sep = separator(), note = note("<b>Band Shelf 1</b>")
- #@gui : Frequency Power = float(3,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Bandwidth = float(1.5,0,16)
- #@gui : Gain = float(0,-10,10)
- #@gui : sep = separator(), note = note("<b>Band Shelf 2</b>")
- #@gui : Frequency Power = float(4,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Bandwidth = float(2,0,16)
- #@gui : Gain = float(0,-10,10)
- #@gui : sep = separator(), note = note("<b>Band Shelf 3</b>")
- #@gui : Frequency Power = float(5,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Bandwidth = float(2,0,16)
- #@gui : Gain = float(0,-10,10)
- #@gui : sep = separator(), note = note("<b>Band Shelf 4</b>")
- #@gui : Frequency Power = float(6,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Bandwidth = float(2,0,16)
- #@gui : Gain = float(0,-10,10)
- #@gui : sep = separator(), note = note("<b>Band Shelf 5</b>")
- #@gui : Frequency Power = float(7,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Bandwidth = float(2,0,16)
- #@gui : Gain = float(0,-10,10)
- #@gui : sep = separator(), note = note("<b>High Pass</b>")
- #@gui : Frequency Power = float(3,0,16)
- #@gui : Order Cube Root = float(2,0,4)
- #@gui : Resonance = float(0,0,5)
- #@gui : Colour Space= choice("RGB","sRGB","HSV8","HSV","HSL8","HSL","HSI8","HSI","LCH8","LCH","Lab8","Lab","YCbCr","YCbCrGLIC","YCbCrJPEG","YIQ8","YIQ","YUV8","YUV","HCY","XYZ8","XYZ","RYB","CMY","CMYK","Bayer")
- #@gui : Alpha = bool(0)
- #@gui : Absolute = bool(1)
- #@gui : Makeup Gain = bool(1)
- #@gui : Preview Frequency Response = bool(0)
- _jr_smooth_eq_prepare :
- f. "begin(scale=max(w,h,d);scalel=scale*log2(scale);ol=$2^3;oh=$25^3;ql=(2-2/(($3+1)^2));qh=(2-2/(($26+1)^2));rsl=1/(2^$1);rsh=1/(2^$24);ol=$2^3;oh=$25^3;
- order1=$5^3;band1=$6^2;gain1=$7;
- order2=$9^3;band2=$10^2;gain2=$11;
- order3=$13^3;band3=$14^2;gain3=$15;
- order4=$17^3;band4=$18^2;gain4=$19;
- order5=$21^3;band5=$22^2;gain5=$23);
- vx=(x-w/2)/scale;vy=(y-h/2)/scale;vz=(z-d/2)/scale;rad=(vx^2+vy^2+vz^2)^0.5;
- fl=rad*rsl*scale;
- fh=(rad*rsh*scale)^-1; # modify for highpass
- func=(1/((1-ql*(fl)^(ol/2)+(fl)^(ol))^0.5)); # lowpass
- func*=2^(gain1/sqrt(1+2*abs(log2(rad/(2^"$4"/scale))/(band1))^order1)); # band shelf 1
- func*=2^(gain2/sqrt(1+2*abs(log2(rad/(2^"$8"/scale))/(band2))^order2)); # band shelf 2
- func*=2^(gain3/sqrt(1+2*abs(log2(rad/(2^"$12"/scale))/(band3))^order3)); # band shelf 3
- func*=2^(gain4/sqrt(1+2*abs(log2(rad/(2^"$16"/scale))/(band4))^order4)); # band shelf 4
- func*=2^(gain5/sqrt(1+2*abs(log2(rad/(2^"$20"/scale))/(band5))^order5)); # band shelf 5
- func*=(1/((1-qh*(fh)^(oh/2)+(fh)^(oh))^0.5)); # highpass
- func"
- _jr_smooth_eq :
- v -
- 100%,100%,100%
- _jr_smooth_eq_prepare ${1-26}
- shift. {int(w/2)},{int(h/2)},{int(d/2)},0,2
- fft.. *... . *[-2,-1] ifft rm[-1]
- v +
- fx_jr_smooth_eq :
- repeat $! l[$>]
- if {!$28} split_opacity fi
- l[0]
- gain={iM} csswap 0,$27
- _jr_smooth_eq ${1-26}
- csswap $27,0 if $29 abs fi if $30 * {$gain/iM} fi
- endl
- if !$8 a c fi
- endl done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement