sfx.orc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ; supertux - various sound effect orchestra
  2. ;
  3. ; note - The sounds can't be looped right away, an external program needs
  4. ; to be used to make them loop
  5. ;
  6. ; Bastiaan Zapf - freenode.net basti_
  7. sr = 44100
  8. kr = 44100
  9. ksmps = 1
  10. nchnls = 1
  11. ; lava sound
  12. instr 1
  13. ; Generate a random between 0 and 1.
  14. ; krange = 1
  15. kocrck init 0
  16. a1 exprand 10 ; exponential noise as a base
  17. kncrck exprand 1 ; get new crackle raw
  18. kcrck = (kocrck-kncrck)/2 ; dc correct crackle
  19. kocrck = kncrck ; remember old crackle
  20. a1 pareq a1, p4, 30 , 1 , 1 ; growl
  21. a1 pareq a1, p5, 0 , 1 , 2 ; high stop
  22. a1 pareq a1, p6, kncrck, p7, 0 ; "crackling" of various intensity
  23. a1 pareq a1, 10, 0 , 1 , 1 ; thunder stop (dc correction)
  24. aout = a1*750 ; adjust your volume here
  25. out aout
  26. endin
  27. ; rain / water - this is quite similar to lava, just "crackles" more
  28. instr 2
  29. a1 exprand 10
  30. kocrck init 0
  31. kncrck exprand 1 ; get new crackle
  32. k2crck = kncrck
  33. kncrck = kncrck -1
  34. kncrck = kncrck^p8 ; few high values, many low values - how sparse
  35. ; the highs are is controlled by the power (p8).
  36. kcrck = (kocrck-kncrck)/2 ; dc correct crackle
  37. kocrck = kncrck ; remember old crackle
  38. a1 pareq a1, p4,p5, 1, 1 ; growl
  39. a1 pareq a1, p6 ,1+kncrck*p7 ,1, 0 ; "crackling"
  40. a1 pareq a1, p6/2,1+k2crck*p7 ,1, 0 ; "crackling"
  41. a1 pareq a1, p6/3,1+k2crck*p7 ,1, 0 ; "crackling"
  42. a1 pareq a1, 10, 0, 0.7, 1 ; thunder stop (dc correction)
  43. a1 pareq a1, p9, 0, 0.7, 2 ; extreme high stop
  44. out a1*700 ; adjust your volume here
  45. endin
  46. instr 3
  47. ifqc = cpspch(p4)
  48. kamp linseg 0,p3/4,1,p3/2,1,p3/4,0
  49. kff init 1
  50. aout oscil3 p5,ifqc*kff,1 ; make a sound
  51. aout butterhp aout,500,0.5 ; ear protection ;)
  52. kff = kff*p6 ; frequency exponential rise
  53. out aout*kamp
  54. endin
  55. instr 4
  56. ifqc= cpspch(p4)
  57. ihold
  58. kamp linseg 0,p3/8,1,p3*6/8,1,p3/8,0
  59. kfenv expseg 0.001,p3/8,3,p3,1,p3*1,0.001
  60. asrc oscili p5/4,ifqc,1
  61. aout lowres asrc,ifqc*kfenv/2,2
  62. aphs phaser2 aout, ifqc*(kfenv+1), 0.89,20, 2, 2, 0.6
  63. aout = aout - aphs
  64. aecho reverb aout,0.01,0.1
  65. aout=aout+aecho*0.3
  66. aout balance aout,asrc
  67. aout butterhp aout,1000,0
  68. out aout*kamp
  69. endin
  70. instr 5 ; Wind
  71. ifqc= cpspch(p4)
  72. kfmanip oscil3 1,1/p3,1
  73. kvol linseg 0,0.1*p3,1,0.8*p3,1,0.1*p3,0
  74. aout oscil3 p5,ifqc*kfmanip,2
  75. aout butterhp aout,2000,0.7
  76. aout butterlp aout,10000,0.7
  77. aout phaser2 aout,ifqc*kfmanip,0.7,1,0.2,0.5
  78. out aout*kvol*(kfmanip/2.5)
  79. endin
  80. instr 6
  81. aout1 dripwater 1,0.1,50,1.98,300,350,430
  82. aout2 dripwater 1,0.1,50,1.98,400,440,580
  83. aout3 dripwater 1,0.1,50,1.98,500,530,600
  84. aout4 dripwater 1,0.1,200,1.96,300,350,430
  85. aout5 dripwater 1,0.1,200,1.96,400,440,580
  86. aout6 dripwater 1,0.1,200,1.96,500,530,600
  87. aout =aout1+aout2+aout3+aout4+aout5+aout6
  88. aout2 oscili 1,100+aout/10000,1
  89. aout2 =aout2*aout/1000+aout/1000
  90. aout = aout2
  91. aout butterlp aout,5000,0.4
  92. out aout
  93. endin