Extra "ports" of juce-based plugins using the distrho build system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
4.1KB

  1. ; pvsBandr
  2. ; seems to crash a bit on Windows...
  3. <Cabbage>
  4. form caption("pvs Bandreject Filter"), size(390, 310) colour( 55,165,79,150), pluginID("bndp")
  5. vslider bounds( 10, 0, 60,200), text("Low Cut"), channel("lowcut"), range(20, 20000, 100,0.5), colour("black"), FontColour("black"), trackercolour("yellow")
  6. vslider bounds( 70, 0, 60,200), text("Low Full"), channel("lowfull"), range(20, 20000, 150,0.5), colour("black"), trackercolour("yellow")
  7. vslider bounds(130, 0, 60,200), text("High Full"), channel("highfull"), range(20, 20000,2800,0.5), colour("black"), trackercolour("yellow")
  8. vslider bounds(190, 0, 60,200), text("High Cut"), channel("highcut"), range(20, 20000, 2900,0.5), colour("black"), trackercolour("yellow")
  9. vslider bounds(250, 0, 60,200), text("Curve"), channel("type"), range(-5.00, 5.00, 0), colour("black"), trackercolour("yellow")
  10. rslider bounds(310, 30, 70, 70), text("FFT Size"), channel("att_table"),range(1,10, 5, 1,1), colour("black"), trackercolour("yellow")
  11. rslider bounds(310,110, 70, 70), text("Feedback"), channel("feedback"), range(0,0.99, 0), colour("black"), trackercolour("yellow")
  12. line bounds( 0, 210, 390,100), colour("Grey")
  13. hslider bounds( 5,205, 380, 60), text("Mix"), channel("mix"), fontcolour("black"), range(0, 1.00, 1), colour("black"), trackercolour("yellow")
  14. hslider bounds( 5,250, 380, 60), text("Level"), channel("lev"), fontcolour("black"), range(0, 10.00, 0.5, 0.5), colour("black"), trackercolour("yellow")
  15. </Cabbage>
  16. <CsoundSynthesizer>
  17. <CsOptions>
  18. -d -n
  19. </CsOptions>
  20. <CsInstruments>
  21. sr = 44100
  22. ksmps = 32
  23. nchnls = 2
  24. 0dbfs = 1 ;MAXIMUM AMPLITUDE
  25. ;Author: Iain McCurdy (2013)
  26. ;http://iainmccurdy.org/csound.html
  27. /* FFT attribute tables */
  28. giFFTattributes1 ftgen 0, 0, 4, -2, 64, 32, 64, 1
  29. giFFTattributes2 ftgen 0, 0, 4, -2, 128, 64, 128, 1
  30. giFFTattributes3 ftgen 0, 0, 4, -2, 256, 128, 256, 1
  31. giFFTattributes4 ftgen 0, 0, 4, -2, 512, 128, 512, 1
  32. giFFTattributes5 ftgen 0, 0, 4, -2, 1024, 128, 1024, 1
  33. giFFTattributes6 ftgen 0, 0, 4, -2, 2048, 256, 2048, 1
  34. giFFTattributes7 ftgen 0, 0, 4, -2, 2048,1024, 2048, 1
  35. giFFTattributes8 ftgen 0, 0, 4, -2, 4096,1024, 4096, 1
  36. giFFTattributes9 ftgen 0, 0, 4, -2, 8192,2048, 8192, 1
  37. giFFTattributes10 ftgen 0, 0, 4, -2,16384,4096,16384, 1
  38. opcode pvsbandr_module,a,akkkkkkkkiiii
  39. ain,klowcut,klowfull,khighfull,khighcut,ktype,kfeedback,kmix,klev,iFFTsize,ioverlap,iwinsize,iwintype xin
  40. f_FB pvsinit iFFTsize,ioverlap,iwinsize,iwintype, 0 ;INITIALISE FEEDBACK FSIG
  41. f_anal pvsanal ain, iFFTsize, ioverlap, iwinsize, iwintype ;ANALYSE AUDIO INPUT SIGNAL AND OUTPUT AN FSIG
  42. f_mix pvsmix f_anal, f_FB ;MIX AUDIO INPUT WITH FEEDBACK SIGNAL
  43. f_bandr pvsbandr f_mix, klowcut, klowfull, khighfull, khighcut, ktype
  44. f_FB pvsgain f_bandr, kfeedback ;CREATE FEEDBACK F-SIGNAL FOR NEXT PASS
  45. aout pvsynth f_bandr ;RESYNTHESIZE THE f-SIGNAL AS AN AUDIO SIGNAL
  46. ain delay ain,iwinsize/sr
  47. amix ntrpol ain, aout, kmix ;CREATE DRY/WET MIX
  48. xout amix*klev
  49. endop
  50. instr 1
  51. kmix chnget "mix"
  52. klev chnget "lev"
  53. klowcut chnget "lowcut"
  54. klowfull chnget "lowfull"
  55. khighfull chnget "highfull"
  56. khighcut chnget "highcut"
  57. ktype chnget "type"
  58. kfeedback chnget "feedback"
  59. ainL,ainR ins
  60. ;ainL,ainR diskin "808loop.wav",1,0,1 ;USE FOR TESTING
  61. katt_table chnget "att_table" ; FFT atribute table
  62. katt_table init 5
  63. ktrig changed katt_table
  64. if ktrig==1 then
  65. reinit update
  66. endif
  67. update:
  68. iFFTsize table 0, giFFTattributes1 + i(katt_table) - 1
  69. ioverlap table 1, giFFTattributes1 + i(katt_table) - 1
  70. iwinsize table 2, giFFTattributes1 + i(katt_table) - 1
  71. iwintype table 3, giFFTattributes1 + i(katt_table) - 1
  72. aoutL pvsbandr_module ainL,klowcut,klowfull,khighfull,khighcut,ktype,kfeedback,kmix,klev,iFFTsize,ioverlap,iwinsize,iwintype
  73. aoutR pvsbandr_module ainR,klowcut,klowfull,khighfull,khighcut,ktype,kfeedback,kmix,klev,iFFTsize,ioverlap,iwinsize,iwintype
  74. outs aoutL, aoutR
  75. ;klev chnget "lev"
  76. ; outs ainL*klev,ainR*klev
  77. endin
  78. </CsInstruments>
  79. <CsScore>
  80. i 1 0 [60*60*24*7]
  81. </CsScore>
  82. </CsoundSynthesizer>