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.

77 lines
3.1KB

  1. Reverb effect that employs screverb and freeverb opcodes.
  2. Pitch Mod. is only used by reverbsc.
  3. <Cabbage>
  4. form caption("Multi Reverb") size(415, 90), pluginID("Rvrb")
  5. image bounds( 7, 22, 73, 45), colour( 39, 31, 20), shape("rounded"), outline(white), line(1)
  6. image bounds(0, 0, 415, 90), colour( 39, 31, 20), shape("rounded"), outline("white"), line(4)
  7. label bounds( 29, 26, 60, 12), text("Type"), fontColour(white)
  8. button bounds( 11, 40, 66, 20), text("freeverb", "screverb"), channel("type"), value(0), fontcolour("lime")
  9. rslider bounds( 80, 11, 70, 70), text("Size"), fontcolour(white), channel("fblvl"), range(0, 1.00, 0.8), colour( 79, 81, 70), tracker(240,210,170)
  10. rslider bounds(145, 11, 70, 70), text("Damping"), fontcolour(white), channel("fco"), range(0, 1.00, 0.6), colour( 79, 81, 70), tracker(240,210,170)
  11. rslider bounds(210, 11, 70, 70), text("Pitch Mod."), fontcolour(white), channel("pitchm"), range(0, 20.0, 1), colour( 79, 81, 70), tracker(240,210,170)
  12. rslider bounds(275, 11, 70, 70), text("Mix"), fontcolour(white), channel("mix"), range(0, 1.00, 1), colour( 79, 81, 70), tracker(240,210,170)
  13. rslider bounds(340, 11, 70, 70), text("Level"), fontcolour(white), channel("amp"), range(0, 1.00, 1), colour( 79, 81, 70), tracker(240,210,170)
  14. }
  15. image bounds(5, 95, 205, 20), colour(75, 85, 90, 100), plant("credit"), line(0){
  16. label bounds(0.03, 0.1, .95, .7), text("Author: Iain McCurdy |2012|"), colour("white")
  17. </Cabbage>
  18. <CsoundSynthesizer>
  19. <CsOptions>
  20. -d -n
  21. </CsOptions>
  22. <CsInstruments>
  23. sr = 44100 ;SAMPLE RATE
  24. ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
  25. nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
  26. 0dbfs = 1
  27. ;Author: Iain McCurdy (2012)
  28. instr 1
  29. ktype chnget "type" ;READ WIDGETS...
  30. kfblvl chnget "fblvl" ;
  31. kfco chnget "fco" ;
  32. kpitchm chnget "pitchm" ;
  33. kmix chnget "mix" ;
  34. kamp chnget "amp" ;
  35. ainL,ainR ins
  36. denorm ainL, ainR ;DENORMALIZE BOTH CHANNELS OF AUDIO SIGNAL
  37. if ktype==0 then
  38. kfco expcurve kfco, 4 ;CREATE A MAPPING CURVE TO GIVE A NON LINEAR RESPONSE
  39. kfco scale kfco,20000,20 ;RESCALE 0 - 1 TO 20 TO 20000
  40. kSwitch changed kpitchm ;GENERATE A MOMENTARY '1' PULSE IN OUTPUT 'kSwitch' IF ANY OF THE SCANNED INPUT VARIABLES CHANGE. (OUTPUT 'kSwitch' IS NORMALLY ZERO)
  41. if kSwitch=1 then ;IF kSwitch=1 THEN
  42. reinit UPDATE ;BEGIN A REINITIALIZATION PASS FROM LABEL 'UPDATE'
  43. endif ;END OF CONDITIONAL BRANCHING
  44. UPDATE: ;A LABEL
  45. arvbL, arvbR reverbsc ainL, ainR, kfblvl, kfco, sr, i(kpitchm)
  46. rireturn ;RETURN TO PERFORMANCE TIME PASSES
  47. else
  48. arvbL, arvbR freeverb ainL, ainR, kfblvl, 1-kfco
  49. endif
  50. amixL ntrpol ainL, arvbL, kmix ;CREATE A DRY/WET MIX BETWEEN THE DRY AND THE REVERBERATED SIGNAL
  51. amixR ntrpol ainR, arvbR, kmix ;CREATE A DRY/WET MIX BETWEEN THE DRY AND THE REVERBERATED SIGNAL
  52. outs amixL * kamp, amixR * kamp
  53. endin
  54. instr 3 ;workaround for failure of these widgets from intiialising properly when used as a plugin
  55. ;chnset 12000,"fco"
  56. chnset 1,"pitchm"
  57. endin
  58. </CsInstruments>
  59. <CsScore>
  60. i 1 0 [3600*24*7]
  61. i 3 0 0
  62. </CsScore>
  63. </CsoundSynthesizer>