File: LPCReader

package info (click to toggle)
cecilia 2.0.5-2.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,440 kB
  • ctags: 833
  • sloc: tcl: 9,786; sh: 1,085; makefile: 69; csh: 13
file content (77 lines) | stat: -rw-r--r-- 2,015 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
<info>
Linear Prediction cross-synthesis.
NOTE: For best results, LPC analysis file should be stabilized using MixViews.
Jean Piche -- 1996-98
</info>
<tk_interface>
cfilein source -label "Audio File"
cfilein file_anal -label "LPC Analysis file" 
cslider duree_totale -label "Total Duration" -max 600 -init 60
cslider analdur  -label "Duration of Analysis File"  -ra i -un  sec.  -res  .1 -min 1 -max 200 -init 30
cpopup gain -label  "Envelope for Output"  -val "{Audio File} {LPC File}"
cslider  ind2 -label "Index offset"  -res .001 -min 0 -max 1 
cgraph index -label "Index into\nLPC File" -un frames -min  0 -max 1 -func "0 0 1 1" 
cgraph pit -label "Pitch of\nAudio File" -rel log -un x -min  .25 -max 4 -init 1

cslider amp -label "Gain" -un x  -res .01 -min 0.01 -max 6.0 -init 1.0
cslider thresh -label "Threshold" -res .1 -min 0 -max 1000 -init 500
ctoggle loop -label "Loop Audio File" -init 0
</tk_interface>
<mono>
	instr 1  
iloop init i(gkloop)
kind2	=	gkindex+((gkind2)/16)
kind	=	kind2*[analdur] 
display gkind2, .1
krmsr, krmso, kerr, kcps	lpread 	kind, "[file_anal]"
ktype 	= 	(gkgain)
aspec 	diskin	"[source]", 1, [offsource], iloop
asip	lpreson	aspec
asij	balance 	asip, aspec
krmso port krmso, .05
krmso = (krmso < gkthresh?0:krmso)
asix	gain 	asip, krmso
	if ktype =  1 goto togain
asig 	= asij
	goto bye
togain:
asig 	= asix
bye:
	out	asig*gkamp

													endin
</mono>
<stereo>
	instr 1  
iloop 	init 	i(gkloop)
kind2	=	gkindex+((gkind2)/16)
kind	=	kind2*[analdur]
krmsr, krmso, kerr, kcps	lpread 	kind, "[file_anal]"
ktype 	= 	gkgain
aspec, aspic 	diskin	"[source]", gkpit, [offsource], iloop
asip	lpreson	aspec
asit	lpreson	aspic
asij	balance asip, aspec
asik	balance asit, aspic
krmso port krmso, .05
krmso = (krmso < gkthresh?0:krmso)
asix	gain 	asip, krmso
asiy	gain 	asit, krmso
	if ktype 	=  1 goto togain
asig 	= 	asij
asid 	= 	asik
	goto bye
togain:
asig 	= asix
asid 	= asiy
bye:
	outs	asig*gkamp, asid*gkamp

													endin
</stereo>
<quad>

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