diff options
-rw-r--r-- | man.commons.in | 4 | ||||
-rw-r--r-- | sound-cutter.in | 32 |
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|^[^#]*\(# *\)\?||')" |