Générateur de fichier .wav à partir d'un fichier .k7 pour Thomson TO7/70.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
686 B

#!/bin/sh
clear
RAW=k7.raw
WAV=k7.wav
BIN_FILE=sbin.txt
if [ -f $RAW ]
then
echo "Deleting previous $RAW file."
rm $RAW
fi
if [ -f $WAV ]
then
echo "Deleting previous $WAV file."
rm $WAV
fi
A=0
BITS=`wc -w $BIN_FILE | awk -F " " '{print $1}' `
for BIT in `cat $BIN_FILE`
do
if [ $BIT -eq 1 ]
then
sgen -s 48000 -o $RAW -a -t 1m cos 6300 -16
else
sgen -s 48000 -o $RAW -a -t 1m cos 4500 -16
fi
A=$(($A+1))
SIZE=`ls -lh $RAW | awk -F " " '{print $5}'`
printf '\033[1;1H\033[J'"Recording bit $A/$BITS ($RAW : $SIZE)"
done
echo "Converting $RAW to $WAV..."
sox -t raw -L -b 16 -r 48k -e signed-integer $RAW -t wav -b 16 -r 48k -e signed-integer $WAV
echo "Done."