Skip to content

Instantly share code, notes, and snippets.

@youpy
Created December 2, 2011 08:59
Show Gist options
  • Save youpy/1422419 to your computer and use it in GitHub Desktop.
Save youpy/1422419 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
%w/ubygems scissor/.each {|g| require g }
#Scissor.logger.level = Logger::DEBUG
if ARGV.size < 2
abort 'usage: %s infile ... outfile' % $0
end
outfile = ARGV.pop
scissors = ARGV.map {|file| Scissor(file) }
max_duration = scissors.max_by {|s| s.duration }.duration
tracks = scissors.map do |s|
Scissor.silence(max_duration - s.duration) + s
end
Scissor.mix(tracks, outfile, :overwrite => true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment