src/Examples/FLOSS Manual Examples/08 Other Communication/08B01_Pd_to_Csound.csd
raw| 1 | <CsoundSynthesizer> |
| 2 | <CsOptions> |
| 3 | </CsOptions> |
| 4 | <CsInstruments> |
| 5 | sr = 44100 |
| 6 | nchnls = 2 |
| 7 | 0dbfs = 1 |
| 8 | ksmps = 32 |
| 9 | |
| 10 | instr 1 |
| 11 | ; read in controller data from Pd via the API using 'invalue' |
| 12 | kctrl1 invalue "ctrl1" |
| 13 | kctrl2 invalue "ctrl2" |
| 14 | ; re-range controller values from 0 - 1 to 7 - 11 |
| 15 | koct = (kctrl2*4)+7 |
| 16 | ; create an oscillator |
| 17 | a1 vco2 kctrl1,cpsoct(koct),4,0.1 |
| 18 | outs a1,a1 |
| 19 | endin |
| 20 | </CsInstruments> |
| 21 | <CsScore> |
| 22 | i 1 0 10000 |
| 23 | </CsScore> |
| 24 | </CsoundSynthesizer> |
| 25 | ;example by Iain McCurdy |