History

synth pluck improvements

robs committed 17 years ago

Commit 8f84c481 parent 7e6aa6d11 files · +275 −76Browse files

Showing the changes to scripts (3 of 11 files). Show all

Unified · Split

3 files
  1. scripts/alert.sh +1 −2
  2. scripts/synth.sh +117 −12
  3. scripts/testtones.sh +5 −6
scripts/alert.sh+1−2
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626 # ---------------------------------------------------------------------------
2727
2828 SOX=../src/sox
29−PLAY=../src/play
3029
3130 rm -f 2tones.ul # Make sure we append to a file that's initially empty
3231
@@ -45,4 +44,4 @@ done · 12 unmodified lines
4544 $SOX -c 1 -r 8000 alert.ul alert.au # Add a file header
4645 rm 2tones.ul alert.ul # Tidy up intermediate files
4746
48−$PLAY alert.au
47+$SOX alert.au -d
scripts/synth.sh+117−12
@@ -1,6 +1,6 @@
11 #!/bin/sh
22
3−# SoX script: synth.sh (c) 2008 robs@users.sourceforge.net
3+# SoX script: synth.sh (c) 2008-9 robs@users.sourceforge.net
44 #
55 # This program is free software; you can redistribute it and/or modify it
66 # under the terms of the GNU General Public License as published by the
@@ -17,7 +17,6 @@ · 10 unmodified lines
1717 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1818
1919 sox=../src/sox
20−play=../src/play
2120
2221 G0="pl %-26 pl %-19 pl %-14 pl %-10 pl %-7 pl %-2"
2322 A0="pl %-24 pl %-17 pl %-12 pl %-8 pl %-5 pl %0"
@@ -26,12 +25,22 @@ D0="pl %-24 pl %-19 pl %-12 pl %-7 pl %-3 pl %0" · 2 unmodified lines
2625 E0="pl %-22 pl %-17 pl %-10 pl %-5 pl %-1 pl %2"
2726 Bb0="pl %-23 pl %-16 pl %-11 pl %-7 pl %-4 pl %1"
2827
29−o="overdrive 40 gain -8"
30−e="delay 0 .02 .04 .06 .08 .1 remix - $o fade 0"
31−s="$sox -q -n -p synth 0 0 0 80 87"
32−l="$sox -q -n -p synth 0 0 0 80 0 0"
28+o="overdrive 27 gain -11"
29+e="delay 0 .02 .04 .06 .08 .1 remix - overdrive 33 gain -8 fade 0"
30+s="$sox -q -n -p synth 0 0 1 60 90"
31+l="$sox -q -n -p synth 0 0 0 50 20"
3332
34−$play -m -v .8 \
33+b="$sox -np synth 0 0 0 30 20 pl"
34+c3="fade h 0 .75"
35+c="fade h 0 .25"
36+cs="fade h 0 .25 .05"
37+m="fade h 0 .5"
38+sb="fade h 0 1"
39+r="$sox -np trim 0 .25"
40+r2="$sox -np trim 0 .5"
41+r3="$sox -np trim 0 .75"
42+
43+$sox -m -v .8 \
3544 "|$sox \
3645 \"|$sox -n -p synth noise fade 0 .5 .48 trim 0 .15\" \
3746 \"|$sox -n -p synth noise fade h 0 .26 .11 gain -35 lowpass -1 12k\" \
@@ -63,15 +72,15 @@ equalizer 1500 10 8 pad 0 .21 remix 1 1 reverb 10 repeat 56" \ · 25 unmodified lines
6372 \"|$l pl %10 $o trim 0 .5 bend .2,-300,.1\" \
6473 \"|$l pl %5 $o trim 0 .5 bend .2,-200,.1\" \
6574 \"|$l pl %0 $o fade 0 .55 .1 bend .2,-200,.1\" \
66−\"|$l pl %0 $o fade 0 2 .1\" \
75+\"|$l pl %0 $o fade h 0 2 .5\" \
6776 \"|$sox -n -p trim 0 3.95\" \
6877 \"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \
6978 \"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \
7079 \"|$l pl %12 $o fade 0 .8 .1 bend .2,-200,.1\" \
7180 \"|$l pl %12 $o trim 0 .3 bend .1,-200,.1\" \
72−\"|$l pl %12 $o trim 0 1.95 bend .3,-50,1\" \
73−\"|$l pl %10 $o trim 0 2 bend .3,-50,1\" \
74−\"|$l pl %9 $o trim 0 2 gain -3\" \
81+\"|$l pl %12 $o fade 0 1.95 .6 bend .0,-50,1.75 gain 3\" \
82+\"|$l pl %10 $o fade 0 2 .6 bend .0,-50,1.9\" \
83+\"|$l pl %9 $o trim 0 2 gain -1\" \
7584 \"|$l pl %8 $o fade h 0 1 .3\" \
7685 \"|$l pl %8 $o fade h 0 1 .1 gain 1.5\" \
7786 \"|$l pl %2 pl %7 delay 0 .02 remix - $o trim 0 .25\" \
@@ -83,4 +92,100 @@ equalizer 1500 10 8 pad 0 .21 remix 1 1 reverb 10 repeat 56" \ · 5 unmodified lines
8392 \"|$l pl %2 pl %7 delay 0 .02 remix - $o trim 0 .25\" \
8493 \"|$l pl %-5 $o trim 0 .25\" \
8594 \"|$l pl %2 pl %7 delay 0 .02 remix - $o fade h 0 6 6\" \
86−-p gain -4 remix 1 1 flanger"
95+-p gain -4 remix 1 1 flanger" \
96+"|$sox \
97+\"|$sox -n -p trim 0 1.5\" \
98+\"|$b G1 $m contrast\" \
99+\"|$b A1 $c3 contrast\" \
100+\"|$b G#1 $c\" \
101+\"|$b A1 $c3\" \
102+\"|$r\" \
103+\
104+\"|$b C2 $cs\" \
105+\"|$b C2 $cs\" \
106+\"|$r\" \
107+\"|$b B1 $cs\" \
108+\"|$b C2 $c3\" \
109+\"|$r\" \
110+\
111+\"|$b D2 $cs\" \
112+\"|$b D2 $cs\" \
113+\"|$r\" \
114+\"|$b C#2 $cs\" \
115+\"|$b D2 $c\" \
116+\"|$b C#2 $m\" \
117+\"|$r\" \
118+\
119+\"|$b D2 $cs\" \
120+\"|$b D2 $cs\" \
121+\"|$r\" \
122+\"|$b C#2 $cs\" \
123+\"|$b D2 $c\" \
124+\"|$b C#2 $c\" \
125+\"|$b D2 $c\" \
126+\"|$b E2 $c\" \
127+\
128+\"|$b A1 $c3 contrast\" \
129+\"|$b B1 $c\" \
130+\"|$b A1 $c\" \
131+\"|$b G#1 $c\" \
132+\"|$b A1 $c\" \
133+\"|$b B1 $c\" \
134+\
135+\"|$b C2 $c3\" \
136+\"|$b B1 $c\" \
137+\"|$b C2 $c\" \
138+\"|$b D2 $c\" \
139+\"|$b C2 $c\" \
140+\"|$b B1 $c\" \
141+\
142+\"|$b D2 $c3\" \
143+\"|$b E2 $c\" \
144+\"|$b D2 $c\" \
145+\"|$b C#2 $c\" \
146+\"|$b D2 $c\" \
147+\"|$b E2 $c\" \
148+\
149+\"|$b D2 $c3\" \
150+\"|$b C#2 $c\" \
151+\"|$b D2 $c\" \
152+\"|$b E2 $c\" \
153+\"|$b D2 $c\" \
154+\"|$b C#2 $c\" \
155+\
156+\"|$b A1 $cs\" \
157+\"|$b A1 $cs\" \
158+\"|$r\" \
159+\"|$b G#1 $c\" \
160+\"|$b A1 $c3\" \
161+\"|$b B1 $c\" \
162+\
163+\"|$b C2 $c\" \
164+\"|$b B1 $c\" \
165+\"|$b C2 $c\" \
166+\"|$b D2 $c\" \
167+\"|$b C2 $c3\" \
168+\"|$r\" \
169+\
170+\"|$b D2 $m\" \
171+\"|$b E2 $m\" \
172+\"|$b D2 $c\" \
173+\"|$b C#2 $c\" \
174+\"|$b D2 $c\" \
175+\"|$b E2 $c\" \
176+\
177+\"|$b F2 $m\" \
178+\"|$b Bb1 $m\" \
179+\"|$b C2 $c\" \
180+\"|$b F2 $c\" \
181+\"|$b D2 $c\" \
182+\"|$b Bb1 $c\" \
183+\
184+\"|$b E1 $m\" \
185+\"|$b E2 $m\" \
186+\"|$b D2 $c\" \
187+\"|$b E2 $m\" \
188+\"|$b B1 $c\" \
189+\
190+\"|$b E1 $sb\" \
191+-p lowpass -1 1k remix 1p-12 1p-12" -d
scripts/testtones.sh+5−6
@@ -273,7 +273,7 @@ if [ $soxver -ge 1403 ]; then · 272 unmodified lines
273273 echo; echo "Plucked scale:"
274274
275275 options=
276− overdrive=
276+ overdrive="gain -3"
277277 for f in pluck pluck_dist; do
278278 next_file $f 42
279279 note=-29
@@ -289,14 +289,13 @@ if [ $soxver -ge 1403 ]; then · 9 unmodified lines
289289 $input -t s32 - synth .4 pluck %$note $options >> tmp.s32
290290 note=$(($note - 1))
291291 done
292− $input -t s32 - synth pluck %$note $options fade h 0 2 .1 >> tmp.s32
292+ $input -t s32 - synth pluck %$note $options fade t 0 4 3.6 >> tmp.s32
293293
294− $sox -r $rate -c 1 tmp.s32 $output compand .1,.2 6:-70,-60,-20 -7 -15 .1 \
295− $overdrive pad 0 2 remix 1 1 reverb 30
294+ $sox -r $rate -c 1 tmp.s32 $output $overdrive remix 1 1 reverb 30
296295
297296 rm -f tmp.s32
298− options="0 0 60 60"
299− overdrive="overdrive 30 gain -9"
297+ options="0 0 60 75 0"
298+ overdrive="overdrive gain -10"
300299 done
301300 fi
302301

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t