I'm working with Suse 11.0, Csound and Blue.
I have all my samples in SSDIR and would like to have SADIR with all these samples analyzed by LPANAL, HETRO and all the other analyzing utilities and have them ready to try them out while looping in Blue. Instead of converting them all hand by hand i was looking for a little script that would analyze all the samples at once. So i asked around and now i have i little bash-script that will do the trick.
Maybe it can be of use for someone else, so here they are.
The bash-script for PVANAL:
for i in *.aiff ; do csound -U lpanal "${i}" "${i%%.aiff}.pv" ; done
The bash-script for HETRO:
for i in *.aiff ; do csound -U hetro "${i}" "${i%%.aiff}.het" ; done
The bash-script for LPANAL:
for i in *.wav ; do csound -U lpanal "${i}" "${i%%.wav}.lpc" ; done
The bash-script for CVANAL:
for i in *.wav ; do csound -U cvanal "${i}" "${i%%.wav}.cv" ; done
The bash-script for ATSA:
for i in *.wav ; do csound -U atsa "${i}" "${i%%.wav}.ats" ; done
You have to be in SSDIR and the run the script.
What it does is it takes a soundfile (aif, aiff or wav), calls the utility, strips of the aif, aiff or wav extension and replaces it by .het, cv etc.
There is still the problem how to handle strereo files. Some utilities just take the left channel only, while ATSA just refuses to analyze a stereo file and so the script stops. I will try to find a (Linux) solution for this and post it here later.
All the utilities use the default setting. But it might give you an idea what can be done with the different types of analyses on a certain sound.
Menno Knevel


