| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-nm0 |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
|
| 7 |
instr 1 |
| 8 |
icount = 0 |
| 9 |
Sname = ""; starts with an empty string |
| 10 |
loop: |
| 11 |
ichar random 65, 90.999 |
| 12 |
Schar sprintf "%c", int(ichar); new character |
| 13 |
Sname strcat Sname, Schar; append to Sname |
| 14 |
loop_lt icount, 1, 10, loop; loop construction |
| 15 |
printf_i "My name is '%s'!\n", 1, Sname; print result |
| 16 |
endin |
| 17 |
|
| 18 |
</CsInstruments> |
| 19 |
<CsScore> |
| 20 |
; call instr 1 ten times |
| 21 |
r 10 |
| 22 |
i 1 0 0 |
| 23 |
</CsScore> |
| 24 |
</CsoundSynthesizer> |
| 25 |
;example by joachim heintz |