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.

74 lines
2.5KB

  1. <Cabbage>
  2. form caption("Highpass Filter") size(435, 90), pluginID("HPFl")
  3. image pos(0, 0), size(435, 90), colour( 70,120, 90), shape("rounded"), outline("white"), line(4)
  4. label bounds(22, 22, 60, 11), text("INPUT"), fontcolour("black")
  5. combobox bounds(10, 33, 60, 20), channel("input"), value(1), text("Live","Tone","Noise")
  6. rslider bounds( 75, 11, 70, 70), channel("cf"), text("Freq."), colour( 0, 60, 30), tracker(200,255,200), fontcolour("white"), range(20, 20000, 20000, 0.333)
  7. rslider bounds(140, 11, 70, 70), channel("res"), text("Res."), colour( 0, 60, 30), tracker(200,255,200), fontcolour("white"), range(0,1.00,0)
  8. rslider bounds(205, 11, 70, 70), channel("mix"), text("Mix"), colour( 0, 60, 30), tracker(200,255,200), fontcolour("white"), range(0,1.00,1)
  9. button bounds(280, 10, 80, 20), text("24dB/oct", "12dB/oct"), channel("steepness"), value(0)
  10. label bounds(290, 30, 80, 12), text("Steepness"), fontcolour("black")
  11. checkbox bounds(280, 50, 80, 15), channel("ResType"),colour(yellow), fontcolour("black"), value(0), text("Resonant")
  12. rslider bounds(360, 11, 70, 70), text("Level"), colour( 0, 60, 30), tracker(200,255,200), fontcolour("white"), channel("level"), range(0, 1.00, 1)
  13. image bounds(5, 95, 205, 20), colour(75, 85, 90, 100), plant("credit"), line(0){
  14. label bounds(0.03, 0.1, .95, .7), text("Author: Iain McCurdy |2012|"), colour("white")
  15. </Cabbage>
  16. <CsoundSynthesizer>
  17. <CsOptions>
  18. -d -n
  19. </CsOptions>
  20. <CsInstruments>
  21. sr = 44100 ;SAMPLE RATE
  22. ksmps = 32 ;NUMBER OF AUDIO SAMPLES IN EACH CONTROL CYCLE
  23. nchnls = 2 ;NUMBER OF CHANNELS (2=STEREO)
  24. 0dbfs = 1
  25. ;Author: Iain McCurdy (2012)
  26. instr 1
  27. kcf chnget "cf" ;
  28. kres chnget "res" ;
  29. kmix chnget "mix" ;
  30. ksteepness chnget "steepness" ;
  31. kResType chnget "ResType" ;
  32. klevel chnget "level" ;
  33. kporttime linseg 0,0.001,0.02
  34. kcf portk kcf,kporttime
  35. /* INPUT */
  36. kinput chnget "input"
  37. if kinput=1 then
  38. aL,aR ins
  39. elseif kinput=2 then
  40. aL vco2 0.2, 100
  41. aR = aL
  42. else
  43. aL pinkish 0.2
  44. aR pinkish 0.2
  45. endif
  46. if ksteepness==0&&kResType!=1 then
  47. aFiltL atone aL,kcf
  48. aFiltR atone aR,kcf
  49. elseif ksteepness==1&&kResType!=1 then
  50. aFiltL buthp aL,kcf
  51. aFiltR buthp aR,kcf
  52. elseif kResType==1 then
  53. aFiltL bqrez aL,kcf,1+(kres*40),1
  54. aFiltR bqrez aR,kcf,1+(kres*40),1
  55. endif
  56. aL ntrpol aL,aFiltL,kmix
  57. aR ntrpol aR,aFiltR,kmix
  58. outs aL*klevel,aR*klevel
  59. endin
  60. </CsInstruments>
  61. <CsScore>
  62. i 1 0 [3600*24*7]
  63. </CsScore>
  64. </CsoundSynthesizer>