Created
November 16, 2012 12:29
-
-
Save youpy/4086944 to your computer and use it in GitHub Desktop.
reich
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'scissor_utils' | |
include ScissorUtils | |
filename = ARGV.shift | |
num = 400 | |
src = Scissor(filename) | |
pitch = ((src.duration * (num - 1)) / (src.duration * num)) * 100 | |
save( | |
(src * num).pan(0), | |
(src * (num - 1)).pitch(pitch).pan(100) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'pathname' | |
require 'scissor' | |
module ScissorUtils | |
extend ScissorUtils | |
def save(*tapes) | |
executable = Pathname($0) | |
dst_dir = executable.dirname + ('_' + executable.basename.to_s) | |
unless dst_dir.exist? | |
dst_dir.mkdir | |
end | |
Scissor.mix(tapes, dst_dir + (Time.now.to_i.to_s + '.wav'), :overwrite => true) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment