Delete old faust scripts

This commit is contained in:
Jean Pierre Cimalando 2021-02-25 00:24:07 +01:00
parent 5c5c434297
commit acf8b9f15a
5 changed files with 0 additions and 286 deletions

View file

@ -1,54 +0,0 @@
#!/bin/sh
set -e
if ! test -d "src"; then
echo "Please run this in the project root directory."
exit 1
fi
# Note: needs faust >= 2.27.1 for UI macros
FAUSTARGS="-uim -inpl"
# support GNU sed only, use gsed on a Mac
test -z "$SED" && SED=sed
faustgen() {
mkdir -p src/sfizz/effects/gen
local outfile=src/sfizz/effects/gen/compressor.cxx
local code=`faust $FAUSTARGS -cn faustCompressor src/sfizz/effects/dsp/compressor.dsp`
# suppress some faust-specific stuff we don't care
echo "$code" \
| fgrep -v -- '->declare(' \
| fgrep -v -- '->openHorizontalBox(' \
| fgrep -v -- '->openVerticalBox(' \
| fgrep -v -- '->closeBox(' \
| fgrep -v -- '->addHorizontalSlider(' \
| fgrep -v -- '->addVerticalSlider(' \
> "$outfile"
# remove metadata
$SED -r -i 's/void[ \t]+metadata[ \t]*\(Meta[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void metadata()/' "$outfile"
# remove UI
$SED -r -i 's/void[ \t]+buildUserInterface[ \t]*\(UI[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void buildUserInterface()/' "$outfile"
# remove inheritance
$SED -r -i 's/:[ \t]*public[ \t]+dsp\b\s*//' "$outfile"
# remove virtual
$SED -r -i 's/\bvirtual\b\s*//' "$outfile"
# remove undesired UIM
$SED -r -i '/^[ \t]*#define[ \t]+FAUST_(FILE_NAME|CLASS_NAME|INPUTS|OUTPUTS|ACTIVES|PASSIVES)/d' "$outfile"
$SED -r -i '/^[ \t]*FAUST_ADD.*/d' "$outfile"
# direct access to parameter variables
$SED -r -i 's/\bprivate:/public:/' "$outfile"
# remove trailing whitespace
$SED -r -i 's/[ \t]+$//' "$outfile"
}
faustgen

View file

@ -1,54 +0,0 @@
#!/bin/sh
set -e
if ! test -d "src"; then
echo "Please run this in the project root directory."
exit 1
fi
# Note: needs faust >= 2.27.1 for UI macros
FAUSTARGS="-uim -inpl"
# support GNU sed only, use gsed on a Mac
test -z "$SED" && SED=sed
faustgen() {
mkdir -p src/sfizz/effects/gen
local outfile=src/sfizz/effects/gen/disto_stage.cxx
local code=`faust $FAUSTARGS -cn faustDisto src/sfizz/effects/dsp/disto_stage.dsp`
# suppress some faust-specific stuff we don't care
echo "$code" \
| fgrep -v -- '->declare(' \
| fgrep -v -- '->openHorizontalBox(' \
| fgrep -v -- '->openVerticalBox(' \
| fgrep -v -- '->closeBox(' \
| fgrep -v -- '->addHorizontalSlider(' \
| fgrep -v -- '->addVerticalSlider(' \
> "$outfile"
# remove metadata
$SED -r -i 's/void[ \t]+metadata[ \t]*\(Meta[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void metadata()/' "$outfile"
# remove UI
$SED -r -i 's/void[ \t]+buildUserInterface[ \t]*\(UI[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void buildUserInterface()/' "$outfile"
# remove inheritance
$SED -r -i 's/:[ \t]*public[ \t]+dsp\b\s*//' "$outfile"
# remove virtual
$SED -r -i 's/\bvirtual\b\s*//' "$outfile"
# remove undesired UIM
$SED -r -i '/^[ \t]*#define[ \t]+FAUST_(FILE_NAME|CLASS_NAME|INPUTS|OUTPUTS|ACTIVES|PASSIVES)/d' "$outfile"
$SED -r -i '/^[ \t]*FAUST_ADD.*/d' "$outfile"
# direct access to parameter variables
$SED -r -i 's/\bprivate:/public:/' "$outfile"
# remove trailing whitespace
$SED -r -i 's/[ \t]+$//' "$outfile"
}
faustgen

View file

