| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
--env:SSDIR+=../../SourceMaterials |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
|
| 7 |
sr = 44100 |
| 8 |
ksmps = 128 |
| 9 |
nchnls = 2 |
| 10 |
0dbfs = 1 |
| 11 |
|
| 12 |
/*****pvstencil simple*****/ |
| 13 |
;example for CsoundQt |
| 14 |
;written by joachim heintz |
| 15 |
;mai 2009 |
| 16 |
|
| 17 |
gifftsize = 1024 |
| 18 |
gitab ftgen 0, 0, gifftsize, 7, 1, gifftsize, 1; ftable just filled with 1 |
| 19 |
|
| 20 |
opcode TakeAll, a, Si |
| 21 |
;don't care whether your sound is mono or stereo |
| 22 |
Sfil, iloop xin |
| 23 |
ichn filenchnls Sfil |
| 24 |
if ichn == 1 then |
| 25 |
aout diskin2 Sfil, 1, 0, iloop |
| 26 |
else ;if stereo, just the first channel is taken |
| 27 |
aout, ano diskin2 Sfil, 1, 0, iloop |
| 28 |
endif |
| 29 |
xout aout |
| 30 |
endop |
| 31 |
|
| 32 |
instr 1 |
| 33 |
Sfile invalue "_Browse1" |
| 34 |
asig TakeAll Sfile, 1; 1=loop, 0=no loop |
| 35 |
fsig pvsanal asig, gifftsize, gifftsize/4, gifftsize, 0 |
| 36 |
klevel invalue "leveldb" |
| 37 |
fstencil pvstencil fsig, 0, ampdb(klevel), gitab |
| 38 |
aout pvsynth fstencil |
| 39 |
outs aout, aout |
| 40 |
endin |
| 41 |
|
| 42 |
|
| 43 |
</CsInstruments> |
| 44 |
<CsScore> |
| 45 |
i 1 0 999 |
| 46 |
e |
| 47 |
</CsScore> |
| 48 |
</CsoundSynthesizer> |
| 49 |
|
| 50 |
|
| 51 |
<bsbPanel> |
| 52 |
<label>Widgets</label> |
| 53 |
<objectName/> |
| 54 |
<x>608</x> |
| 55 |
<y>212</y> |
| 56 |
<width>442</width> |
| 57 |
<height>354</height> |
| 58 |
<visible>true</visible> |
| 59 |
<uuid/> |
| 60 |
<bgcolor mode="background"> |
| 61 |
<r>188</r> |
| 62 |
<g>177</g> |
| 63 |
<b>148</b> |
| 64 |
</bgcolor> |
| 65 |
<bsbObject type="BSBLineEdit" version="2"> |
| 66 |
<objectName>_Browse1</objectName> |
| 67 |
<x>13</x> |
| 68 |
<y>50</y> |
| 69 |
<width>295</width> |
| 70 |
<height>24</height> |
| 71 |
<uuid>{3ef56546-3859-4d35-9a8e-e49afa43c980}</uuid> |
| 72 |
<visible>true</visible> |
| 73 |
<midichan>0</midichan> |
| 74 |
<midicc>-3</midicc> |
| 75 |
<description/> |
| 76 |
<label>BratscheMono.wav</label> |
| 77 |
<alignment>left</alignment> |
| 78 |
<font>Noto Sans</font> |
| 79 |
<fontsize>14</fontsize> |
| 80 |
<precision>3</precision> |
| 81 |
<color> |
| 82 |
<r>0</r> |
| 83 |
<g>0</g> |
| 84 |
<b>0</b> |
| 85 |
</color> |
| 86 |
<bgcolor mode="nobackground"> |
| 87 |
<r>255</r> |
| 88 |
<g>255</g> |
| 89 |
<b>255</b> |
| 90 |
</bgcolor> |
| 91 |
<background>nobackground</background> |
| 92 |
</bsbObject> |
| 93 |
<bsbObject type="BSBButton" version="2"> |
| 94 |
<objectName>_Browse1</objectName> |
| 95 |
<x>313</x> |
| 96 |
<y>47</y> |
| 97 |
<width>100</width> |
| 98 |
<height>30</height> |
| 99 |
<uuid>{f65a18f9-f166-4be0-abc7-869a050cafdc}</uuid> |
| 100 |
<visible>true</visible> |
| 101 |
<midichan>0</midichan> |
| 102 |
<midicc>-3</midicc> |
| 103 |
<description/> |
| 104 |
<type>value</type> |
| 105 |
<pressedValue>1.00000000</pressedValue> |
| 106 |
<stringvalue>BratscheMono.wav</stringvalue> |
| 107 |
<text>Open File</text> |
| 108 |
<image>/</image> |
| 109 |
<eventLine/> |
| 110 |
<latch>false</latch> |
| 111 |
<momentaryMidiButton>false</momentaryMidiButton> |
| 112 |
<latched>false</latched> |
| 113 |
<fontsize>10</fontsize> |
| 114 |
</bsbObject> |
| 115 |
<bsbObject type="BSBLabel" version="2"> |
| 116 |
<objectName/> |
| 117 |
<x>18</x> |
| 118 |
<y>89</y> |
| 119 |
<width>384</width> |
| 120 |
<height>231</height> |
| 121 |
<uuid>{9679894d-ad89-4220-b5ee-cf5c5f5e746b}</uuid> |
| 122 |
<visible>true</visible> |
| 123 |
<midichan>0</midichan> |
| 124 |
<midicc>-3</midicc> |
| 125 |
<description/> |
| 126 |
<label> dB-limit for Binamps to pass</label> |
| 127 |
<alignment>left</alignment> |
| 128 |
<valignment>top</valignment> |
| 129 |
<font>DejaVu Sans</font> |
| 130 |
<fontsize>14</fontsize> |
| 131 |
<precision>3</precision> |
| 132 |
<color> |
| 133 |
<r>0</r> |
| 134 |
<g>0</g> |
| 135 |
<b>0</b> |
| 136 |
</color> |
| 137 |
<bgcolor mode="nobackground"> |
| 138 |
<r>255</r> |
| 139 |
<g>255</g> |
| 140 |
<b>255</b> |
| 141 |
</bgcolor> |
| 142 |
<bordermode>true</bordermode> |
| 143 |
<borderradius>1</borderradius> |
| 144 |
<borderwidth>1</borderwidth> |
| 145 |
</bsbObject> |
| 146 |
<bsbObject type="BSBLabel" version="2"> |
| 147 |
<objectName/> |
| 148 |
<x>147</x> |
| 149 |
<y>137</y> |
| 150 |
<width>248</width> |
| 151 |
<height>155</height> |
| 152 |
<uuid>{3b712f67-5ab1-42fc-b918-20ec414d60e0}</uuid> |
| 153 |
<visible>true</visible> |
| 154 |
<midichan>0</midichan> |
| 155 |
<midicc>-3</midicc> |
| 156 |
<description/> |
| 157 |
<label>The opcode pvstencil offers many opportunities to mask the result of a fft-analysis before resynthesizing. In this simple case, you can select amplitudes of the fft-bins which are beyond a certain threshold. |
| 158 |
For another application, see the Noise Reduction example.</label> |
| 159 |
<alignment>left</alignment> |
| 160 |
<valignment>bottom</valignment> |
| 161 |
<font>Bitstream Vera Sans</font> |
| 162 |
<fontsize>14</fontsize> |
| 163 |
<precision>3</precision> |
| 164 |
<color> |
| 165 |
<r>0</r> |
| 166 |
<g>0</g> |
| 167 |
<b>0</b> |
| 168 |
</color> |
| 169 |
<bgcolor mode="nobackground"> |
| 170 |
<r>255</r> |
| 171 |
<g>255</g> |
| 172 |
<b>255</b> |
| 173 |
</bgcolor> |
| 174 |
<bordermode>false</bordermode> |
| 175 |
<borderradius>0</borderradius> |
| 176 |
<borderwidth>0</borderwidth> |
| 177 |
</bsbObject> |
| 178 |
<bsbObject type="BSBLabel" version="2"> |
| 179 |
<objectName/> |
| 180 |
<x>14</x> |
| 181 |
<y>9</y> |
| 182 |
<width>398</width> |
| 183 |
<height>35</height> |
| 184 |
<uuid>{4df7df4d-05c2-4648-988f-11f640ee4779}</uuid> |
| 185 |
<visible>true</visible> |
| 186 |
<midichan>0</midichan> |
| 187 |
<midicc>-3</midicc> |
| 188 |
<description/> |
| 189 |
<label>pvstencil simple example</label> |
| 190 |
<alignment>center</alignment> |
| 191 |
<valignment>top</valignment> |
| 192 |
<font>DejaVu Sans</font> |
| 193 |
<fontsize>22</fontsize> |
| 194 |
<precision>3</precision> |
| 195 |
<color> |
| 196 |
<r>0</r> |
| 197 |
<g>0</g> |
| 198 |
<b>0</b> |
| 199 |
</color> |
| 200 |
<bgcolor mode="nobackground"> |
| 201 |
<r>255</r> |
| 202 |
<g>255</g> |
| 203 |
<b>255</b> |
| 204 |
</bgcolor> |
| 205 |
<bordermode>noborder</bordermode> |
| 206 |
<borderradius>1</borderradius> |
| 207 |
<borderwidth>0</borderwidth> |
| 208 |
</bsbObject> |
| 209 |
<bsbObject type="BSBVSlider" version="2"> |
| 210 |
<objectName>leveldb</objectName> |
| 211 |
<x>21</x> |
| 212 |
<y>97</y> |
| 213 |
<width>25</width> |
| 214 |
<height>210</height> |
| 215 |
<uuid>{3ca11a62-cebd-437a-9ed2-7d12be82426e}</uuid> |
| 216 |
<visible>true</visible> |
| 217 |
<midichan>0</midichan> |
| 218 |
<midicc>0</midicc> |
| 219 |
<description/> |
| 220 |
<minimum>-100.00000000</minimum> |
| 221 |
<maximum>0.00000000</maximum> |
| 222 |
<value>-26.80000000</value> |
| 223 |
<mode>lin</mode> |
| 224 |
<mouseControl act="jump">continuous</mouseControl> |
| 225 |
<resolution>-1.00000000</resolution> |
| 226 |
<randomizable group="0">false</randomizable> |
| 227 |
</bsbObject> |
| 228 |
<bsbObject type="BSBSpinBox" version="2"> |
| 229 |
<objectName>leveldb</objectName> |
| 230 |
<x>56</x> |
| 231 |
<y>118</y> |
| 232 |
<width>80</width> |
| 233 |
<height>25</height> |
| 234 |
<uuid>{2f6de60d-3f52-4185-83a2-82d0c8a55dbe}</uuid> |
| 235 |
<visible>true</visible> |
| 236 |
<midichan>0</midichan> |
| 237 |
<midicc>0</midicc> |
| 238 |
<description/> |
| 239 |
<alignment>right</alignment> |
| 240 |
<font>Liberation Sans</font> |
| 241 |
<fontsize>16</fontsize> |
| 242 |
<color> |
| 243 |
<r>0</r> |
| 244 |
<g>0</g> |
| 245 |
<b>0</b> |
| 246 |
</color> |
| 247 |
<bgcolor mode="nobackground"> |
| 248 |
<r>255</r> |
| 249 |
<g>255</g> |
| 250 |
<b>255</b> |
| 251 |
</bgcolor> |
| 252 |
<resolution>0.10000000</resolution> |
| 253 |
<minimum>-1e+12</minimum> |
| 254 |
<maximum>0</maximum> |
| 255 |
<randomizable group="0">false</randomizable> |
| 256 |
<value>-26.8</value> |
| 257 |
</bsbObject> |
| 258 |
</bsbPanel> |
| 259 |
<bsbPresets> |
| 260 |
</bsbPresets> |