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.

95 lines
2.2KB

  1. ; Powershape.csd
  2. ; Iain McCurdy 2012
  3. ;
  4. ; Encapsulation of the powershape opcode used for wave distortion
  5. ;
  6. ; CONTROLS
  7. ; --------
  8. ; Test Tone -- a glissandoing test tone
  9. ; Amount -- amount of distortion
  10. ; Level -- output level
  11. <Cabbage>
  12. form caption("Powershape") size(300,107), pluginID("pshp")
  13. image bounds(0, 0,300,107), colour("Brown"), shape("rounded"), outline("white"), line(4)
  14. checkbox bounds(10, 8,130, 12), channel("TestTone"), FontColour("white"), value(0), text("Sine Tone"), colour(yellow)
  15. hslider bounds( 5, 15,290, 40), colour("white"), trackercolour("white"), channel("amount"), range(1, 500, 1, 0.5,0.001)
  16. label bounds(130, 47, 60, 11), text("Amount"), fontcolour("white")
  17. hslider bounds( 5, 55,290, 40), colour("white"), trackercolour("white"), channel("level"), range(0, 50, 0.5, 0.25,0.000001)
  18. label bounds(135, 87, 60, 11), text("Level"), fontcolour("white")
  19. }
  20. </Cabbage>
  21. <CsoundSynthesizer>
  22. <CsOptions>
  23. -d -n
  24. </CsOptions>
  25. <CsInstruments>
  26. sr = 44100 ;SAMPLE RATE
  27. ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
  28. nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
  29. 0dbfs = 1
  30. gisine ftgen 0,0,4096,10,1 ;,0,1/2,0,1/4,0,1/8,0,1/16,0,1/32,0,1/64
  31. instr 1
  32. kporttime linseg 0,0.001,0.05 ; portamento time ramps up from zero
  33. gkshape chnget "amount" ; READ WIDGETS...
  34. gkshape portk gkshape,kporttime
  35. gklevel chnget "level" ;
  36. gklevel portk gklevel,kporttime
  37. gklevel portk gklevel,kporttime
  38. gkTestTone chnget "TestTone"
  39. if gkTestTone==1 then ; if test tone selected...
  40. koct rspline 4,8,0.2,0.5
  41. asigL poscil 1,cpsoct(koct),gisine ; ...generate a tone
  42. asigR = asigL ; right channel equal to left channel
  43. else ; otherwise...
  44. asigL, asigR ins ; read live inputs
  45. endif
  46. ifullscale = 0dbfs ;DEFINE FULLSCALE AMPLITUDE VALUE
  47. aL powershape asigL, gkshape, ifullscale ;CREATE POWERSHAPED SIGNAL
  48. aR powershape asigR, gkshape, ifullscale ;CREATE POWERSHAPED SIGNAL
  49. alevel interp gklevel
  50. outs aL * alevel, aR * alevel ;WAVESET OUTPUT ARE SENT TO THE SPEAKERS
  51. endin
  52. </CsInstruments>
  53. <CsScore>
  54. i 1 0 [3600*24*7]
  55. </CsScore>
  56. </CsoundSynthesizer>