Advertisement
Guest User

Untitled

a guest
May 31st, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. #@gui Smooth EQ: fx_jr_smooth_eq, fx_jr_smooth_eq_preview(0)
  2. #@gui : note = note("Based on the Butterworth Bandpass script, includes band shelf equalisers.")
  3. #@gui : sep = separator(), note = note("<b>Low Pass</b>")
  4. #@gui : Frequency Power = float(8,0,16)
  5. #@gui : Order Cube Root = float(2,0,4)
  6. #@gui : Resonance = float(0,0,5)
  7. #@gui : sep = separator(), note = note("<b>Band Shelf 1</b>")
  8. #@gui : Frequency Power = float(3,0,16)
  9. #@gui : Order Cube Root = float(2,0,4)
  10. #@gui : Bandwidth = float(1.5,0,16)
  11. #@gui : Gain = float(0,-10,10)
  12. #@gui : sep = separator(), note = note("<b>Band Shelf 2</b>")
  13. #@gui : Frequency Power = float(4,0,16)
  14. #@gui : Order Cube Root = float(2,0,4)
  15. #@gui : Bandwidth = float(2,0,16)
  16. #@gui : Gain = float(0,-10,10)
  17. #@gui : sep = separator(), note = note("<b>Band Shelf 3</b>")
  18. #@gui : Frequency Power = float(5,0,16)
  19. #@gui : Order Cube Root = float(2,0,4)
  20. #@gui : Bandwidth = float(2,0,16)
  21. #@gui : Gain = float(0,-10,10)
  22. #@gui : sep = separator(), note = note("<b>Band Shelf 4</b>")
  23. #@gui : Frequency Power = float(6,0,16)
  24. #@gui : Order Cube Root = float(2,0,4)
  25. #@gui : Bandwidth = float(2,0,16)
  26. #@gui : Gain = float(0,-10,10)
  27. #@gui : sep = separator(), note = note("<b>Band Shelf 5</b>")
  28. #@gui : Frequency Power = float(7,0,16)
  29. #@gui : Order Cube Root = float(2,0,4)
  30. #@gui : Bandwidth = float(2,0,16)
  31. #@gui : Gain = float(0,-10,10)
  32. #@gui : sep = separator(), note = note("<b>High Pass</b>")
  33. #@gui : Frequency Power = float(3,0,16)
  34. #@gui : Order Cube Root = float(2,0,4)
  35. #@gui : Resonance = float(0,0,5)
  36. #@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")
  37. #@gui : Alpha = bool(0)
  38. #@gui : Absolute = bool(1)
  39. #@gui : Makeup Gain = bool(1)
  40. #@gui : Preview Frequency Response = bool(0)
  41.  
  42. _jr_smooth_eq_prepare :
  43.  
  44. 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;
  45. order1=$5^3;band1=$6^2;gain1=$7;
  46. order2=$9^3;band2=$10^2;gain2=$11;
  47. order3=$13^3;band3=$14^2;gain3=$15;
  48. order4=$17^3;band4=$18^2;gain4=$19;
  49. order5=$21^3;band5=$22^2;gain5=$23);
  50. vx=(x-w/2)/scale;vy=(y-h/2)/scale;vz=(z-d/2)/scale;rad=(vx^2+vy^2+vz^2)^0.5;
  51. fl=rad*rsl*scale;
  52. fh=(rad*rsh*scale)^-1; # modify for highpass
  53. func=(1/((1-ql*(fl)^(ol/2)+(fl)^(ol))^0.5)); # lowpass
  54. func*=2^(gain1/sqrt(1+2*abs(log2(rad/(2^"$4"/scale))/(band1))^order1)); # band shelf 1
  55. func*=2^(gain2/sqrt(1+2*abs(log2(rad/(2^"$8"/scale))/(band2))^order2)); # band shelf 2
  56. func*=2^(gain3/sqrt(1+2*abs(log2(rad/(2^"$12"/scale))/(band3))^order3)); # band shelf 3
  57. func*=2^(gain4/sqrt(1+2*abs(log2(rad/(2^"$16"/scale))/(band4))^order4)); # band shelf 4
  58. func*=2^(gain5/sqrt(1+2*abs(log2(rad/(2^"$20"/scale))/(band5))^order5)); # band shelf 5
  59. func*=(1/((1-qh*(fh)^(oh/2)+(fh)^(oh))^0.5)); # highpass
  60. func"
  61.  
  62. _jr_smooth_eq :
  63. v -
  64. 100%,100%,100%
  65. _jr_smooth_eq_prepare ${1-26}
  66. shift. {int(w/2)},{int(h/2)},{int(d/2)},0,2
  67. fft.. *... . *[-2,-1] ifft rm[-1]
  68. v +
  69. fx_jr_smooth_eq :
  70. repeat $! l[$>]
  71. if {!$28} split_opacity fi
  72. l[0]
  73. gain={iM} csswap 0,$27
  74. _jr_smooth_eq ${1-26}
  75. csswap $27,0 if $29 abs fi if $30 * {$gain/iM} fi
  76. endl
  77. if !$8 a c fi
  78. endl done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement