#! /bin/sh
# play back bass & chords (from chords directory)
PLAYBACK='play -m4/4 -t100 /tmp/xx$$'
echo -n "Add how much lead-in to files in ../BASS? (bars) "; read BBARS
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 "$i.$j? "; read X
		bars -h$BBARS /dev/null >/tmp/x$$
		cat ../BASS/$i.$j >>/tmp/x$$
		merge $i.$j /tmp/x$$ >/tmp/xx$$
		while [ "$X" != "n" ] ; do
			eval $PLAYBACK
			echo -n "$i.$j again? "; read X
		done
		rm -f /tmp/x$$ /tmp/xx$$
	done
done
