| 1 |
/*Getting started.. 1.7 Realtime Instrument Control |
| 2 |
|
| 3 |
This instrument provides two control possibilities to a sine oscillator from the graphical user interface (GUI). |
| 4 |
|
| 5 |
Open the widget window, press 'Run' and move the sliders! |
| 6 |
|
| 7 |
You can set the channel on which widgets receive by right-clicking on the widget and choosing 'Properties' |
| 8 |
*/ |
| 9 |
|
| 10 |
<CsoundSynthesizer> |
| 11 |
<CsOptions> |
| 12 |
</CsOptions> |
| 13 |
<CsInstruments> |
| 14 |
|
| 15 |
sr = 44100 |
| 16 |
ksmps = 128 |
| 17 |
nchnls = 2 |
| 18 |
0dbfs = 1 |
| 19 |
|
| 20 |
instr 1 |
| 21 |
kFreq invalue "freq" ; userdefined channel: freq |
| 22 |
kAmp invalue "amp" ; userdefined channel: amp |
| 23 |
kAmp port kAmp, .02 ; this smoothes the incoming slider values |
| 24 |
kFreq port kFreq, .02 ; smoothing is usually required to avoid 'zipper noise' |
| 25 |
aSine poscil3 kAmp, kFreq, 1 |
| 26 |
outs aSine, aSine |
| 27 |
endin |
| 28 |
|
| 29 |
</CsInstruments> |
| 30 |
|
| 31 |
<CsScore> |
| 32 |
f 1 0 1024 10 1 |
| 33 |
i 1 0 3600 ;calls the instrument, and plays for 3600 seconds |
| 34 |
e |
| 35 |
</CsScore> |
| 36 |
</CsoundSynthesizer> |
| 37 |
; written by Alex Hofmann (Nov. 2009) - Incontri HMT-Hannover |
| 38 |
<bsbPanel> |
| 39 |
<label>Widgets</label> |
| 40 |
<objectName/> |
| 41 |
<x>1013</x> |
| 42 |
<y>279</y> |
| 43 |
<width>563</width> |
| 44 |
<height>397</height> |
| 45 |
<visible>true</visible> |
| 46 |
<uuid/> |
| 47 |
<bgcolor mode="background"> |
| 48 |
<r>160</r> |
| 49 |
<g>158</g> |
| 50 |
<b>162</b> |
| 51 |
</bgcolor> |
| 52 |
<bsbObject version="2" type="BSBScope"> |
| 53 |
<objectName/> |
| 54 |
<x>16</x> |
| 55 |
<y>234</y> |
| 56 |
<width>266</width> |
| 57 |
<height>147</height> |
| 58 |
<uuid>{546018a6-f10c-4f00-b707-593b7713dd57}</uuid> |
| 59 |
<visible>true</visible> |
| 60 |
<midichan>0</midichan> |
| 61 |
<midicc>-3</midicc> |
| 62 |
<value>-255.00000000</value> |
| 63 |
<type>scope</type> |
| 64 |
<zoomx>2.00000000</zoomx> |
| 65 |
<zoomy>1.00000000</zoomy> |
| 66 |
<dispx>1.00000000</dispx> |
| 67 |
<dispy>1.00000000</dispy> |
| 68 |
<mode>0.00000000</mode> |
| 69 |
</bsbObject> |
| 70 |
<bsbObject version="2" type="BSBHSlider"> |
| 71 |
<objectName>freq</objectName> |
| 72 |
<x>16</x> |
| 73 |
<y>45</y> |
| 74 |
<width>257</width> |
| 75 |
<height>38</height> |
| 76 |
<uuid>{40fda0db-fe7a-4e5e-83b7-efb1aa9fdd7e}</uuid> |
| 77 |
<visible>true</visible> |
| 78 |
<midichan>0</midichan> |
| 79 |
<midicc>-3</midicc> |
| 80 |
<minimum>200.00000000</minimum> |
| 81 |
<maximum>1000.00000000</maximum> |
| 82 |
<value>433.46303500</value> |
| 83 |
<mode>lin</mode> |
| 84 |
<mouseControl act="jump">continuous</mouseControl> |
| 85 |
<resolution>-1.00000000</resolution> |
| 86 |
<randomizable group="0">false</randomizable> |
| 87 |
</bsbObject> |
| 88 |
<bsbObject version="2" type="BSBHSlider"> |
| 89 |
<objectName>amp</objectName> |
| 90 |
<x>17</x> |
| 91 |
<y>149</y> |
| 92 |
<width>267</width> |
| 93 |
<height>43</height> |
| 94 |
<uuid>{923df544-20e6-4881-a63e-e1d5cbacb793}</uuid> |
| 95 |
<visible>true</visible> |
| 96 |
<midichan>0</midichan> |
| 97 |
<midicc>-3</midicc> |
| 98 |
<minimum>0.00000000</minimum> |
| 99 |
<maximum>1.00000000</maximum> |
| 100 |
<value>0.17603000</value> |
| 101 |
<mode>lin</mode> |
| 102 |
<mouseControl act="jump">continuous</mouseControl> |
| 103 |
<resolution>-1.00000000</resolution> |
| 104 |
<randomizable group="0">false</randomizable> |
| 105 |
</bsbObject> |
| 106 |
<bsbObject version="2" type="BSBLabel"> |
| 107 |
<objectName/> |
| 108 |
<x>16</x> |
| 109 |
<y>12</y> |
| 110 |
<width>231</width> |
| 111 |
<height>31</height> |
| 112 |
<uuid>{2f6e0bb1-0572-4de2-a4a7-f0cff14be5e6}</uuid> |
| 113 |
<visible>true</visible> |
| 114 |
<midichan>0</midichan> |
| 115 |
<midicc>-3</midicc> |
| 116 |
<label>Frequency: 200-1000 Hz</label> |
| 117 |
<alignment>left</alignment> |
| 118 |
<font>Lucida Grande</font> |
| 119 |
<fontsize>18</fontsize> |
| 120 |
<precision>3</precision> |
| 121 |
<color> |
| 122 |
<r>0</r> |
| 123 |
<g>0</g> |
| 124 |
<b>0</b> |
| 125 |
</color> |
| 126 |
<bgcolor mode="nobackground"> |
| 127 |
<r>255</r> |
| 128 |
<g>255</g> |
| 129 |
<b>255</b> |
| 130 |
</bgcolor> |
| 131 |
<bordermode>noborder</bordermode> |
| 132 |
<borderradius>1</borderradius> |
| 133 |
<borderwidth>1</borderwidth> |
| 134 |
</bsbObject> |
| 135 |
<bsbObject version="2" type="BSBLabel"> |
| 136 |
<objectName/> |
| 137 |
<x>16</x> |
| 138 |
<y>118</y> |
| 139 |
<width>231</width> |
| 140 |
<height>31</height> |
| 141 |
<uuid>{248a601f-2231-437b-bd55-306f2dd67c1a}</uuid> |
| 142 |
<visible>true</visible> |
| 143 |
<midichan>0</midichan> |
| 144 |
<midicc>-3</midicc> |
| 145 |
<label>Amplitude: 0-1</label> |
| 146 |
<alignment>left</alignment> |
| 147 |
<font>Lucida Grande</font> |
| 148 |
<fontsize>18</fontsize> |
| 149 |
<precision>3</precision> |
| 150 |
<color> |
| 151 |
<r>0</r> |
| 152 |
<g>0</g> |
| 153 |
<b>0</b> |
| 154 |
</color> |
| 155 |
<bgcolor mode="nobackground"> |
| 156 |
<r>255</r> |
| 157 |
<g>255</g> |
| 158 |
<b>255</b> |
| 159 |
</bgcolor> |
| 160 |
<bordermode>noborder</bordermode> |
| 161 |
<borderradius>1</borderradius> |
| 162 |
<borderwidth>1</borderwidth> |
| 163 |
</bsbObject> |
| 164 |
</bsbPanel> |
| 165 |
<bsbPresets> |
| 166 |
</bsbPresets> |