Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.99 KB | None
  1. #Sample
  2. sl = "C:/Users/Pc/Desktop/Prjoects/sample/First Album/"
  3. x = sl + "fl studio.wav"
  4. ending = sl + "end.wav"
  5. #Timing
  6. #y = start
  7. #z = end
  8. y = 0
  9. z = 1
  10. #Rate
  11. r = 1
  12. #Offset
  13. o = 0
  14.  
  15. define :randomseed do |a|
  16.   use_random_seed a
  17.   puts a
  18. end
  19.  
  20. define :picksample do
  21.   x = sl + samples.choose
  22. end
  23.  
  24. define :picktime do |ymin,ymax,zmin,zmax|
  25.   y = rrand(ymin,ymax)
  26.   z = rrand(zmin,zmax)
  27. end
  28.  
  29. define :pickrate do |rmin,rmax|
  30.   r = rrand(rmin,rmax)
  31. end
  32.  
  33. define :playnoise do |a, pan|
  34.   randomseed a
  35.   #picksample
  36.   picktime 0, 1, 0, 1
  37.   pickrate 0.2, 1
  38.   sample x, start: y, finish: z, rate: r
  39.  
  40.   sleep sample_duration(x, start: y, finish: z) / r
  41. end
  42.  
  43. define :playnoiseoverride do |pan, a, b, c|
  44.   sample x, start: a, finish: b, rate: c
  45.   sleep sample_duration(x, start: a, finish: b) / c
  46. end
  47.  
  48. with_fx :bitcrusher, bits: 12, sample_rate: 14000 do
  49.   with_fx :distortion, distort: 0.1 do
  50.     with_fx :reverb, room: 0.7, damp: 1 do
  51.       playnoise 5, 0
  52.     end
  53.   end
  54. end
Advertisement
RAW Paste Data Copied
Advertisement