#!/bin/sh
mkdir -p sounds
for x in `seq -90 -20`; do
    NOTE=`echo "$x+78"|bc`
    # sine wave on twelve-tone scale, one twentieth of a second duration
    sox -t nul /dev/null -r 44100 -w sounds/tmp${x}.wav \
	synth 00:00:00.05 sine create %${NOTE}
    # fade in and fade out to remove clicking
    sox sounds/tmp${x}.wav -w sounds/sine${x}.wav \
        fade q 00:00:00.005 00:00:00.050 00:00:00.035 
    rm sounds/tmp${x}.wav
done
