Debian Codegraph @

src/Examples/CsoundQt/Getting Started/Toots/Toot3.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5 ; Adapted from Richard Boulanger's toots
6 sr = 44100
7 ksmps = 128
8 nchnls = 2
9 0dbfs = 1
10
11 instr 3
12 ; p3=duration of note
13 k1 linen p4, p6, p3, p7 ; p4=amp
14 a1 oscil k1, p5, 1 ; p5=freq
15 outs a1, a1 ; p6=attack time
16 ; p7=release time
17 endin
18 </CsInstruments>
19 <CsScore>
20 ; number time size GEN p1
21 f 1 0 4096 10 1 ; use GEN10 to compute a sine wave
22
23 ;ins strt dur amp(p4) freq(p5) attack(p6) release(p7)
24 i3 0 1 0.2 440 0.5 0.7
25
26 i3 1.5 1 0.2 440 0.9 0.1
27
28 i3 3 1 0.1 880 0.02 0.99
29
30 i3 4.5 1 0.1 880 0.7 0.01
31
32 i3 6 2 0.3 220 0.5 0.5
33 e ; indicates the end of the score
34 </CsScore>
35 </CsoundSynthesizer>
36 <bsbPanel>
37 <label>Widgets</label>
38 <objectName/>
39 <x>765</x>
40 <y>345</y>
41 <width>397</width>
42 <height>458</height>
43 <visible>true</visible>
44 <uuid/>
45 <bgcolor mode="background">
46 <r>7</r>
47 <g>95</g>
48 <b>162</b>
49 </bgcolor>
50 <bsbObject version="2" type="BSBLabel">
51 <objectName/>
52 <x>14</x>
53 <y>12</y>
54 <width>100</width>
55 <height>29</height>
56 <uuid>{808f9a35-1a37-4b14-b482-c2b0cba7feaa}</uuid>
57 <visible>true</visible>
58 <midichan>0</midichan>
59 <midicc>-3</midicc>
60 <label>Toot 3</label>
61 <alignment>left</alignment>
62 <font>DejaVu Sans</font>
63 <fontsize>18</fontsize>
64 <precision>3</precision>
65 <color>
66 <r>241</r>
67 <g>241</g>
68 <b>241</b>
69 </color>
70 <bgcolor mode="nobackground">
71 <r>255</r>
72 <g>255</g>
73 <b>255</b>
74 </bgcolor>
75 <bordermode>noborder</bordermode>
76 <borderradius>1</borderradius>
77 <borderwidth>1</borderwidth>
78 </bsbObject>
79 <bsbObject version="2" type="BSBLabel">
80 <objectName/>
81 <x>14</x>
82 <y>43</y>
83 <width>364</width>
84 <height>98</height>
85 <uuid>{1e6cb9d6-914e-4a81-91b3-f06b6ca68110}</uuid>
86 <visible>true</visible>
87 <midichan>0</midichan>
88 <midicc>-3</midicc>
89 <label>Although in the second instrument we could control and vary the overall amplitude from note to note, it would be more musical if we could contour the loudness during the course of each note. To do this we'll need to employ an additional unit generator linen.</label>
90 <alignment>left</alignment>
91 <font>DejaVu Sans</font>
92 <fontsize>12</fontsize>
93 <precision>3</precision>
94 <color>
95 <r>241</r>
96 <g>241</g>
97 <b>241</b>
98 </color>
99 <bgcolor mode="nobackground">
100 <r>255</r>
101 <g>255</g>
102 <b>255</b>
103 </bgcolor>
104 <bordermode>noborder</bordermode>
105 <borderradius>1</borderradius>
106 <borderwidth>1</borderwidth>
107 </bsbObject>
108 <bsbObject version="2" type="BSBScope">
109 <objectName/>
110 <x>50</x>
111 <y>313</y>
112 <width>292</width>
113 <height>96</height>
114 <uuid>{ccd4c50c-ce92-4673-b477-873feffe0e4f}</uuid>
115 <visible>true</visible>
116 <midichan>0</midichan>
117 <midicc>-3</midicc>
118 <value>-255.00000000</value>
119 <type>scope</type>
120 <zoomx>2.00000000</zoomx>
121 <zoomy>1.00000000</zoomy>
122 <dispx>1.00000000</dispx>
123 <dispy>1.00000000</dispy>
124 <mode>0.00000000</mode>
125 </bsbObject>
126 <bsbObject version="2" type="BSBLabel">
127 <objectName/>
128 <x>13</x>
129 <y>147</y>
130 <width>364</width>
131 <height>161</height>
132 <uuid>{e5338a55-fcce-4140-9013-5e1221f221f2}</uuid>
133 <visible>true</visible>
134 <midichan>0</midichan>
135 <midicc>-3</midicc>
136 <label>linen is a signal modifier, capable of computing its output at either control or audio rates. Since we plan to use it to modify the amplitude envelope of the oscillator, we'll choose the latter version. Three of linen's arguments expect i-rate variables. The fourth expects in one instance a k-rate variable (or anything slower), and in the other an x-variable (meaning a-rate or anything slower). Our linen we will get its amp from p4. </label>
137 <alignment>left</alignment>
138 <font>DejaVu Sans</font>
139 <fontsize>12</fontsize>
140 <precision>3</precision>
141 <color>
142 <r>241</r>
143 <g>241</g>
144 <b>241</b>
145 </color>
146 <bgcolor mode="nobackground">
147 <r>255</r>
148 <g>255</g>
149 <b>255</b>
150 </bgcolor>
151 <bordermode>noborder</bordermode>
152 <borderradius>1</borderradius>
153 <borderwidth>1</borderwidth>
154 </bsbObject>
155 </bsbPanel>
156 <bsbPresets>
157 </bsbPresets>