File: Distortion

package info (click to toggle)
cecilia 2.0.5-2.2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 4,452 kB
  • ctags: 833
  • sloc: tcl: 9,786; sh: 1,097; makefile: 69; csh: 13
file content (96 lines) | stat: -rw-r--r-- 2,301 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<info>
nonLinear-Distortion
c, Jean Piche, 1997

Waveshaping distortion with table lookup transfer function.

transfunc	=	transfer function for amplitude mapping.
			hint: use gen08 by 2-click on transfunc button in grapher.

ampfunc		=	amplitude envelope for input signal.
envelope		=	post-waveshaping  envelope.
overdrive	=	multiplier for input signal amplitude.
</info>
<tk_interface>
cgraph transfunc 				-label "Transfer\nFunction" 				-min -.5  				-max .5  		\
					-func "0 .5 .45 .5 .49999 .5 .5 -.5 .55 -.5 1 -.5"   -gen 3 -spline 1
csepar
cgraph ampfunc 				-label "Amplitude\nFunction"  -min  0.001 							-max .5 			-init .25  
csepar
cgraph envelope 				-label "Output\nEnvelope"  				-min 0  			-max 1 		-func "0 0 .005 1 .995 1 1 0"  
csepar
cslider overdrive  				-label "Overdrive Input" 					-res .1 			-min 0 -max 10 		-init 1 
cslider outgain      				-label "Output Gain"  					-res  .1 			-min 0  -max 2	 		-init 1
cslider cut 				-label "Low-Pass Filter" -rel log -res .001 -min 100 -max 20000 -init 15000

cpopup compress 				-label "Compression" 					-value "Full  {Signal In}"  -init "Signal In"

cfilein name 				-label "Sound File:"
</tk_interface>
<mono>
	instr 1 
anorm		oscil		15000, 1000, 100
gkamp 		= 		gkampfunc * gkoverdrive
arr		soundin		"[name]", [offname]
arp 		= 		arr/32768*gkamp
arf		table		arp, 3, 1, .5, 1
ar		atone		arf, 10
art 		balance 		ar, arr
arot 		balance 		ar, anorm

if gkcompress == 				0 goto sad 
artk 		= 		art
goto our

sad:
artk 		= 		arot

our:
agtk2			butterlp	artk, gkcut

agtk		=		agtk2*gkenvelope*gkoutgain
out		agtk
		endin
</mono>
<stereo>
	instr 1 
	anorm	oscili	15000, 1000, 100
	gkamp 	= 	gkampfunc * gkoverdrive
	arr, arg		soundin	"[name]", [offname]
	arp 		= 	arr/32768*gkamp
	arn 		= 	arg/32768*gkamp

	arf		table		arp, 3, 1, .5, 1
	agf		table		arn, 3, 1, .5, 1
	ar		atone		arf, 10
	ag		atone		agf, 10

	art 		balance 		ar, arr
	aru 		balance 		ag, arg
	arot 		balance 		ar, anorm
	arou 		balance 		ag, anorm

if gkcompress == 0 goto sad 
	artk 		= 	art
	aruk		= 	aru
	goto our

sad:
	artk 		= 	arot
	aruk 		= 	arou
our:

agtk2			butterlp	artk, gkcut
aruk2			butterlp	aruk, gkcut

	agtk		=	agtk2*gkenvelope*gkoutgain
	aguk		=	aruk2*gkenvelope*gkoutgain
			outs	agtk, aguk
	endin
</stereo>
<quad>

</quad>
<score>
#min
</score>