#! /bin/sh
# Get Chords -- <CR> for yes, "n" for no
RECORD='play -m4/4 -t80 -r /tmp/x$$'
PLAYBACK='play -m4/4 -t100 -s $i.$j /tmp/x$$'
echo -n "Add how much lead-in to files in ../BASS? (bars) "; read BARS
for j in 1 2 3 4; do
	echo -n "Do chord group $j? "; read X
	if [ "$X" = "n" ]; then continue; fi
	for i in vamp I-IV I-V I-VI I-II end tiny; do
		echo -n "record $i.$j? "; read X
		bars -h$BARS /dev/null >/tmp/x$$
		cat ../BASS/$i.$j >>/tmp/x$$
		while [ "$X" != "n" ] ; do
			if [ -s $i.$j ]; then mv -f $i.$j /tmp; fi
			eval $RECORD >$i.$j
			echo -n "$i.$j playback? "; read X
			while [ "$X" != "n" ]; do
				eval $PLAYBACK
				echo -n "$i.$j playback again? "; read X
			done
			echo -n "dump this version & rerecord $i.$j? "; read X
		done
	done
done
