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.

81 lines
1.9KB

  1. <Cabbage>
  2. form caption("CrazyPluck"), size(300, 220), pluginID("cra1")
  3. groupbox bounds(0, 0, 300, 100), text("Parameters"), plant("control1"){
  4. rslider bounds(.05, .3, .6, .6), text("ratio"), colour("white"), channel("ratio"), range(1, 1.2,1)
  5. rslider bounds(.28, .3, .6, .6), text("time"), colour("white"), channel("time"), range(.001,.1,.1)
  6. rslider bounds(.52, .3, .6, .6), text("random"), colour("white"), channel("random"), range(.001,.1,0)
  7. rslider bounds(.75, .3, .6, .6), text("Event number"), colour("white"), channel("number"), range(1,50,10)
  8. }
  9. keyboard bounds(0, 110, 300, 70)
  10. </Cabbage>
  11. <CsoundSynthesizer>
  12. <CsOptions>
  13. -n -d -m0d -+rtmidi=NULL -M0
  14. </CsOptions>
  15. <CsInstruments>
  16. ;Author: Giorgio Zucco (2012)
  17. sr = 44100
  18. ksmps = 32
  19. nchnls = 2
  20. 0dbfs = 1
  21. instr 1
  22. giamp ampmidi 1 ;controllo midi
  23. gifreq cpsmidi
  24. instrument = 10 ;strumento da controllare
  25. inum=1 ;per attivare la sezione loop
  26. idelay = 0
  27. inumber chnget "number" ;numero di eventi da generare
  28. idur = 2 ;durata evento
  29. iratio chnget "ratio" ;1,1,1,1.2 ;slider che controlla il pitch transpose
  30. itime chnget "time" ;1,2,.001,.1 ;slider che controlla il delay tra un evento e il successivo
  31. irndtime chnget "random" ;1,3,.001,.1 ;slider che controlla la variazione random del ritardo
  32. loop: ;inizia la sezione da reiterare
  33. gifreq = gifreq*iratio ;pitch controllato da slider 1
  34. idelay = idelay+itime+rnd(irndtime) ;delay controllato da slider 2 e 3
  35. event_i "i",instrument,idelay,idur,giamp,gifreq,abs(inumber)
  36. loop_le inum,1,abs(inumber),loop ;ripete il processo per 20 istanze (inumber)
  37. endin
  38. instr 10
  39. ;a1 pluck (p4*1-p6)/p6,p5,p5,0,1
  40. ival = (p4*1-p6)
  41. a1 pluck ival/p6,p5,p5,0,1
  42. ; Or using the new csound 6 function syntax
  43. ;a1 = pluck((p4*1-p6)/p6,p5,p5,0,1)
  44. aout clip a1,0,0dbfs
  45. kenv adsr 0.01,.5,.2,.1 ;inviluppo
  46. outs aout*kenv,aout*kenv
  47. endin
  48. </CsInstruments>
  49. <CsScore>
  50. ;i1 0 36000
  51. f0 36000
  52. </CsScore>
  53. </CsoundSynthesizer>