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.

98 lines
2.5KB

  1. <Cabbage>
  2. form caption("Impulse waveguide") size(560, 325), colour("black"),pluginID("imp1")
  3. rslider bounds(15, 10, 100, 100) channel("semi"), range(-12,12,-12), caption("Coarse"), colour("tomato")
  4. rslider bounds(120, 10, 100, 100) channel("spread"), range(0,1,.5), caption("spread"), colour("tomato")
  5. rslider bounds(225, 10, 100, 100) channel("detune"), range(-1,1,0), caption("Detune"), colour("tomato")
  6. rslider bounds(330, 10, 100, 100) channel("fback"), range(0.1,1,.8), caption("Feedback"), colour("tomato")
  7. rslider bounds(435, 10, 100, 100) channel("filter"), range(100,10000,2000), caption("Cutoff"), colour("tomato")
  8. rslider bounds(15, 120, 100, 100), caption("Impulse1"), colour("tomato"), channel("random1"), range(0,3,.1)
  9. rslider bounds(120, 120, 100, 100), caption("Impulse2"), colour("tomato"), channel("random2"), range(0,3,.1)
  10. rslider bounds(225, 120, 100, 100), caption("Rev level"), colour("tomato"), channel("level"), range(0,1,.8)
  11. rslider bounds(330, 120, 100, 100), caption("Rev size"), colour("tomato"), channel("revsize"), range(.1,.99,.7)
  12. checkbox bounds(450,120, 160, 20),channel("onoff"), text("Rev On/Off"), value(0)
  13. keyboard pos(15,230), size(520, 60)
  14. </Cabbage>
  15. <CsoundSynthesizer>
  16. <CsOptions>
  17. -d -n -+rtmidi=NULL -M0
  18. </CsOptions>
  19. <CsInstruments>
  20. sr = 44100
  21. ksmps = 32
  22. nchnls = 2
  23. 0dbfs = 1
  24. ;Author: Giorgio Zucco (2012)
  25. seed 0
  26. ga1 init 0
  27. ga2 init 0
  28. instr 1
  29. gkrnd1 chnget "random1"
  30. gkrnd2 chnget "random2"
  31. gkrate chnget "rate"
  32. gksemi chnget "semi"
  33. gkspread chnget "spread"
  34. gkdetune chnget "detune"
  35. gkfeedback chnget "fback"
  36. gkfilt chnget "filter"
  37. iamp ampmidi 1
  38. inote notnum
  39. kfreq1 = cpsmidinn(inote+int(gksemi))
  40. kfreq2 = cpsmidinn(inote+int(gksemi)+gkdetune)
  41. kdev = rnd(.01)
  42. krnd1 randomh kdev,.01+gkrnd1,10
  43. asig1 mpulse iamp,0.01+krnd1
  44. krnd2 randomh kdev,.01+gkrnd2,10
  45. asig2 mpulse iamp,0.01+krnd2
  46. awg1 wguide1 asig1,kfreq1,gkfilt,gkfeedback
  47. awg2 wguide1 asig2,kfreq2,gkfilt,gkfeedback
  48. aL clip awg1,0,0dbfs
  49. aR clip awg2,0,0dbfs
  50. kenv mxadsr .001,1,1,.5
  51. aoutL = ((aL * gkspread) + (aR * (1 - gkspread)))
  52. aoutR = ((aL * (1-gkspread)) + (aR * gkspread))
  53. outs aoutL*kenv,aoutR*kenv
  54. vincr ga1,aoutL*kenv
  55. vincr ga2,aoutR*kenv
  56. endin
  57. instr 10 ;reverb
  58. ktrig chnget "onoff"
  59. klevel chnget "level"
  60. ksize chnget "revsize"
  61. if ktrig = 1 then
  62. al,ar reverbsc ga1,ga2,ksize,12000,sr,0
  63. asum1 dcblock2 al
  64. asum2 dcblock2 ar
  65. else
  66. asum1 = 0
  67. asum2 = 0
  68. endif
  69. outs asum1*klevel,asum2*klevel
  70. clear ga1,ga2
  71. endin
  72. </CsInstruments>
  73. <CsScore>
  74. i1 0 36000
  75. i10 0 36000
  76. </CsScore>
  77. </CsoundSynthesizer>