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.

84 lines
2.9KB

  1. <Cabbage>
  2. form caption("clfilt - Multi-Mode Filter") size(600, 90), pluginID("clfl")
  3. image bounds(0, 0, 600, 90), colour( 40,40,100), shape("rounded"), outline("white"), line(4)
  4. rslider bounds( 10, 11, 70, 70), text("Freq."), colour( 40,40,100), fontcolour("white"), channel("cf"), range(20, 20000, 2000, 0.333), trackercolour("white")
  5. rslider bounds( 75, 11, 70, 70), text("N.Poles"), colour( 40,40,100), fontcolour("white"), channel("npol"), range(2,80,24,1,2), trackercolour("white")
  6. rslider bounds(140, 11, 70, 70), text("Ripple"), colour( 40,40,100), fontcolour("white"), channel("pbr"), range(0.1,50,14), trackercolour("white")
  7. rslider bounds(205, 11, 70, 70), text("Attenuation"), colour( 40,40,100), fontcolour("white"), channel("sba"), range(-120,-1,-60), trackercolour("white")
  8. combobox channel("type"), bounds(275, 12, 120, 20), value(1), text("Lowpass","Highpass")
  9. label bounds(320, 32,110, 12), text("Type"), fontcolour("white")
  10. combobox channel("kind"), bounds(275, 46, 120, 20), value(2), text("Butterworth","Chebychev type I","Chebychev type II")
  11. label bounds(313, 66,120, 12), text("Method"), fontcolour("white")
  12. rslider bounds(400, 11, 70, 70), text("Mix"), colour( 40,40,100), fontcolour("white"), channel("mix"), range(0,1.00,1), trackercolour("white")
  13. rslider bounds(465, 11, 70, 70), text("Level"), colour( 40,40,100), fontcolour("white"), channel("level"), range(0,1.00,0.3), trackercolour("white")
  14. checkbox channel("test"), pos(540, 35), text("TEST"), colour("yellow"), fontcolour("white"), size(100, 15), value(0)
  15. }
  16. </Cabbage>
  17. <CsoundSynthesizer>
  18. <CsOptions>
  19. -d -n
  20. </CsOptions>
  21. <CsInstruments>
  22. sr = 44100 ;SAMPLE RATE
  23. ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
  24. nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
  25. 0dbfs = 1
  26. ;Author: Iain McCurdy (2013)
  27. instr 1 ; widgets input
  28. gkcf chnget "cf" ;
  29. gknpol chnget "npol" ;
  30. gknpol init 2
  31. gkpbr chnget "pbr"
  32. gksba chnget "sba"
  33. gktype chnget "type"
  34. gktype = gktype - 1
  35. gktype init 0
  36. gkkind chnget "kind"
  37. gkkind = gkkind - 1
  38. gkkind init 0
  39. gkmix chnget "mix" ;
  40. gklevel chnget "level" ;
  41. gktest chnget "test"
  42. endin
  43. instr 2 ; clfilt - multimode filter
  44. kporttime linseg 0,0.001,0.02
  45. kcf portk gkcf,kporttime
  46. kmix portk gkmix,kporttime
  47. klevel portk gklevel,kporttime
  48. if gktest=0 then
  49. aL,aR ins
  50. else
  51. aL pinkish 0.5
  52. aR = aL
  53. endif
  54. ktrig changed gktype, gknpol, gkkind, gkpbr, gksba
  55. if ktrig==1 then
  56. reinit UPDATE
  57. endif
  58. UPDATE:
  59. aFiltL clfilt aL, kcf, i(gktype), i(gknpol), i(gkkind), i(gkpbr), i(gksba)
  60. aFiltR clfilt aR, kcf, i(gktype), i(gknpol), i(gkkind), i(gkpbr), i(gksba)
  61. rireturn
  62. aL ntrpol aL,aFiltL,kmix
  63. aR ntrpol aR,aFiltR,kmix
  64. outs aL*klevel,aR*klevel
  65. endin
  66. </CsInstruments>
  67. <CsScore>
  68. i 1 0 [3600*24*7]
  69. i 2 0.01 [3600*24*7]
  70. </CsScore>
  71. </CsoundSynthesizer>