@ -1,70 +0,0 @@
#!/bin/sh
set -e
if ! test -d "src"; then
echo "Please run this in the project root directory."
exit 1
fi
FAUSTARGS="-double -inpl"
# support GNU sed only, use gsed on a Mac
test -z "$SED" && SED=sed
faustgen() {
mkdir -p src/sfizz/gen/filters
local outfile=src/sfizz/gen/filters/sfz"$1".cxx
local code=`faust $FAUSTARGS -pn sfz"$1" -cn faust"$1" -scn sfzFilterDsp src/sfizz/dsp/filters/sfz_filters.dsp`
# find variable names of our controls
local cutoffVar=`echo "$code" | $SED -r 's%.*\("Cutoff", &[ \t]*([a-zA-Z0-9_]+).*%\1%;t;d'`
local resoVar=`echo "$code" | $SED -r 's%.*\("Resonance", &[ \t]*([a-zA-Z0-9_]+).*%\1%;t;d'`
local pkshVar=`echo "$code" | $SED -r 's%.*\("Peak/shelf gain", &[ \t]*([a-zA-Z0-9_]+).*%\1%;t;d'`
local bwVar=`echo "$code" | $SED -r 's%.*\("Bandwidth", &[ \t]*([a-zA-Z0-9_]+).*%\1%;t;d'`
# suppress some faust-specific stuff we don't care
echo "$code" \
| fgrep -v -- '->declare(' \
| fgrep -v -- '->openHorizontalBox(' \
| fgrep -v -- '->openVerticalBox(' \
| fgrep -v -- '->closeBox(' \
| fgrep -v -- '->addHorizontalSlider(' \
| fgrep -v -- '->addVerticalSlider(' \
> "$outfile"
# direct access to parameter variables
$SED -r -i 's/\bprivate:/public:/' "$outfile"
# rename the variables for us to access more easily
if test ! -z "$cutoffVar"; then
$SED -r -i 's/\b'"$cutoffVar"'\b/fCutoff/' "$outfile"
fi
if test ! -z "$resoVar"; then
$SED -r -i 's/\b'"$resoVar"'\b/fQ/' "$outfile"
fi
if test ! -z "$pkshVar"; then
$SED -r -i 's/\b'"$pkshVar"'\b/fPkShGain/' "$outfile"
fi
if test ! -z "$bwVar"; then
$SED -r -i 's/\b'"$bwVar"'\b/fBandwidth/' "$outfile"
fi
# remove trailing whitespace
$SED -r -i 's/[ \t]+$//' "$outfile"
}
for f in \
Lpf1p Lpf2p Lpf4p Lpf6p \
Hpf1p Hpf2p Hpf4p Hpf6p \
Bpf1p Bpf2p Bpf4p Bpf6p \
Apf1p \
Brf1p Brf2p \
Lsh Hsh Peq \
Pink \
Lpf2pSv Hpf2pSv Bpf2pSv Brf2pSv \
EqPeak EqLshelf EqHshelf
do
faustgen "$f"
faustgen "2ch$f"
done

View file

@ -1,54 +0,0 @@
#!/bin/sh
set -e
if ! test -d "src"; then
echo "Please run this in the project root directory."
exit 1
fi
# Note: needs faust >= 2.27.1 for UI macros
FAUSTARGS="-uim -inpl"
# support GNU sed only, use gsed on a Mac
test -z "$SED" && SED=sed
faustgen() {
mkdir -p src/sfizz/effects/gen
local outfile=src/sfizz/effects/gen/fverb.cxx
local code=`faust $FAUSTARGS -cn faustFverb src/sfizz/effects/dsp/fverb.dsp`
# suppress some faust-specific stuff we don't care
echo "$code" \
| fgrep -v -- '->declare(' \
| fgrep -v -- '->openHorizontalBox(' \
| fgrep -v -- '->openVerticalBox(' \
| fgrep -v -- '->closeBox(' \
| fgrep -v -- '->addHorizontalSlider(' \
| fgrep -v -- '->addVerticalSlider(' \
> "$outfile"
# remove metadata
$SED -r -i 's/void[ \t]+metadata[ \t]*\(Meta[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void metadata()/' "$outfile"
# remove UI
$SED -r -i 's/void[ \t]+buildUserInterface[ \t]*\(UI[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void buildUserInterface()/' "$outfile"
# remove inheritance
$SED -r -i 's/:[ \t]*public[ \t]+dsp\b\s*//' "$outfile"
# remove virtual
$SED -r -i 's/\bvirtual\b\s*//' "$outfile"
# remove undesired UIM
$SED -r -i '/^[ \t]*#define[ \t]+FAUST_(FILE_NAME|CLASS_NAME|INPUTS|OUTPUTS|ACTIVES|PASSIVES)/d' "$outfile"
$SED -r -i '/^[ \t]*FAUST_ADD.*/d' "$outfile"
# direct access to parameter variables
$SED -r -i 's/\bprivate:/public:/' "$outfile"
# remove trailing whitespace
$SED -r -i 's/[ \t]+$//' "$outfile"
}
faustgen

View file

@ -1,54 +0,0 @@
#!/bin/sh
set -e
if ! test -d "src"; then
echo "Please run this in the project root directory."
exit 1
fi
# Note: needs faust >= 2.27.1 for UI macros
FAUSTARGS="-uim -inpl"
# support GNU sed only, use gsed on a Mac
test -z "$SED" && SED=sed
faustgen() {
mkdir -p src/sfizz/effects/gen
local outfile=src/sfizz/effects/gen/gate.cxx
local code=`faust $FAUSTARGS -cn faustGate src/sfizz/effects/dsp/gate.dsp`
# suppress some faust-specific stuff we don't care
echo "$code" \
| fgrep -v -- '->declare(' \
| fgrep -v -- '->openHorizontalBox(' \
| fgrep -v -- '->openVerticalBox(' \
| fgrep -v -- '->closeBox(' \
| fgrep -v -- '->addHorizontalSlider(' \
| fgrep -v -- '->addVerticalSlider(' \
> "$outfile"
# remove metadata
$SED -r -i 's/void[ \t]+metadata[ \t]*\(Meta[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void metadata()/' "$outfile"
# remove UI
$SED -r -i 's/void[ \t]+buildUserInterface[ \t]*\(UI[ \t]*\*[ \t]*[a-zA-Z0-9_]+\)/void buildUserInterface()/' "$outfile"
# remove inheritance
$SED -r -i 's/:[ \t]*public[ \t]+dsp\b\s*//' "$outfile"
# remove virtual
$SED -r -i 's/\bvirtual\b\s*//' "$outfile"
# remove undesired UIM
$SED -r -i '/^[ \t]*#define[ \t]+FAUST_(FILE_NAME|CLASS_NAME|INPUTS|OUTPUTS|ACTIVES|PASSIVES)/d' "$outfile"
$SED -r -i '/^[ \t]*FAUST_ADD.*/d' "$outfile"
# direct access to parameter variables
$SED -r -i 's/\bprivate:/public:/' "$outfile"
# remove trailing whitespace
$SED -r -i 's/[ \t]+$//' "$outfile"
}
faustgen