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.

171 lines
7.4KB

  1. <Cabbage>
  2. form caption("FFT Effects") size(450, 640), pluginID("pvfx")
  3. ; PVSFREEZE
  4. groupbox bounds(0, 0, 450, 100), colour( 0,200,100,100) text("Freeze"), fontcolour("white"), plant("pvsfreeze"){
  5. checkbox bounds(35, 30, 30, 30), channel("freeze_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  6. label bounds( 30, 68, 60, 12), text("On/Off"), FontColour("white")
  7. checkbox bounds(100, 30, 180, 25), channel("freezb"), text("Freeze Both"), fontcolour("white"), shape("rounded"), colour("red")
  8. checkbox bounds(215, 30, 180, 25), channel("freeza"), text("Freeze Amplitudes"), fontcolour("white"), shape("rounded"), colour("yellow")
  9. checkbox bounds(215, 65, 180, 25), channel("freezf"), text("Freeze Frequencies"), fontcolour("white"), shape("rounded"), colour("orange")
  10. rslider bounds(370, 25, 70, 70), text("Mix"), channel("freeze_mix"), fontcolour("white"), range(0, 1.00, 1), colour( 0,200,100,150)
  11. }
  12. ; PVSCALE
  13. groupbox bounds(0,100, 225, 100), colour(250,250, 0,200) text("Freq. Scale"), fontcolour("white"), plant("pvscale"){
  14. checkbox bounds(25, 30, 30, 30), channel("pvscale_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  15. label bounds( 20, 68, 60, 12), text("On/Off"), FontColour("white")
  16. rslider bounds( 70, 25, 70, 70), text("Ratio"), channel("pvscale_scal"), fontcolour("white"), range(0.25, 4.00, 1, 0.5, 0.01), colour(250,250, 0,150)
  17. rslider bounds(140, 25, 70, 70), text("Mix"), channel("pvscale_mix"), fontcolour("white"), range(0, 1.00, 1), colour(250,250, 0,150)
  18. }
  19. ; PVSHIFT
  20. groupbox bounds(225,100, 225, 100), colour( 0,250,250,200) text("Freq. Shift"), fontcolour("white"), plant("pvshift"){
  21. checkbox bounds(25, 30, 30, 30), channel("pvshift_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  22. label bounds( 20, 68, 60, 12), text("On/Off"), FontColour("white")
  23. rslider bounds( 70, 25, 70, 70), text("Freq."), channel("pvshift_freq"), fontcolour("white"), range(-4000, 4000, 0), colour( 0,250,250,150)
  24. rslider bounds(140, 25, 70, 70), text("Mix"), channel("pvshift_mix"), fontcolour("white"), range(0, 1.00, 1), colour( 0,250,250,150)
  25. }
  26. ; PVSBLUR
  27. groupbox bounds(0,200, 225, 100), colour( 50,250, 0,200) text("Blur"), fontcolour("white"), plant("pvsblur"){
  28. checkbox bounds(25, 30, 30, 30), channel("pvsblur_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  29. label bounds( 20, 68, 60, 12), text("On/Off"), FontColour("white")
  30. rslider bounds( 70, 25, 70, 70), text("Ratio"), channel("pvsblur_scal"), fontcolour("white"), range(0.25, 4.00, 1, 0.5, 0.01), colour( 50,250, 0,150)
  31. rslider bounds(140, 25, 70, 70), text("Mix"), channel("pvsblur_mix"), fontcolour("white"), range(0, 1.00, 1), colour( 50,250, 0,150)
  32. }
  33. ; PVSMOOTH
  34. groupbox bounds(225,200, 225, 100), colour(100,250,100,200) text("Smooth"), fontcolour("white"), plant("pvsmooth"){
  35. checkbox bounds(25, 30, 30, 30), channel("pvsmooth_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  36. label bounds( 20, 68, 60, 12), text("On/Off"), FontColour("white")
  37. rslider bounds( 70, 25, 70, 70), text("Freq."), channel("pvsmooth_freq"), fontcolour("white"), range(-4000, 4000, 0), colour(100,250,100,160)
  38. rslider bounds(140, 25, 70, 70), text("Mix"), channel("pvsmooth_mix"), fontcolour("white"), range(0, 1.00, 1), colour(100,250,100,150)
  39. }
  40. ; PVSWARP
  41. ; PVSBANDP / PVSBANDR
  42. ; PVSADSYN
  43. groupbox bounds(0, 300, 450, 100), colour(150, 40, 40,250) text("Additive Resynthesizer"), fontcolour("white"), plant("pvsadsyn"){
  44. checkbox bounds(35, 30, 30, 30), channel("pvsadsyn_onoff"), fontcolour("black"), colour("red"), shape("rounded")
  45. label bounds( 30, 68, 60, 12), text("On/Off"), FontColour("white")
  46. rslider bounds( 90, 25, 70, 70), text("Freq.Mod."), channel("pvsadsyn_fmod"), range(0.25, 4, 1), fontcolour("white"), colour(110, 0, 0,200)
  47. rslider bounds(160, 25, 70, 70), text("Num.Osc.s"), channel("pvsadsyn_noscs"), range(1, 1024, 256,1,1), fontcolour("white"), colour(110, 0, 0,200)
  48. rslider bounds(230, 25, 70, 70), text("Bin Offset"), channel("pvsadsyn_binoffset"), range(0, 256, 1,1,1), fontcolour("white"), colour(110, 0, 0,200)
  49. rslider bounds(300, 25, 70, 70), text("Bin Incr."), channel("pvsadsyn_binincr"), range(1, 32, 1,1,1), fontcolour("white"), colour(110, 0, 0,200)
  50. rslider bounds(370, 25, 70, 70), text("Mix"), channel("pvsadsyn_mix"), range(0, 1, 1), fontcolour("white"), colour(110, 0, 0,200)
  51. }
  52. ; OUTPUT
  53. groupbox bounds(0, 400, 450, 100), colour( 0,250,250,100) text("Output"), fontcolour("white"), plant("output"){
  54. rslider bounds( 10, 25, 70, 70), text("Level"), channel("level"), range(0, 1.00, 0), fontcolour("white"), colour( 0,250,250,150)
  55. }
  56. </Cabbage>
  57. <CsoundSynthesizer>
  58. <CsOptions>
  59. -d -n
  60. </CsOptions>
  61. <CsInstruments>
  62. sr = 44100
  63. ksmps = 32
  64. nchnls = 2
  65. 0dbfs = 1 ;MAXIMUM AMPLITUDE
  66. ;Author: Iain McCurdy (2013)
  67. ;http://iainmccurdy.org/csound.html
  68. instr 1
  69. /* AUDIO INPUT */
  70. aL,aR ins
  71. ;aL,aR diskin2 "SynthPad.wav",1,0,1
  72. /* FFT PARAMETERS */
  73. iFFTsize = 1024
  74. ioverlap = 256
  75. iwinsize = 1024
  76. iwintype = 1
  77. /* ANALYSE AUDIO SIGNAL */
  78. f_sigL pvsanal aL, iFFTsize, ioverlap, iwinsize, iwintype ;ANALYSE AUDIO INPUT SIGNAL AND OUTPUT AN FSIG
  79. f_sigR pvsanal aR, iFFTsize, ioverlap, iwinsize, iwintype
  80. /* PVSFREEZE */
  81. kfreeze_onoff chnget "freeze_onoff"
  82. kfreeze_mix chnget "freeze_mix"
  83. kfreeza chnget "freeza"
  84. kfreezf chnget "freezf"
  85. kfreezb chnget "freezb"
  86. if(kfreeze_onoff==1) then
  87. ; triggering of 'Freeze All' mode
  88. kon = 1
  89. koff = 0
  90. ktrigon trigger kfreezb,0.5,0
  91. ktrigoff trigger kfreezb,0.5,1
  92. if(ktrigon==1) then
  93. chnset kon,"freeza"
  94. chnset kon,"freezf"
  95. elseif(ktrigoff==1) then
  96. chnset koff,"freeza"
  97. chnset koff,"freezf"
  98. endif
  99. f_freezeL pvsfreeze f_sigL, kfreeza, kfreezf
  100. f_freezeR pvsfreeze f_sigR, kfreeza, kfreezf
  101. f_drymixL pvsgain f_sigL, 1-kfreeze_mix ;WET/DRY MIX
  102. f_drymixR pvsgain f_sigR, 1-kfreeze_mix ;
  103. f_wetmixL pvsgain f_freezeL, kfreeze_mix ;
  104. f_wetmixR pvsgain f_freezeR, kfreeze_mix ;
  105. f_sigL pvsmix f_drymixL, f_wetmixL ;
  106. f_sigR pvsmix f_drymixR, f_wetmixR ;
  107. endif
  108. /* PVSADSYN */
  109. kpvsadsyn_onoff chnget "pvsadsyn_onoff" ;READ IN WIDGETS
  110. if(kpvsadsyn_onoff==1) then
  111. kpvsadsyn_mix chnget "pvsadsyn_mix" ;READ IN WIDGETS
  112. kpvsadsyn_fmod chnget "pvsadsyn_fmod"
  113. kpvsadsyn_noscs chnget "pvsadsyn_noscs"
  114. kpvsadsyn_binoffset chnget "pvsadsyn_binoffset"
  115. kpvsadsyn_binincr chnget "pvsadsyn_binincr"
  116. kpvsadsyn_lev chnget "pvsadsyn_lev"
  117. knossc init 256
  118. ktrig changed kpvsadsyn_noscs,kpvsadsyn_binoffset,kpvsadsyn_binincr ;GENERATE TRIGGER FOR I-RATE PARAMETERS
  119. if ktrig==1 then
  120. reinit UPDATE
  121. endif
  122. UPDATE:
  123. inoscs init i(kpvsadsyn_noscs)
  124. ibinoffset init i(kpvsadsyn_binoffset)
  125. ibinincr init i(kpvsadsyn_binincr)
  126. inoscs limit inoscs, 1, (((iFFTsize*0.5)+1)-ibinoffset)/ibinincr ;LIMIT NUMBER OF OSCILLATORS USED TO PREVENT CRASHES
  127. aresynL pvsadsyn f_sigL, inoscs, kpvsadsyn_fmod , ibinoffset, ibinincr ;RESYNTHESIZE FROM THE fsig USING pvsadsyn
  128. aresynR pvsadsyn f_sigR, inoscs, kpvsadsyn_fmod , ibinoffset, ibinincr
  129. rireturn
  130. aresynL ntrpol aL, aresynL, kpvsadsyn_mix ;CREATE DRY/WET MIX
  131. aresynR ntrpol aR, aresynR, kpvsadsyn_mix
  132. else
  133. /* PVSYNTH */
  134. aresynL pvsynth f_sigL ;RESYNTHESIZE THE f-SIGNAL AS AN AUDIO SIGNAL
  135. aresynR pvsynth f_sigR ;RESYNTHESIZE THE f-SIGNAL AS AN AUDIO SIGNAL
  136. endif
  137. /* AUDIO OUTPUT */
  138. klevel chnget "level" ;READ IN WIDGETS
  139. outs aresynL*klevel, aresynR*klevel
  140. endin
  141. </CsInstruments>
  142. <CsScore>
  143. i 1 0 [60*60*24*7]
  144. </CsScore>
  145. </CsoundSynthesizer>