Advertisement
mehackit

Kesäkoodi-esimerkki 1 Vilma Alinan samplejen käytö

Jun 27th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.72 KB | None | 0 0
  1. # Kesäkoodi-esimerkki 1 Vilma Alinan samplejen käytöstä
  2. vilma = "/Volumes/MySSD/Users/mehackit/Desktop/VilmaAlina"
  3. use_bpm 124
  4.  
  5. live_loop :drums do
  6.   at [0,1,2,3] do sample :bd_haus end
  7.   at [1,3] do sample :sn_dolf end
  8.   at [3] do sample :elec_blup, amp: 0.75, rate: 1 end
  9.   sleep 4
  10. end
  11.  
  12. live_loop :hihats do
  13.   with_fx :hpf, cutoff: 80 do
  14.     3.times do
  15.       sample :elec_cymbal, cutoff: range(80, 120, 5).mirror.tick
  16.       8.times do
  17.         sample :drum_cymbal_closed, amp: [0.8, 0.5, 0.65].ring.tick, finish: 0.3, pan: rrand(-0.35, 0.35)
  18.         sleep 0.25
  19.       end
  20.     end
  21.     sample :elec_cymbal, cutoff: 110
  22.     sleep 0.5
  23.     sample :elec_cymbal, cutoff: 100
  24.     sleep 1
  25.     sample :elec_cymbal, cutoff: 110
  26.     sleep 0.25
  27.   end
  28.   sample vilma, "hey_3_fx.wav", amp: 1.75
  29.   sleep 0.25
  30. end
  31.  
  32. with_fx :reverb do
  33.   live_loop :melody do
  34.     with_fx :lpf, cutoff: 70, cutoff_slide: 2 do |c|
  35.       control c, cutoff: 130
  36.       use_synth :prophet
  37.       use_transpose 24
  38.       notes = [:C3, :D4, :E3, :D4, :C4, :C4, :G3, :C4, :G4]
  39.       sleeptimes = [0.25, 0.25, 0.125, 0.125, 0.25, 0.25, 0.25, 0.25, 0.25]
  40.       play_pattern_timed notes, sleeptimes, pan: rrand(-1,1), release: range(0.15, 0.55, 0.1).tick, amp: 0.9
  41.       control c, cutoff: 70
  42.     end
  43.   end
  44.  
  45.   with_fx :panslicer, mix: 0.6 do
  46.     live_loop :vilma4 do
  47.       with_fx :lpf, cutoff: 50, cutoff_slide: 4 do |c|
  48.         control c, cutoff: 130
  49.         sample vilma, "loop_3.wav", beat_stretch: 8, amp: 2
  50.         sleep 4
  51.         control c, cutoff: 50
  52.         with_fx :echo, phase: 1, mix: 0.35 do
  53.           sample vilma, "loop_5_fx.wav", beat_stretch: 4, amp: 2, rate: 1, finish: 0.5
  54.           sleep 4
  55.         end
  56.       end
  57.     end
  58.   end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement