Skip to content

Commit 89c8d49

Browse files
authored
Merge f1486e8 into 5855e50
2 parents 5855e50 + f1486e8 commit 89c8d49

File tree

4 files changed

+320
-7
lines changed

4 files changed

+320
-7
lines changed

examples/matrices_compare.csd

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<CsoundSynthesizer>
2+
<CsOptions>
3+
-o dac
4+
</CsOptions>
5+
<CsInstruments>
6+
7+
sr = 44100
8+
ksmps = 32
9+
nchnls = 2
10+
0dbfs = 1
11+
12+
instr 1
13+
14+
initial ftgen 1, 0, 128, 10, 1 ; initial position = sine wave
15+
idispl ftgen 2, 0, 128, -7, .01, 128, .01 ; displace
16+
imass ftgen 3, 0, 128, -7, 5, 128, 5 ; masses
17+
icent ftgen 4, 0, 128, -7, 1, 128, 1 ; centering
18+
idamp ftgen 5, 0, 128, -7, -.1, 128, -.1 ; damping
19+
itraj ftgen 6, 0, 128, -7, 0, 128, 127 ; damping
20+
21+
a0 init 0
22+
irate = .01
23+
24+
;scanu2 init, irate, ifndisplace, ifnmass, imatrix, ifncentr, ifndamp, kmass, kmtrxstiff, kcentr, kdamp, ileft, iright, kpos, kdisplace, ain, idisp, id
25+
scanu2 1, irate, 2, 3, p4, 4, 5, 20, 9, 0.1, .9, .5, .1, 0, 0, a0, 0, 2
26+
;ar scans kamp, kfreq, ifntraj, id
27+
a1 scans 1, 200, 6, 2
28+
29+
if p4 == 50 then
30+
prints "\n using binary matrix system\n", p4
31+
else
32+
prints "\n and now the text matrix system\n", p4
33+
endif
34+
35+
outs a1, a1
36+
endin
37+
38+
</CsInstruments>
39+
<CsScore>
40+
41+
f50 0 16384 -23 "/home/tjingboem/string-128.matrxB" ; binary matrix
42+
f100 0 128 -44 "/home/tjingboem/string-128.matrxT" ; text matrix
43+
44+
i1 0 10 50
45+
i1 12 10 100
46+
e
47+
</CsScore>
48+
</CsoundSynthesizer>

examples/string-128.matrxT

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
<MATRIX size=128>
2+
1 2 1
3+
2 1 1
4+
2 3 1
5+
3 2 1
6+
3 4 1
7+
4 3 1
8+
4 5 1
9+
5 4 1
10+
5 6 1
11+
6 5 1
12+
6 7 1
13+
7 6 1
14+
7 8 1
15+
8 7 1
16+
8 9 1
17+
9 8 1
18+
9 10 1
19+
10 9 1
20+
10 11 1
21+
11 10 1
22+
11 12 1
23+
12 11 1
24+
12 13 1
25+
13 12 1
26+
13 14 1
27+
14 13 1
28+
14 15 1
29+
15 14 1
30+
15 16 1
31+
16 15 1
32+
16 17 1
33+
17 16 1
34+
17 18 1
35+
18 17 1
36+
18 19 1
37+
19 18 1
38+
19 20 1
39+
20 19 1
40+
20 21 1
41+
21 20 1
42+
21 22 1
43+
22 21 1
44+
22 23 1
45+
23 22 1
46+
23 24 1
47+
24 23 1
48+
24 25 1
49+
25 24 1
50+
25 26 1
51+
26 25 1
52+
26 27 1
53+
27 26 1
54+
27 28 1
55+
28 27 1
56+
28 29 1
57+
29 28 1
58+
29 30 1
59+
30 29 1
60+
30 31 1
61+
31 30 1
62+
31 32 1
63+
32 31 1
64+
32 33 1
65+
33 32 1
66+
33 34 1
67+
34 33 1
68+
34 35 1
69+
35 34 1
70+
35 36 1
71+
36 35 1
72+
36 37 1
73+
37 36 1
74+
37 38 1
75+
38 37 1
76+
38 39 1
77+
39 38 1
78+
39 40 1
79+
40 39 1
80+
40 41 1
81+
41 40 1
82+
41 42 1
83+
42 41 1
84+
42 43 1
85+
43 42 1
86+
43 44 1
87+
44 43 1
88+
44 45 1
89+
45 44 1
90+
45 46 1
91+
46 45 1
92+
46 47 1
93+
47 46 1
94+
47 48 1
95+
48 47 1
96+
48 49 1
97+
49 48 1
98+
49 50 1
99+
50 49 1
100+
50 51 1
101+
51 50 1
102+
51 52 1
103+
52 51 1
104+
52 53 1
105+
53 52 1
106+
53 54 1
107+
54 53 1
108+
54 55 1
109+
55 54 1
110+
55 56 1
111+
56 55 1
112+
56 57 1
113+
57 56 1
114+
57 58 1
115+
58 57 1
116+
58 59 1
117+
59 58 1
118+
59 60 1
119+
60 59 1
120+
60 61 1
121+
61 60 1
122+
61 62 1
123+
62 61 1
124+
62 63 1
125+
63 62 1
126+
63 64 1
127+
64 63 1
128+
64 65 1
129+
65 64 1
130+
65 66 1
131+
66 65 1
132+
66 67 1
133+
67 66 1
134+
67 68 1
135+
68 67 1
136+
68 69 1
137+
69 68 1
138+
69 70 1
139+
70 69 1
140+
70 71 1
141+
71 70 1
142+
71 72 1
143+
72 71 1
144+
72 73 1
145+
73 72 1
146+
73 74 1
147+
74 73 1
148+
74 75 1
149+
75 74 1
150+
75 76 1
151+
76 75 1
152+
76 77 1
153+
77 76 1
154+
77 78 1
155+
78 77 1
156+
78 79 1
157+
79 78 1
158+
79 80 1
159+
80 79 1
160+
80 81 1
161+
81 80 1
162+
81 82 1
163+
82 81 1
164+
82 83 1
165+
83 82 1
166+
83 84 1
167+
84 83 1
168+
84 85 1
169+
85 84 1
170+
85 86 1
171+
86 85 1
172+
86 87 1
173+
87 86 1
174+
87 88 1
175+
88 87 1
176+
88 89 1
177+
89 88 1
178+
89 90 1
179+
90 89 1
180+
90 91 1
181+
91 90 1
182+
91 92 1
183+
92 91 1
184+
92 93 1
185+
93 92 1
186+
93 94 1
187+
94 93 1
188+
94 95 1
189+
95 94 1
190+
95 96 1
191+
96 95 1
192+
96 97 1
193+
97 96 1
194+
97 98 1
195+
98 97 1
196+
98 99 1
197+
99 98 1
198+
99 100 1
199+
100 99 1
200+
100 101 1
201+
101 100 1
202+
101 102 1
203+
102 101 1
204+
102 103 1
205+
103 102 1
206+
103 104 1
207+
104 103 1
208+
104 105 1
209+
105 104 1
210+
105 106 1
211+
106 105 1
212+
106 107 1
213+
107 106 1
214+
107 108 1
215+
108 107 1
216+
108 109 1
217+
109 108 1
218+
109 110 1
219+
110 109 1
220+
110 111 1
221+
111 110 1
222+
111 112 1
223+
112 111 1
224+
112 113 1
225+
113 112 1
226+
113 114 1
227+
114 113 1
228+
114 115 1
229+
115 114 1
230+
115 116 1
231+
116 115 1
232+
116 117 1
233+
117 116 1
234+
117 118 1
235+
118 117 1
236+
118 119 1
237+
119 118 1
238+
119 120 1
239+
120 119 1
240+
120 121 1
241+
121 120 1
242+
121 122 1
243+
122 121 1
244+
122 123 1
245+
123 122 1
246+
123 124 1
247+
124 123 1
248+
124 125 1
249+
125 124 1
250+
125 126 1
251+
126 125 1
252+
126 127 1
253+
127 126 1
254+
127 128 1
255+
128 127 1
256+
</MATRIX>

