--- /dev/null
+#!/bin/bash
+
+# Convert midi files from a Yamaha MDF2 MIDI data filer to wav
+# with both organ and piano instruments
+
+SRC=/mnt/usb
+DEST=midi
+MIDICONF_ORGAN=$(dirname "$0")/midisynth-organ.txt
+
+echo $MIDICONF
+
+for dir in $SRC/Disc*/
+do
+ dir=${dir%*/}
+ dest="$DEST/${dir##*/}"
+ mkdir -p "$dest"
+ for file in "$dir"/*X*
+ do
+ fluidsynth -f "$MIDICONF_ORGAN" -F "$dest/$(basename "$file")-organ.wav" "$file"
+ fluidsynth -F "$dest/$(basename "$file")-piano.wav" "$file"
+ echo $file
+ done
+done