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
26# ---------------------------------------------------------------------------26# ---------------------------------------------------------------------------
27 27
28SOX=../src/sox28SOX=../src/sox
29PLAY=../src/play
30 29
31rm -f 2tones.ul # Make sure we append to a file that's initially empty30rm -f 2tones.ul # Make sure we append to a file that's initially empty
32 31
@@ -45,4 +44,4 @@ done · 12 unmodified lines
45$SOX -c 1 -r 8000 alert.ul alert.au # Add a file header44$SOX -c 1 -r 8000 alert.ul alert.au # Add a file header
46rm 2tones.ul alert.ul # Tidy up intermediate files45rm 2tones.ul alert.ul # Tidy up intermediate files
47 46
48$PLAY alert.au47$SOX alert.au -d
scripts/synth.sh+117−12
@@ -1,6 +1,6 @@
1#!/bin/sh1#!/bin/sh
2 2
3# SoX script: synth.sh (c) 2008 robs@users.sourceforge.net3# SoX script: synth.sh (c) 2008-9 robs@users.sourceforge.net
4#4#
5# This program is free software; you can redistribute it and/or modify it5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License as published by the6# under the terms of the GNU General Public License as published by the
@@ -17,7 +17,6 @@ · 10 unmodified lines
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 18
19sox=../src/sox19sox=../src/sox
20play=../src/play
21 20
22G0="pl %-26 pl %-19 pl %-14 pl %-10 pl %-7 pl %-2"21G0="pl %-26 pl %-19 pl %-14 pl %-10 pl %-7 pl %-2"
23A0="pl %-24 pl %-17 pl %-12 pl %-8 pl %-5 pl %0"22A0="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
26E0="pl %-22 pl %-17 pl %-10 pl %-5 pl %-1 pl %2"25E0="pl %-22 pl %-17 pl %-10 pl %-5 pl %-1 pl %2"
27Bb0="pl %-23 pl %-16 pl %-11 pl %-7 pl %-4 pl %1"26Bb0="pl %-23 pl %-16 pl %-11 pl %-7 pl %-4 pl %1"
28 27
29o="overdrive 40 gain -8"28o="overdrive 27 gain -11"
30e="delay 0 .02 .04 .06 .08 .1 remix - $o fade 0"29e="delay 0 .02 .04 .06 .08 .1 remix - overdrive 33 gain -8 fade 0"
31s="$sox -q -n -p synth 0 0 0 80 87"30s="$sox -q -n -p synth 0 0 1 60 90"
32l="$sox -q -n -p synth 0 0 0 80 0 0"31l="$sox -q -n -p synth 0 0 0 50 20"
33 32
34$play -m -v .8 \33b="$sox -np synth 0 0 0 30 20 pl"
34c3="fade h 0 .75"
35c="fade h 0 .25"
36cs="fade h 0 .25 .05"
37m="fade h 0 .5"
38sb="fade h 0 1"
39r="$sox -np trim 0 .25"
40r2="$sox -np trim 0 .5"
41r3="$sox -np trim 0 .75"
42
43$sox -m -v .8 \
35"|$sox \44"|$sox \
36\"|$sox -n -p synth noise fade 0 .5 .48 trim 0 .15\" \45\"|$sox -n -p synth noise fade 0 .5 .48 trim 0 .15\" \
37\"|$sox -n -p synth noise fade h 0 .26 .11 gain -35 lowpass -1 12k\" \46\"|$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
63\"|$l pl %10 $o trim 0 .5 bend .2,-300,.1\" \72\"|$l pl %10 $o trim 0 .5 bend .2,-300,.1\" \
64\"|$l pl %5 $o trim 0 .5 bend .2,-200,.1\" \73\"|$l pl %5 $o trim 0 .5 bend .2,-200,.1\" \
65\"|$l pl %0 $o fade 0 .55 .1 bend .2,-200,.1\" \74\"|$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\" \
67\"|$sox -n -p trim 0 3.95\" \76\"|$sox -n -p trim 0 3.95\" \
68\"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \77\"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \
69\"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \78\"|$l pl %12 $o trim 0 .5 bend .2,-200,.1\" \
70\"|$l pl %12 $o fade 0 .8 .1 bend .2,-200,.1\" \79\"|$l pl %12 $o fade 0 .8 .1 bend .2,-200,.1\" \
71\"|$l pl %12 $o trim 0 .3 bend .1,-200,.1\" \80\"|$l pl %12 $o trim 0 .3 bend .1,-200,.1\" \
72\"|$l pl %12 $o trim 0 1.95 bend .3,-50,1\" \81\"|$l pl %12 $o fade 0 1.95 .6 bend .0,-50,1.75 gain 3\" \
73\"|$l pl %10 $o trim 0 2 bend .3,-50,1\" \82\"|$l pl %10 $o fade 0 2 .6 bend .0,-50,1.9\" \
74\"|$l pl %9 $o trim 0 2 gain -3\" \83\"|$l pl %9 $o trim 0 2 gain -1\" \
75\"|$l pl %8 $o fade h 0 1 .3\" \84\"|$l pl %8 $o fade h 0 1 .3\" \
76\"|$l pl %8 $o fade h 0 1 .1 gain 1.5\" \85\"|$l pl %8 $o fade h 0 1 .1 gain 1.5\" \
77\"|$l pl %2 pl %7 delay 0 .02 remix - $o trim 0 .25\" \86\"|$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
83\"|$l pl %2 pl %7 delay 0 .02 remix - $o trim 0 .25\" \92\"|$l pl %2 pl %7 delay 0 .02 remix - $o trim 0 .25\" \
84\"|$l pl %-5 $o trim 0 .25\" \93\"|$l pl %-5 $o trim 0 .25\" \
85\"|$l pl %2 pl %7 delay 0 .02 remix - $o fade h 0 6 6\" \94\"|$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
273 echo; echo "Plucked scale:"273 echo; echo "Plucked scale:"
274 274
275 options=275 options=
276 overdrive=276 overdrive="gain -3"
277 for f in pluck pluck_dist; do277 for f in pluck pluck_dist; do
278 next_file $f 42278 next_file $f 42
279 note=-29279 note=-29
@@ -289,14 +289,13 @@ if [ $soxver -ge 1403 ]; then · 9 unmodified lines
289 $input -t s32 - synth .4 pluck %$note $options >> tmp.s32289 $input -t s32 - synth .4 pluck %$note $options >> tmp.s32
290 note=$(($note - 1))290 note=$(($note - 1))
291 done291 done
292 $input -t s32 - synth pluck %$note $options fade h 0 2 .1 >> tmp.s32292 $input -t s32 - synth pluck %$note $options fade t 0 4 3.6 >> tmp.s32
293 293
294 $sox -r $rate -c 1 tmp.s32 $output compand .1,.2 6:-70,-60,-20 -7 -15 .1 \294 $sox -r $rate -c 1 tmp.s32 $output $overdrive remix 1 1 reverb 30
295 $overdrive pad 0 2 remix 1 1 reverb 30
296 295
297 rm -f tmp.s32296 rm -f tmp.s32
298 options="0 0 60 60"297 options="0 0 60 75 0"
299 overdrive="overdrive 30 gain -9"298 overdrive="overdrive gain -10"
300 done299 done
301fi300fi
302 301

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