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.

198 lines
5.0KB

  1. <Cabbage>
  2. form caption("Percussive flute synthesizer"), size(760, 320), pluginID("per1")
  3. xypad bounds(0, 0, 250, 210), channel("chanx", "chany"), text("Modulation"), rangex(1,50,6.72), rangey(0,1,0.43)
  4. groupbox bounds(260, 0, 240, 100), text("ADSR"), plant("adsr"){
  5. rslider bounds(.0, .3, .6, .6), text("A"), colour("orange"), channel("att"), range(0.01,3, .5)
  6. rslider bounds(.25, .3, .6, .6), text("D"), colour("orange"), channel("dec"), range(0,1, .5)
  7. rslider bounds(.5, .3, .6, .6), text("S"), colour("orange"), channel("sus"), range(0,1,.8)
  8. rslider bounds(.75, .3, .6, .6), text("R"), colour("orange"), channel("rel"), range(0.01,3, .2)
  9. }
  10. groupbox bounds(260, 105, 240, 100), text("Tune"), plant("tune"){
  11. rslider bounds(.0, .3, .6, .6), text("Semi"), colour("white "), channel("semi"), range(-24,12,0)
  12. rslider bounds(.25, .3, .6, .6), text("Detune"), colour("white "), channel("detune"), range(-1,1,0)
  13. rslider bounds(.5, .3, .6, .6), text("Cutoff"), colour("white "), channel("cutoff"), range(200,12000,3000)
  14. rslider bounds(.75, .3, .6, .6), text("Spread"), colour("white "), channel("spread"), range(0,1,.5)
  15. }
  16. groupbox bounds(510,0, 240, 100), text("LFO/Stereo chorus"), plant("mod"){
  17. rslider bounds(.0, .3, .6, .6), text("Lfo amp"), colour("white "), channel("lfoamp"), range(0,5, 0)
  18. rslider bounds(.25, .3, .6, .6), text("Lfo rate"), colour("white "), channel("lforate"), range(0,10, 0)
  19. rslider bounds(.5, .3, .6, .6), text("depth"), colour("white "), channel("chdepth"), range(0,10,0)
  20. rslider bounds(.75, .3, .6, .6), text("rate"), colour("white "), channel("chrate"), range(0,10,0)
  21. }
  22. groupbox bounds(510,105, 240, 100), text("Reverb"), plant("rev"){
  23. rslider bounds(0, .3, .6, .6), text("level"), colour("dodgerblue"), channel("level"), range(0,1,0)
  24. rslider bounds(0.25, .3, .6, .6), text("size"), colour("dodgerblue"), channel("size"), range(.1,.99,.5)
  25. checkbox bounds(.55, .40, .60, .30),channel("onoff"), text("On/Off"), value(0)
  26. }
  27. keyboard bounds(0, 220, 750, 70)
  28. </Cabbage>
  29. <CsoundSynthesizer>
  30. <CsOptions>
  31. -n -d -m0d -+rtmidi=NULL -M0
  32. </CsOptions>
  33. <CsInstruments>
  34. sr = 44100
  35. ksmps = 32
  36. nchnls = 2
  37. 0dbfs = 1
  38. ;Author: Giorgio Zucco (2012)
  39. ;turnon 10 ;chorus
  40. ;turnon 12 ;reverb
  41. ga1 init 0
  42. ga2 init 0
  43. garev1 init 0
  44. garev2 init 0
  45. ;*******************************************
  46. opcode StChorus,aa,aakkkk
  47. asigr,asigl,kdepth,kdepthl,krate,kratel xin ;legge i parametri in entrata
  48. ;ar,al StChorus asigr,asigl,kdepth,kdepthl,krate,kratel
  49. k1ch randi kdepth/2,krate,1
  50. ar1 vdelay3 asigr,kdepth/2+k1ch,10
  51. k2ch randi kdepth/2,krate*0.9,.2
  52. ar2 vdelay3 asigr,kdepth/2+k2ch,10
  53. k3ch randi kdepth/2,krate*1.1,.2
  54. ar3 vdelay3 asigr,kdepth/2+k3ch,10
  55. k4ch randi kdepth/2,krate*1.3,.1
  56. ar4 vdelay3 asigr,kdepth/2+k4ch,10
  57. k1chl randi kdepthl/2,kratel,1
  58. ar1l vdelay3 asigl,kdepthl/2+k1chl,10
  59. k2chl randi kdepthl/2,kratel*0.9,.2
  60. ar2l vdelay3 asigl,kdepthl/2+k2chl,10
  61. k3chl randi kdepthl/2,kratel*1.1,.2
  62. ar3l vdelay3 asigl,kdepthl/2+k3chl,10
  63. k4chl randi kdepthl/2,kratel*1.3,.1
  64. ar4l vdelay3 asigl,kdepthl/2+k4chl,10
  65. aL = (ar1+ar2+ar3+ar4)/2
  66. aR = (ar1l+ar2l+ar3l+ar4l)/2
  67. xout aL,aR ; write output
  68. endop
  69. ;***********************************************
  70. instr 1
  71. iatt chnget "att"
  72. idec chnget "dec"
  73. isus chnget "sus"
  74. irel chnget "rel"
  75. kdet chnget "detune"
  76. ksemi chnget "semi"
  77. kcut chnget "cutoff"
  78. kspread chnget "spread"
  79. klfoamp chnget "lfoamp"
  80. klforate chnget "lforate"
  81. kindex chnget "fmamp"
  82. kfmrate chnget "fmrate"
  83. kcutoff chnget "cutoff"
  84. kreso chnget "resonance"
  85. kc1 chnget "chanx"
  86. kc2 chnget "chany"
  87. ;midi
  88. imidinn notnum
  89. iamp ampmidi 1
  90. kbend pchbend 0,2 ;pitch bend
  91. kfreq1 = cpsmidinn(imidinn+kbend+int(ksemi)) ;controllo midi
  92. kfreq2 = cpsmidinn(imidinn+kbend+int(ksemi)+kdet)
  93. ifn1 = 1
  94. ifn2 = 1
  95. ifn3 = 1
  96. ifn4 = 1
  97. ivfn = 1
  98. asig1 fmpercfl iamp, kfreq1,kc1,kc2,klfoamp,klforate,ifn1,ifn2,ifn3,ifn4,ivfn
  99. asig2 fmpercfl iamp, kfreq2,kc1,kc2,klfoamp,klforate,ifn1,ifn2,ifn3,ifn4,ivfn
  100. afl1 clfilt asig1,kcutoff,0,4
  101. afl2 clfilt asig2,kcutoff,0,4
  102. ;master
  103. al = ((afl1 * kspread) + (afl2 * (1 - kspread))) *.2
  104. ar = ((afl1 * (1-kspread)) + (afl2 * kspread)) *.2
  105. aoutL clip al,0,0dbfs
  106. aoutR clip ar,0,0dbfs
  107. kadsr mxadsr iatt,idec,isus,irel
  108. outs (aoutL*kadsr),(aoutR*kadsr)
  109. vincr ga1,(aoutL*kadsr)
  110. vincr ga2,(aoutR*kadsr)
  111. vincr garev1,(aoutL*kadsr)
  112. vincr garev2,(aoutR*kadsr)
  113. endin
  114. ;stereo chorus
  115. instr 10
  116. k1 chnget "chdepth"
  117. k2 chnget "chrate"
  118. kfxdepth portk k1,.01
  119. kfxrate portk k2,.01
  120. acho1,acho2 StChorus ga1,ga2,kfxdepth,kfxdepth*.8,kfxrate,kfxrate*.8
  121. outs acho1,acho2
  122. clear ga1,ga2
  123. endin
  124. instr 12 ;reverb
  125. ktrig chnget "onoff"
  126. klevel chnget "level"
  127. ksize chnget "size"
  128. if ktrig = 1 then
  129. al,ar reverbsc garev1,garev2,ksize,16000,sr,0
  130. adc1 dcblock2 al
  131. adc2 dcblock2 ar
  132. kpan1 randomi 0,1,4
  133. kpan2 randomi 0,1,8
  134. aout1,aout2 pan2 adc1,kpan1
  135. aout3,aout4 pan2 adc2,1-kpan2
  136. asum1 = (aout1+aout2)*klevel
  137. asum2 = (aout3+aout4)*klevel
  138. else
  139. asum1 = 0
  140. asum2 = 0
  141. endif
  142. outs asum1,asum2
  143. clear garev1,garev2
  144. endin
  145. </CsInstruments>
  146. <CsScore>
  147. ; sine wave.
  148. f 1 0 32768 10 1
  149. i1 0 36000
  150. i10 0 36000
  151. i12 0 36000
  152. </CsScore>
  153. </CsoundSynthesizer>