summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-12-06 11:19:35 +0100
committerErich Eckner <git@eckner.net>2016-12-06 11:19:35 +0100
commite47eb5985362c722ec478883b59ececf821d4b8f (patch)
treefcb5f3022bfef213515931cfd12abfc4dfd09a84
parentbff6c6b1c97c8f9eacf9cfab2f09b1eca3d9ad1a (diff)
downloadsound-cutter-e47eb5985362c722ec478883b59ececf821d4b8f.tar.xz
--reject -> points-file
-rw-r--r--man.commons.in4
-rw-r--r--sound-cutter.in32
2 files changed, 17 insertions, 19 deletions
diff --git a/man.commons.in b/man.commons.in
index 2ac48ca..60774c9 100644
--- a/man.commons.in
+++ b/man.commons.in
@@ -7,6 +7,10 @@ starts comment (until end of line)
.B "# without trailing space"
divides left and right part of line
.TP
+.B "introduction lines"
+optional lines of form
+\fBreject\fP \fIchannel\fP \fIfreq\fP \fIwidth\fP \fImaxn\fP
+.TP
.B "first line"
left part denotes global start and stop of recording,
right part denotes final remix command
diff --git a/sound-cutter.in b/sound-cutter.in
index 666e32f..de268e2 100644
--- a/sound-cutter.in
+++ b/sound-cutter.in
@@ -13,9 +13,6 @@ verwendung() {
>&2 echo ' -n, --dummy nur auszuführenden Befehl anzeigen und nichts tun'
>&2 echo ' -o, --output=outputDatei Zieldatei'
>&2 echo ' -p, --points=pointsDatei Punktedatei'
- >&2 echo ' -r, --reject=Kanal,Frequenz,Breite,Harmonische'
- >&2 echo ' blocke in Kanal Frequenz, Frequenz*2 ...'
- >&2 echo ' Frequenz*Harmonische, jeweils mit Breite (-3dB)'
>&2 echo ' -s, --sampleRate=Rate alternative Samplerate zum Abspeichern'
>&2 echo ' -t, --temp=tempDir alternatives temporäres Verzeichnis für sox'
>&2 echo \
@@ -42,7 +39,7 @@ timetosample() {
me="$(readlink -f "$0")"
eval set -- "$(
- getopt -o 1acfi:no:p:r:s:t: \
+ getopt -o 1acfi:no:p:s:t: \
--long noGain \
--long ausfuehrlich \
--long cd \
@@ -52,7 +49,6 @@ eval set -- "$(
--long dummy \
--long output: \
--long points: \
- --long reject: \
--long sampleRate: \
--long tempDir: \
--long version \
@@ -102,20 +98,6 @@ while true; do
[ -n "${points}" ] && echo 'Ich kann nur eine Point-Datei-Option verstehen.' && verwendung
points="$1"
;;
- -r|--reject)
- shift
- tmp="$1"
- kanal="${tmp%%,*}"
- tmp="${tmp#*,}"
- freq="${tmp%%,*}"
- tmp="${tmp#*,}"
- breite="${tmp%%,*}"
- maxn="${tmp#*,}"
- for ((i=1; i<=$maxn; i++))
- do
- rejects[${kanal}]="${rejects[${kanal}]} bandreject $[${i}*${freq}] ${breite}"
- done
- ;;
-s|--sampleRate)
shift
[ -n "${outRate}" ] && echo 'Ich kann nur eine Samplerate-Option verstehen.' && verwendung
@@ -207,6 +189,18 @@ do
sed 's/ *\(\#\( .*\)\?\)\?$//'
)"
[ -z "${line}" ] && continue
+ if [ ${i} -eq -1 ] && echo "${line}" | grep -q '^reject\( \+[0-9]\+\)\{4\}$'
+ then
+ kanal="$(echo "${line}" | awk '{print $2}')"
+ freq="$(echo "${line}" | awk '{print $3}')"
+ breite="$(echo "${line}" | awk '{print $4}')"
+ maxn="$(echo "${line}" | awk '{print $5}')"
+ for ((i=1; i<=$maxn; i++))
+ do
+ rejects[${kanal}]="${rejects[${kanal}]} bandreject $[${i}*${freq}] ${breite}"
+ done
+ continue
+ fi
teilEins="$(echo "${line}" | sed 's| *\(#.*\)\?$||')"
teilZwei="$(echo "${line}" | sed 's|^[^#]*\(# *\)\?||')"