opcodes/vibes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ url="ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/"><citetit
9191
</example>
9292
</para>
9393
<para>
94-
A musical examples featuring the vibes opcode: <ulink url="examples/musical/Vibes_Pena.csd"><citetitle>Vibes_Pena.csd</citetitle></ulink>, by luis Antunes Pena.
94+
A musical example featuring the vibes opcode: <ulink url="examples/musical/Vibes_Pena.csd"><citetitle>Vibes_Pena.csd</citetitle></ulink>, by luis Antunes Pena.
9595
</para>
9696
</refsect1>
9797

siggen/scantop.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,14 @@ As an example for the binary matrix, for 4 masses we have the following grid des
173173
</para>
174174

175175
<para>
176-
As an example of a text matrix (see <link linkend="GEN44"><citetitle>GEN44</citetitle></link>), for 4 masses we have the following grid describing the possible connections:
176+
As an example of a text matrix (see <link linkend="GEN44"><citetitle>GEN44</citetitle></link>), for the same 4 masses we have the following grid describing the connections:
177177
</para>
178178
<informalexample>
179179
<programlisting>
180180
&lt;MATRIX size=4&gt;
181-
0 0 4
182-
1 1 2
183-
2 2 4
184-
3 3 3
181+
1 2 4
182+
2 3 2
183+
3 4 6
185184
&lt;/MATRIX&gt;
186185
</programlisting>
187186
</informalexample>
@@ -195,7 +194,17 @@ As an example for the binary matrix, for 4 masses we have the following grid des
195194
<para>
196195
Both these matrix examples are very small and simple. In practice, most scanned synthesis instruments will use many more masses than four, so their matrices will be much larger and more complex. See the example in the <link linkend="scans"><citetitle>scans</citetitle></link> documentation.
197196
</para>
198-
197+
198+
<refsect1>
199+
<para>
200+
Here is an example that compares the binary and the text matrix. They sound the same. It uses the file <ulink url="examples/matrices_compare.csd"><citetitle>matrices_compare.csd</citetitle></ulink>.
201+
<example>
202+
<title>Example comparing the use of the binary and the text matrix.</title>
203+
<xi:include href="examples-xml/matrices_compare.csd" xmlns:xi="http://www.w3.org/2001/XInclude"/>
204+
</example>
205+
</para>
206+
</refsect1>
207+
199208
<para>
200209
Please note that the generated dynamic wavetables can be very unstable. Certain values for masses, centering, and damping can cause the system to <quote>blow up</quote> and the most interesting sounds to emerge from your loudspeakers!
201210
</para>

0 commit comments

Comments
 (0)