I thought it time I gave the suggestions board a break and post my next plea for an addition here disguised as an announcement instead?

Well, this is legitimately an announcement too as I'm plugging my own wares here but I do fully expect that many other AV Linux users could find themselves also making frequent use of this little script I wrote to convert a folder full of wav files into either several or one big .sfz file for use under Linuxsampler.
As far as I'm concerned this was the key missing script/feature from Linuxsampler for the last however many years its been around. I tried asking the LS devs if they'd be interested in including it or an improved version of it but they haven't responded so I've took that as a no.
As I wrote on its original home of:
http://bb.linuxsampler.org/viewtopic.php?f=7&t=667&sid=a9b9c8e0c9d7d16fe7f3dbcca5a6d00fI needed a way to quickly and easily create simple drum kit .sfz files for use with Linuxsampler. I had found a perl script called makesfz.pl that I failed to get to work and I couldn't find a suitable script or app within these forums or linked to on linuxsampler.org so I wrote the following little bash script that scans for wav files in the current dir then writes out a corresponding .sfz file for every wav found, mapping that sample to MIDI note 0.
Otherwise you can run it like 'makesfz.sh 1' in which case it simply creates one big .sfz named after the containing folder which assigns each sample to a MIDI note ('key'), ascending through the filenames alphabetically and pairing these with a progressively higher MIDI note (Linuxsampler 'key') so it is recommended that you name your files like:
000-kick.wav
001-snare.wav
etc. etc. so you know which sample will be assigned to which key although this isn't a requirement.
If others do find this useful it'd be nice to see it included in AV Linux (in the $PATH as an executable called just makesfz please GMaq!)
#!/bin/bash
#
# makesfz.sh
#
# Running 'makesfz.sh' with no or any other parameter than 1 will create a .sfz
# file for every wav file in the present dir. mapping the wav to MIDI note 0.
#
# Alternatively, 'makesfz.sh 1' reads all wav files in the current dir and creates
# a single .sfz named after the present folder mapping each sample to a MIDI note.
#
#
# by Dan MacDonald 2012
key=0
if [ "$1" = "1" ]; then
rm -f "${PWD##*/}".sfz
echo -e "# This file was auto-generated by makesfz.sh\n\n<group>\nloop_mode=one_shot\n" > "${PWD##*/}".sfz
for wavs in *.wav
do
echo -e "<region>\nsample=$wavs\nkey=$key\nlovel=0 hivel=127\n" >> "${PWD##*/}".sfz
key=$(($key+1))
done
else
for wavs in *.wav
do
echo -e "# This file was auto-generated by makesfz.sh\n\n<group>\nloop_mode=one_shot\n" > $wavs.sfz
echo -e "<region>\nsample=$wavs\nkey=0\nlovel=0 hivel=127\n" >> $wavs.sfz
done
fi