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.

96 lines
3.0KB

  1. <Cabbage>
  2. form caption("Buzz synthesizer") size(562, 340), colour("black"),pluginID("buz1")
  3. rslider bounds(15, 10, 100, 100) channel("detune"), range(-1,1,0), caption("Detune"), colour("SteelBlue "), midictrl(1, 1)
  4. rslider bounds(120, 10, 100, 100) channel("semi"), range(-24,12,-24), caption("Coarse"), colour("SteelBlue ")
  5. rslider bounds(225, 10, 100, 100) channel("cutoff"), range(60,2000,400), caption("Cutoff"), colour("SteelBlue ")
  6. rslider bounds(330, 10, 100, 100) channel("harm"), range(1,20,1), caption("Harmonic"), colour("SteelBlue ")
  7. rslider bounds(435, 10, 100, 100) channel("spread"), range(0, 1, .5), caption("Stereo image"), colour("SteelBlue ")
  8. groupbox bounds(15, 120, 240, 100), text("ADSR amplitude"), plant("ADSR"){
  9. rslider bounds(.0, .3, .6, .6), text("A"), colour("orange"), channel("att"), range(0.01,3, .5)
  10. rslider bounds(.25, .3, .6, .6), text("D"), colour("orange"), channel("dec"), range(0,1, .5)
  11. rslider bounds(.5, .3, .6, .6), text("S"), colour("orange"), channel("sus"), range(0,1,.8)
  12. rslider bounds(.75, .3, .6, .6), text("R"), colour("orange"), channel("rel"), range(0.01,3, .2)
  13. }
  14. groupbox bounds(270, 120, 130, 100), text("LFO"), plant("lfo"){
  15. rslider bounds(.04, .3, .6, .6), text("Lfo Amp"), colour("SteelBlue "), channel("lfoamp"), range(0,100, 0)
  16. rslider bounds(.5, .3, .6, .6), text("Lfo Rate"), colour("SteelBlue "), channel("lforate"), range(0,20, 0)
  17. }
  18. groupbox bounds(410, 120, 130, 100), text("LFO filter"), plant("lfofilter"){
  19. rslider bounds(.04, .3, .6, .6), text("Lfo Amp"), colour("SteelBlue "), channel("lfoamp2"), range(0,1000, 0)
  20. rslider bounds(.5, .3, .6, .6), text("Lfo Rate"), colour("SteelBlue "), channel("lforate2"), range(0,10, 0)
  21. }
  22. keyboard pos(10,240), size(540,60)
  23. </Cabbage>
  24. <CsoundSynthesizer>
  25. <CsOptions>
  26. -d -n -+rtmidi=null -M0 -b1024 -m0d
  27. </CsOptions>
  28. <CsInstruments>
  29. ; Initialize the global variables.
  30. sr = 44100
  31. ksmps = 32
  32. nchnls = 2
  33. 0dbfs = 1
  34. ;Author: Giorgio Zucco (2012)
  35. instr 1
  36. ;channel
  37. kdetune chnget "detune"
  38. ksemi chnget "semi"
  39. kcut chnget "cutoff"
  40. kharm chnget "harm"
  41. kspread chnget "spread"
  42. iatt chnget "att"
  43. idec chnget "dec"
  44. isus chnget "sus"
  45. irel chnget "rel"
  46. klfoamp chnget "lfoamp"
  47. klforate chnget "lforate"
  48. klfoamp2 chnget "lfoamp2" ;lfo x filter
  49. klforate2 chnget "lforate2"
  50. ;midi
  51. imidinn notnum
  52. iamp ampmidi 1
  53. kbend pchbend 0,2 ;pitch bend
  54. kfreq1 = cpsmidinn(imidinn+kbend+int(ksemi))
  55. kfreq2 = cpsmidinn(imidinn+kbend+int(ksemi)+kdetune)
  56. ;lfo
  57. klfo poscil klfoamp,klforate,1
  58. asig1 buzz iamp,(kfreq1+klfo),int(kharm),1
  59. asig2 buzz iamp,(kfreq2+klfo),int(kharm),1
  60. ;filter
  61. klfofilter lfo klfoamp2,klforate2,3
  62. aout1 fofilter asig1,kcut+klfofilter,0.007,0.04
  63. aout2 fofilter asig2,kcut+klfofilter,0.007,0.04
  64. aout1x balance aout1,asig1
  65. aout2x balance aout2,asig2
  66. ;master
  67. aL clip aout1x,0,0dbfs
  68. aR clip aout2x,0,0dbfs
  69. aoutL = ((aL * kspread) + (aR * (1 - kspread))) *.5
  70. aoutR = ((aL * (1-kspread)) + (aR * kspread)) *.5
  71. kadsr mxadsr iatt,idec,isus,irel
  72. outs aoutL*kadsr,aoutR*kadsr
  73. endin
  74. </CsInstruments>
  75. <CsScore>
  76. f1 0 16384 10 1
  77. f2 0 1024 10 1
  78. i1 0 36000
  79. </CsScore>
  80. </CsoundSynthesizer>