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.

54 lines
1.6KB

  1. <Cabbage>
  2. form caption("Dust"), size(300, 80), pluginID("dust")
  3. image bounds( 0, 0,300, 80), colour("brown"), shape("rounded"), outline("white"), line(4)
  4. checkbox bounds( 10, 10, 80, 15), text("On/Off"), channel("onoff"), value(1), fontcolour("white")
  5. rslider bounds( 70, 10, 60, 60), text("Amplitude"), channel("amp"), range(0, 1.00, 0.5, 0.5, 0.001), fontcolour("white")
  6. rslider bounds(125, 10, 60, 60), text("Freq."), channel("freq"), range(0.1, 10000, 500, 0.5, 0.01), fontcolour("white")
  7. rslider bounds(180, 10, 60, 60), text("Spread"), channel("spread"), range(0, 1.00, 1), fontcolour("white")
  8. rslider bounds(235, 10, 60, 60), text("Tone Var."), channel("ToneVar"), range(0, 1.00, 0), fontcolour("white")
  9. </Cabbage>
  10. <CsoundSynthesizer>
  11. <CsOptions>
  12. -dm0 -n -+rtmidi=null -M0
  13. </CsOptions>
  14. <CsInstruments>
  15. sr = 44100
  16. ksmps = 64
  17. nchnls = 2
  18. 0dbfs = 1 ;MAXIMUM AMPLITUDE
  19. massign 0,0
  20. instr 1
  21. konoff chnget "onoff" ;read in on/off switch widget value
  22. if konoff==0 goto SKIP ;if on/off switch is off jump to skip label
  23. kamp chnget "amp"
  24. kfreq chnget "freq"
  25. kspread chnget "spread"
  26. asig dust2 kamp, kfreq ;GENERATE 'dust2' IMPULSES
  27. ; tone variation
  28. kToneVar chnget "ToneVar"
  29. if(kToneVar>0) then
  30. kcfoct random 14-(kToneVar*10),14
  31. asig tonex asig,cpsoct(kcfoct),1
  32. endif
  33. kpan random 0.5-(kspread*0.5), 0.5+(kspread*0.5)
  34. asigL,asigR pan2 asig,kpan
  35. outs asigL,asigR ;SEND AUDIO SIGNAL TO OUTPUT
  36. SKIP: ;A label. Skip to here is on/off switch is off
  37. endin
  38. </CsInstruments>
  39. <CsScore>
  40. i 1 0 [60*60*24*7] ;instrument that reads in widget data
  41. </CsScore>
  42. </CsoundSynthesizer>