[go: up one dir, main page]

File: makeRef.tcl

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 (83 lines) | stat: -rw-r--r-- 3,307 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
proc makeRef {} {
global ceclib
	set f [open $ceclib/doc/csman/REFER.html r]
	set Man [read $f]
	close $f
	regsub -all " " $Man "" Man
	regsub -all <B>  $Man "" Man
	regsub -all </B>  $Man "" Man
	
	
	
	set ddd 1
	while {$ddd==1} {
	    set beg [string first <PRE> $Man ]
	if {$beg == "-1"} {set ddd 0}
	    set en [string first </PRE> $Man ]
	    append Man2 [string range $Man [expr $beg+5] [expr $en-1]]\n
	    set Man [string range $Man [expr $en+6] end]
	}
	
	regsub -all {\\}  $Man2 "##" Man2
	regsub -all ##\n  $Man2 "" Man2
	regsub -all \n</A>  $Man2 </A>\n Man2
	set i 0

	array set categ {
	 filters {port kport tone atone reson areson butterhp butterlp butterbp butterbr nlfilt filter2 kfilter2 zfilter2}
	 oscils  {foscili loscil poscil buzz gbuzz oscil oscili foscil doscil}
	 tables  {phasor table tablei oscil1 oscil1i osciln itablew tablew tablewkt itableng tableng itablegpw tablegpw tablemix itablemix tablecopy itablecopy tablera tablewa}
	 resynth {adsyn pvoc pvread pvbufread pvinterp pvcross tableseg tablexseg vpvoc lpread lpreson lpfreson lpslot lpinterpol cross2 }
	 granulation {fof fof2 fog grain granule sndwarp sndwarpst}
   	 lines {line expseg linseg expon linsegr expsegr}
	 dynamics {rms follow dam gain balance}
	 models1 {pluck wgpluck2 repluck}
	 models2 {wgbow  wgflute  wgbrass  wgclar}
	 models3 {shaker moog  marimba vibes mandol agogobel voice}
	 models4 {fmvoice  fmbell  fmrhode  fmwurlie  fmmetal fmb3 fmpercfl} 	
	 random {rand randh randi xlinrand xtrirand xexprand xbexprnd xcauchy xpcauchy xpoisson xgauss xweibull xbeta xuniform}
	 envelopes {linen linenr envlpx}
	 inputs {in ins inq soundin diskin}
	 outputs {out outs outs1 outs2 outq1 outq2 outq3 outq4 outq}
	 kdump/read {kread kread2 kread3 kread4 kdump kdump2 kdump3 kdump4}
	 midi {notnum veloc cpsmidi cpsmidib octmidi octmidib pchmidi pchmidib ampmidi aftouch chpress pchbend chanctrl midictrl midictrlsc ctrlinit }
	 midi2 {moscil kon imidic7 midic7 imidic14 midic14 imidic21 midic21 ictrl7 ctrl7 ictrl14 ctrl14 ictrl21 ctrl21 }
	 midi3 {ioutc koutc ioutc14 koutc14 ioutpb koutpb ioutat koutat ioutpc koutpc ioutpat koutpat mclock mrtmsg xtratim release ion ioff iondur iondur2 }
	 pchconvert {octpch(pch) cpspch(pch) octcps(cps) cpsoct(oct) pchoct(oct) cps2pch cpsxpch}
	 delays {delayr delayw delay delay1 deltap deltapi multitap vdelay comb alpass reverb reverb2 harmon }
	}
	
	
	foreach line [split $Man2 \n] {
	if {$line != ""} {
	    incr i
	    set  no $i
	    set  res  [string range $line 0 [expr [string first "<A HREF" $line ]-1] ]
	    set place [string range $line [expr [string first "=\"" $line ]+2] [expr [string first "\">" $line ]-1]]
	    set  op   [string range $line [expr [string first "\">" $line ]+2] [expr [string first "</A" $line ]-1]]
	    set blue 0
	    foreach cat [array names categ] {
		if {[lsearch $categ($cat) $op] != "-1"} {
		    set sub $cat
		    set blue 1
		    break
		    } else {
		    set sub "-"
		    }
	    }
	    set  arg  [string range $line [expr [string first "</A>" $line ]+4] end]  
	    set lin  "$i {{$op} {$res} {$arg} {$place} {$sub}}"
	    append Man3 $lin\n
	}
	
	}
	
	# ar <A HREF="Generate/oscil.html">foscil</A> xamp, kcps, kcar, kmod, kndx, ifn[, iphs]
	
	
	
	
	set ff [open $ceclib/doc/ref.db w+]
	puts $ff $Man3
	close $ff
}