Guest User

Untitled

a guest
Sep 11th, 2019
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Timing
  2. #y = start
  3. #z = end
  4. y = 0
  5. z = 1
  6. #Rate
  7. r = 1
  8. #Offset
  9. o = 0
  10.  
  11. define :randomseed do |a|
  12. use_random_seed a
  13. puts a
  14. end
  15.  
  16. define :picksample do
  17. x = sl + samples.choose
  18. end
  19.  
  20. define :picktime do |ymin,ymax,zmin,zmax|
  21. y = rrand(ymin,ymax)
  22. z = rrand(zmin,zmax)
  23. end
  24.  
  25. define :pickrate do |rmin,rmax|
  26. r = rrand(rmin,rmax)
  27. end
  28.  
  29. define :playnoise do |a, pan|
  30. randomseed a
  31. #picksample
  32. picktime 0.8, 0.1, 0.5, 0.6
  33. pickrate 0.1, 2
  34. sample x, start: y, finish: z, rate: r, amp: 6
  35.  
  36. sleep sample_duration(x, start: y, finish: z) / (r+0.1)
  37. end
  38.  
  39. with_fx :distortion, distort: 0.3 do
  40. with_fx :reverb, room: 1 do
  41. playnoise 100, 0.35
  42. playnoise 180, 0.25
  43. playnoise 110, 0
  44. playnoise 120, 0.25
  45. in_thread do
  46. playnoise 130, 0.5
  47. end
  48. playnoise 140, -0.5
  49. playnoise 150, 0
  50. playnoise 160, 0
  51. playnoise 170, 0
  52. playnoise 200, 0
  53. playnoise 190, 0
  54. playnoise 180, 0
  55. end
  56. end
RAW Paste Data