Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = "C:/Users/Pc/Desktop/samples/phonk/1.wav"
- num_chunks = 30
- y = 0
- z = 0.98
- t = sample_duration(x, start: y, finish: z)
- ##| Method that samples the song
- define :sampleSong do
- sample x, start: y, finish: z, amp: 1
- sleep t
- end
- define :controlVolume do |a,b|
- tick
- sample x, start: y, stop: z, slice: look, num_slices: num_chunks, amp: (line a, b, steps: num_chunks).look
- sleep t / num_chunks
- end
- with_fx :reverb, room: 0.6 do
- num_chunks.times do
- controlVolume 0.1,1
- end
- 2.times do
- sampleSong
- end
- num_chunks.times do
- controlVolume 1,0.1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment