Use a numeric approximation to make powf much faster. Loss of accuracy isn't an issue in an audio output device.
16 lines
688 B
Bash
Executable File
16 lines
688 B
Bash
Executable File
#!/bin/bash
|
|
|
|
rm -rf libtinysoundfont
|
|
mkdir libtinysoundfont
|
|
cp TinySoundFont/tsf.h TinySoundFont/README* TinySoundFont/LICENSE TinySoundFont/fast*.h TinySoundFont/cast.h libtinysoundfont/.
|
|
cd TinySoundFont/examples
|
|
bash build-linux-gcc.sh
|
|
cd ../..
|
|
./TinySoundFont/examples/dump-linux-x86_64 midi-sources/1mgm.sf2 libtinysoundfont/1mgm.h
|
|
./TinySoundFont/examples/dump-linux-x86_64 midi-sources/Scratch2010.sf2 libtinysoundfont/scratch2010.h
|
|
for i in venture furelise jm_mozdi; do
|
|
xxd -i midi-sources/$i.mid | sed '$ d' | sed 's/unsigned.*/const unsigned char _mid[] PROGMEM = {/' > ../examples/PlayMIDIFromROM/"$i"_mid.h
|
|
done
|
|
rm -r ../src/libtinysoundfont
|
|
mv libtinysoundfont ../src/.
|