Re: [LAU] makesfz.sh

From: Dan MacDonald <allcoms@email-addr-hidden>
Date: Sun Jan 01 2012 - 14:53:58 EET

Happy 2012 list!!!

On Sun, Jan 1, 2012 at 12:41 AM, Jostein Chr. Andersen <jostein@email-addr-hidden> wrote:
> On Saturday 31 December 2011 14.48.58 Dan MacDonald wrote:
> ...
>> I do expect someone here will have wrote such a script and added bells
>> already so may they be so kind as to share it so then we may add it to
>> the LinuxSampler online resources or get it bundled with the app
>> itself?
>
> You are right, I've done a half finished one in Perl where the purpose was
> to chew the NDK from it's file structure . But it did not stop there, it
> also detect the pitch and velocity on chromatic samples and makes a lot
> of other small things as well...
>
> ...and, I'm not telling the whole truth (sorry): I've done most of the
> needed internal functions, but have not put all together in a complete
> script or program yet, I guess I need an effective day or so plus a
> peaceful period before finishing it, the past 3-4 years has been terrible
> in almost any imaginable way and the script/program is around one year
> overdue now. And will I make it public? -Of course, when it's ready
> enough.

That sounds great Jostein although it sounds like total overkill for
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:

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

#!/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
for wavs in *.wav
do
  echo "<region>" >> ${PWD##*/}.sfz
  echo "sample=$wavs" >> ${PWD##*/}.sfz
  echo "key=$key" >> ${PWD##*/}.sfz
  echo "lovel=0 hivel=127" >> ${PWD##*/}.sfz
  echo "" >> ${PWD##*/}.sfz
  key=$(($key+1))
done
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Jan 1 16:15:02 2012

This archive was generated by hypermail 2.1.8 : Sun Jan 01 2012 - 16:15:02 EET