src/Examples/FLOSS Manual Examples/03 Csound Language/03B07_Global_control_added.csd
raw| 1 | <CsoundSynthesizer> |
| 2 | <CsInstruments> |
| 3 | sr = 44100 |
| 4 | ksmps = 4410; very high because of printing |
| 5 | nchnls = 2 |
| 6 | 0dbfs = 1 |
| 7 | |
| 8 | gkSum init 0; sum is zero at init |
| 9 | |
| 10 | instr 1 |
| 11 | gkAdd = 1; control signal to add |
| 12 | endin |
| 13 | |
| 14 | instr 2 |
| 15 | gkSum = gkSum + gkAdd; new sum in each k-cycle |
| 16 | printk 0, gkSum; print the sum |
| 17 | endin |
| 18 | |
| 19 | </CsInstruments> |
| 20 | <CsScore> |
| 21 | i 1 0 1 |
| 22 | i 2 0 1 |
| 23 | </CsScore> |
| 24 | </CsoundSynthesizer> |
| 25 | ;example by joachim heintz |