| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac -iadc ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o cps2pch_ftable.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Initialize the global variables. |
| 12 |
sr = 44100 |
| 13 |
kr = 4410 |
| 14 |
ksmps = 10 |
| 15 |
nchnls = 1 |
| 16 |
|
| 17 |
; Instrument #1. |
| 18 |
instr 1 |
| 19 |
ipch = 8.02 |
| 20 |
|
| 21 |
; Use Table #1, a table of frequency multipliers. |
| 22 |
icps cps2pch ipch, -1 |
| 23 |
|
| 24 |
print icps |
| 25 |
endin |
| 26 |
|
| 27 |
|
| 28 |
</CsInstruments> |
| 29 |
<CsScore> |
| 30 |
|
| 31 |
; Table #1: a table of frequency multipliers. |
| 32 |
; Creates a 10-note scale of unequal divisions. |
| 33 |
f 1 0 16 -2 1 1.1 1.2 1.3 1.4 1.6 1.7 1.8 1.9 |
| 34 |
|
| 35 |
; Play Instrument #1 for one second. |
| 36 |
i 1 0 1 |
| 37 |
e |
| 38 |
|
| 39 |
|
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |