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.

94 lines
3.9KB

  1. <Cabbage>
  2. form caption("pvsAdsyn") size(580, 90), pluginID("adsy")
  3. image pos(0, 0), size(580, 90), colour(200,100,50,150), shape("rounded"), outline("white"), line(5)
  4. rslider bounds(10, 11, 70, 70), text("Freq.Mod."), channel("fmod"), range(0.25, 4, 1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  5. rslider bounds(80, 11, 70, 70), text("Num.Osc.s"), channel("noscs"), range(1, 1024, 256,1,1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  6. rslider bounds(150, 11, 70, 70), text("Bin Offset"), channel("binoffset"), range(0, 256, 1,1,1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  7. rslider bounds(220, 11, 70, 70), text("Bin Incr."), channel("binincr"), range(1, 32, 1,1,1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  8. rslider bounds(290, 11, 70, 70), text("FFT Size"), channel("att_table"), range(1, 8, 5, 1,1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  9. rslider bounds(360, 11, 70, 70), text("Feedback"), channel("feedback"), range(0, 0.99, 0), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  10. rslider bounds(430, 11, 70, 70), text("Mix"), channel("mix"), range(0, 1.00, 1), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  11. rslider bounds(500, 11, 70, 70), text("Level"), channel("lev"), range(0, 5.00, 0.5, 0.5), fontcolour("white"), colour(200,100,50,250), trackercolour(tan)
  12. </Cabbage>
  13. <CsoundSynthesizer>
  14. <CsOptions>
  15. -d -n
  16. </CsOptions>
  17. <CsInstruments>
  18. sr = 44100
  19. ksmps = 32
  20. nchnls = 2
  21. 0dbfs = 1 ;MAXIMUM AMPLITUDE
  22. ;Author: Iain McCurdy (2012)
  23. ;http://iainmccurdy.org/csound.html
  24. /* FFT attribute tables */
  25. giFFTattributes1 ftgen 0, 0, 4, -2, 64, 32, 64, 1
  26. giFFTattributes2 ftgen 0, 0, 4, -2, 128, 64, 128, 1
  27. giFFTattributes3 ftgen 0, 0, 4, -2, 256, 128, 256, 1
  28. giFFTattributes4 ftgen 0, 0, 4, -2, 512, 128, 512, 1
  29. giFFTattributes5 ftgen 0, 0, 4, -2, 1024, 256, 1024, 1
  30. giFFTattributes6 ftgen 0, 0, 4, -2, 2048, 512, 2048, 1
  31. giFFTattributes7 ftgen 0, 0, 4, -2, 4096,1024, 4096, 1
  32. giFFTattributes8 ftgen 0, 0, 4, -2, 8192,2048, 8192, 1
  33. opcode pvsadsyn_module,a,akkkkkkiiii
  34. ain,kfmod,knoscs,kbinoffset,kbinincr,kfeedback,kmix,iFFTsize,ioverlap,iwinsize,iwintype xin
  35. aresyn init 0
  36. f_anal pvsanal ain+(aresyn*kfeedback), iFFTsize, ioverlap, iwinsize, iwintype ;ANALYSE AUDIO INPUT SIGNAL AND OUTPUT AN FSIG
  37. knossc init 256
  38. ktrig changed knoscs,kbinoffset,kbinincr
  39. if ktrig==1 then
  40. reinit UPDATE
  41. endif
  42. UPDATE:
  43. inoscs init i(knoscs)
  44. ibinoffset init i(kbinoffset)
  45. ibinincr init i(kbinincr)
  46. inoscs limit inoscs, 1, (((iFFTsize*0.5)+1)-ibinoffset)/ibinincr
  47. aresyn pvsadsyn f_anal, inoscs, kfmod , i(kbinoffset), i(kbinincr) ;RESYNTHESIZE FROM THE fsig USING pvsadsyn
  48. rireturn
  49. amix ntrpol ain, aresyn, kmix ;CREATE DRY/WET MIX
  50. xout amix
  51. endop
  52. instr 1
  53. ; audio input
  54. ainL,ainR ins
  55. ;ainL,ainR diskin "SynthPad.wav",1,0,1 ;USE FOR TESTING
  56. kmix chnget "mix"
  57. kfmod chnget "fmod"
  58. knoscs chnget "noscs"
  59. kbinoffset chnget "binoffset"
  60. kbinincr chnget "binincr"
  61. klev chnget "lev"
  62. kfeedback chnget "feedback"
  63. /* SET FFT ATTRIBUTES */
  64. katt_table chnget "att_table" ; FFT atribute table
  65. katt_table init 5
  66. ktrig changed katt_table
  67. if ktrig==1 then
  68. reinit update
  69. endif
  70. update:
  71. iFFTsize table 0, giFFTattributes1 + i(katt_table) - 1
  72. ioverlap table 1, giFFTattributes1 + i(katt_table) - 1
  73. iwinsize table 2, giFFTattributes1 + i(katt_table) - 1
  74. iwintype table 3, giFFTattributes1 + i(katt_table) - 1
  75. /*-------------------*/
  76. aoutL pvsadsyn_module ainL,kfmod,knoscs,kbinoffset,kbinincr,kfeedback,kmix,iFFTsize,ioverlap,iwinsize,iwintype
  77. aoutR pvsadsyn_module ainR,kfmod,knoscs,kbinoffset,kbinincr,kfeedback,kmix,iFFTsize,ioverlap,iwinsize,iwintype
  78. outs aoutR*klev,aoutR*klev
  79. endin
  80. </CsInstruments>
  81. <CsScore>
  82. i 1 0 [60*60*24*7]
  83. </CsScore>
  84. </CsoundSynthesizer>