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.

104 lines
3.2KB

  1. waveset.csd
  2. reinit seems a bit disruptive in Cabbage 3.03?
  3. 'freeze' is not technically a freeze but instead a very large number of repeats.
  4. Waveset opcode can be reinitialised by three different methods:
  5. Manually using the 'Reset' button,
  6. by a built-in metronome, the rate of which can be adjusted by the user
  7. or by the dynamics of the input sound (the threshold of this dynamic triggereing can be adjusted by the user)
  8. 'Metro' resetting is disabled when 'Metro Rate' = 0
  9. 'Threshold' (retrigering by input signal dynamics) is disabled when 'Threshold' = 1 (maximum setting)
  10. (resetting the opcode will reset its internal buffer and cancel out any time displacement induced by wavelet repetitions)
  11. <Cabbage>
  12. form caption("waveset") size(510, 90), pluginID("wset")
  13. image pos(0, 0), size(510, 90), colour("Green"), shape("rounded"), outline("Grey"), line(4)
  14. rslider bounds(5, 10, 70, 70), text("Repeats"), channel("repeats"), range(1, 100, 1, 1, 1), colour("yellow"), fontcolour("white")
  15. rslider bounds(70, 10, 70, 70), text("Mult."), channel("mult"), range(1, 100, 1, 0.5, 1), colour("yellow"), fontcolour("white")
  16. checkbox bounds(140, 23, 100, 30), channel("freeze"), text("Freeze"), value(0), colour("red"), fontcolour("white"), shape("ellipse")
  17. line bounds(220, 2, 3, 86), colour("Grey")
  18. button bounds(235, 15, 45,45), channel("reset"), text("Reset","Reset"), fontcolour("yellow")
  19. rslider bounds(290, 10, 70, 70), text("Threshold"), channel("thresh"), range(0, 1.00, 1), colour("orange"), fontcolour("white")
  20. rslider bounds(355, 10, 70, 70), text("Metro Rate"), channel("rate"), range(0, 5.00, 0), colour("orange"), fontcolour("white")
  21. line bounds(430, 2, 3, 86), colour("Grey")
  22. rslider bounds(435, 10, 70, 70), text("Level"), channel("level"), range(0, 1.00, 0.7), colour(255,150, 50), fontcolour("white")
  23. }
  24. </Cabbage>
  25. <CsoundSynthesizer>
  26. <CsOptions>
  27. -d -n
  28. </CsOptions>
  29. <CsInstruments>
  30. sr = 44100 ;SAMPLE RATE
  31. ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
  32. nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
  33. 0dbfs = 1
  34. ;Author: Iain McCurdy (2012)
  35. instr 1
  36. krep chnget "repeats" ;READ WIDGETS...
  37. kmult chnget "mult" ;
  38. klevel chnget "level" ;
  39. kreset chnget "reset" ;
  40. kthresh chnget "thresh" ;
  41. krate chnget "rate" ;
  42. ktrigger changed kreset ;
  43. kmetro metro krate, 0.99
  44. kfreeze chnget "freeze"
  45. ;asigL, asigR diskin2 "Songpan.wav",1,0,1 ;USE SOUND FILE FOR TESTING
  46. asigL, asigR ins
  47. krms rms (asigL+asigR)*0.5
  48. kDynTrig trigger krms,kthresh,0
  49. if (ktrigger+kmetro+kDynTrig)>0 then
  50. reinit UPDATE
  51. endif
  52. UPDATE:
  53. aL waveset asigL,(krep*kmult)+(kfreeze*1000000000),5*60*sr ;PASS THE AUDIO SIGNAL THROUGH waveset OPCODE. Input duration is defined in samples - in this example the expression given equats to a 5 minute buffer
  54. aR waveset asigR,(krep*kmult)+(kfreeze*1000000000),5*60*sr ;PASS THE AUDIO SIGNAL THROUGH waveset OPCODE. Input duration is defined in samples - in this example the expression given equats to a 5 minute buffer
  55. rireturn
  56. outs aL*klevel, aR*klevel ;WAVESET OUTPUT ARE SENT TO THE SPEAKERS
  57. endin
  58. </CsInstruments>
  59. <CsScore>
  60. i 1 0 [3600*24*7]
  61. </CsScore>
  62. </CsoundSynthesizer>