src/Examples/FLOSS Manual Examples/03 Csound Language/03C01_IfThen_i.csd
raw| 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 | Sfile = "ClassGuit.wav" |
| 14 | ifilchnls filenchnls Sfile |
| 15 | if ifilchnls == 1 then ;mono |
| 16 | aL soundin Sfile |
| 17 | aR = aL |
| 18 | else ;stereo |
| 19 | aL, aR soundin Sfile |
| 20 | endif |
| 21 | outs aL, aR |
| 22 | endin |
| 23 | |
| 24 | </CsInstruments> |
| 25 | <CsScore> |
| 26 | i 1 0 5 |
| 27 | </CsScore> |
| 28 | </CsoundSynthesizer> |
| 29 | ;Example by Joachim Heintz |