Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
combine a bunch of audio snippets into a single file, uses sox and
#! /bin/bash
# rename and then recombine the audio stuff
for f in audio*.wav; do
let "counter+=1"
let "deslength+=1"
mv $f audio${counter:1}.wav
# is this is done right i might not have to calculate anything but for now i think i do??
# capture should work by capturing one 2 second clip of audio for every 10 frames of video...
echo deslength=$deslength
mv audio0001.wav mix2.wav
# mix all the snips...
for f in audio*.wav; do
echo "snip $f"
sleep 2
# add snip*.mov to file mix2.wav
~/ 1.00 mix2.wav $f yes yes
# output of is mix.wav
mv mix.wav mix2.wav
sox mix2.wav soundtrack.mp3
new_length=`sox --info -D mix2.wav | cut -d"." -f1`
echo "new length = $new_length"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment