Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. the_pitch = 0
  2. pitch_randval = 0
  3.  
  4. more_insanity = [:e6,:f7,:g6,:gs7,:ds6,:b7]
  5. insanity = [:e6,:f7,:g6,:b7]
  6. sanity = [:e6,:g6,:b7]
  7.  
  8. sanity_level = sanity
  9.  
  10. sleep_interval = 8
  11.  
  12. live_loop :set_sleep_interval do
  13. sleep_randval = rrand(0,100)
  14. if (sleep_randval <20) then sleep_interval = 16
  15. elsif (sleep_randval <40) then sleep_interval = 12
  16. else sleep_interval = 8 end
  17. sleep sleep_interval
  18. end
  19.  
  20. live_loop :set_the_pitch do
  21. pitch_randval = rrand(0,100)
  22. if (pitch_randval<10) then the_pitch = +6
  23. elsif (pitch_randval<20) then the_pitch = -2
  24. elsif (pitch_randval<30) then the_pitch = 1
  25. else the_pitch = 0
  26. end
  27. sleep sleep_interval
  28. end
  29.  
  30. live_loop :guit do
  31. with_fx :echo, mix: 0.3, phase: rrand(0.15,0.35) do
  32. sample :guit_em9, rate: 0.5 , pan: rrand(-0.5,0.5), pitch: the_pitch
  33. sample :guit_em9, finish: sleep_interval/2 * 0.1, rate: -0.5, pan: rrand(-0.5,0.5), pitch: the_pitch # off for now, too much artifact + choose([0,7,12])
  34. end
  35. sleep sleep_interval
  36. end
  37.  
  38. #changes the level of "sanity"
  39. live_loop :sanityTrimming do
  40. sanity_randval = rrand(0,100);
  41. if (sanity_randval<20) then sanity_level = more_insanity
  42. elsif (sanity_randval<40) then sanity_level = insanity
  43. else sanity_level = sanity end
  44.  
  45. sleep sleep_interval * 4
  46. end
  47.  
  48. #plays the creepy sounds
  49. live_loop :strings do
  50. rate = rrand(2,6)
  51. with_fx :reverb, mix: 0.7 do
  52. use_synth :hollow
  53. play choose(sanity_level), attack: rate, release: rate, pitch: the_pitch, pan: choose([-1,1])
  54. end
  55. sleep choose([0.1,0.25,0.5]) * rate
  56. end
  57.  
  58. #plays the bass note
  59. live_loop :bass do
  60. with_fx :reverb do
  61. use_synth :fm
  62. play :e2, attack: 0, release: sleep_interval, sustain: sleep_interval/2, sustain_level: 0.6, pitch: the_pitch
  63. end
  64. sleep sleep_interval
  65. end
  66.  
  67. #chooses between one, two, or three bass drum hits
  68. boomRandVal = 0
  69. live_loop :boom do
  70. with_fx :compressor, amp: 0.6 do
  71. with_fx :reverb, room: 1 do
  72. sample :bd_boom, amp: 20, rate: 1
  73. sleep 0.25
  74. if(boomRandVal < 50) then
  75. sample :bd_boom, amp: 10, rate: 1
  76. end
  77. sleep sleep_interval - 0.50
  78. boomRandVal = rrand(0,100)
  79. if(boomRandVal < 90) then
  80. sample :bd_boom, amp: 15, rate: 1
  81. end
  82. sleep 0.25
  83. end
  84. end
  85. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement