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.

41 lines
1.2KB

  1. <Cabbage>
  2. form caption("White Noise"), size(210, 80), pluginID("wnse")
  3. image bounds( 0, 0,210, 80), colour("white"), shape("rounded"), outline("black"), line(4)
  4. checkbox bounds( 20, 10, 80, 15), text("On/Off"), channel("onoff"), value(1), fontcolour("black")
  5. rslider bounds( 80, 10, 60, 60), text("Amplitude"), channel("amp"), range(0, 1, 0.5, 0.5, 0.001), fontcolour("black")
  6. rslider bounds(140, 10, 60, 60), text("Beta"), channel("beta"), range(-0.999, 0.999,0,1,0.001), fontcolour("black")
  7. </Cabbage>
  8. <CsoundSynthesizer>
  9. <CsOptions>
  10. -dm0 -n -+rtmidi=null -M0
  11. </CsOptions>
  12. <CsInstruments>
  13. sr = 44100
  14. ksmps = 64
  15. nchnls = 2
  16. 0dbfs = 1 ;MAXIMUM AMPLITUDE
  17. massign 0,0
  18. instr 1
  19. konoff chnget "onoff" ;read in on/off switch widget value
  20. if konoff==0 goto SKIP ;if on/off switch is off jump to skip label
  21. kamp chnget "amp" ;read in widgets...
  22. kbeta chnget "beta" ;
  23. asigL noise kamp, kbeta ;GENERATE WHITE NOISE
  24. asigR noise kamp, kbeta ;GENERATE WHITE NOISE
  25. outs asigL,asigR ;SEND AUDIO SIGNAL TO OUTPUT
  26. SKIP: ;A label. Skip to here is on/off switch is off
  27. endin
  28. </CsInstruments>
  29. <CsScore>
  30. i 1 0 [60*60*24*7] ;instrument that reads in widget data
  31. </CsScore>
  32. </CsoundSynthesizer>