Re: [LAU] makesfz.sh

From: Dan MacDonald <allcoms@email-addr-hidden>
Date: Tue Jan 03 2012 - 05:29:41 EET

Hi Frank!

You're right that that option should be included so I've just updated
my script on the LS forums to include said option and tidied it up a
bit too - the modified script follows.

Thanks for your feedback!

Dan

--------------------------------------------------------

#!/bin/bash
# makesfz.sh reads all wav files in the current dir and creates an .sfz file
# for use by Linuxsampler named after the folder containing them.
# by Dan MacDonald 2012

key=0

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

On Mon, Jan 2, 2012 at 10:46 PM, Frank Neumann <beachnase@email-addr-hidden> wrote:
>
> Hi Dan and all,
>
> [..]
>
>> my very basic requirements for such a script. Shortly after I posted
>> to this list yesterday I realised I was (amazingly) being lazier than
>> normal and indeed it only took me 10m to write just the script I
>> required which I have now shared with the Linuxsampler community here:
>>
>> http://bb.linuxsampler.org/viewtopic.php?f=7&t=667&sid=cfbd2bff56d89d82c678b052e958974a
>>
>> Just in case that board goes bye-bye the script is short enough to
>> paste in this message too:
>
> One tiny suggestion: For a typical bank of single-shot drum/percussion
> samples, you'll want to have a line like
>
> <group> loop_mode=one_shot
>
> before the first region so that for all regions samples are played until the
> end instead of getting cut off sharply on NoteOff events. Yes, and then you
> want mute groups, velocity switches etc. pp. bla bla.. :-).
>
> Thanks for that handy little script,
> Frank
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Jan 3 08:15:01 2012

This archive was generated by hypermail 2.1.8 : Tue Jan 03 2012 - 08:15:01 EET