osamc.de/archiv/abcnotation/scripts/abcmidi.sh

15 lines
217 B
Bash
Raw Permalink Normal View History

2023-10-17 18:12:55 +02:00
#!/bin/bash
if [[ -e "$1" ]]; then
ABC="$1"
elif [[ -e "$1.abc" ]]; then
ABC="$1.abc"
fi
INDEX="${2:-1}"
TMP="${TMP:-/tmp}"
BASENAME="${ABC##*/}"
MIDI="${BASENAME%.*}.mid"
abc2midi "$ABC" $INDEX -o "$MIDI"