src/Examples/FLOSS Manual Examples/04 Sound Synthesis/04D02_Ratio.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 Ratio |
| 13 | kRatio = p4 |
| 14 | kCarFreq = 400 |
| 15 | kModFreq = kCarFreq/kRatio |
| 16 | aModulator poscil 500, kModFreq |
| 17 | aCarrier poscil 0.3, kCarFreq + aModulator |
| 18 | aOut linen aCarrier, .1, p3, 1 |
| 19 | out aOut, aOut |
| 20 | endin |
| 21 | |
| 22 | </CsInstruments> |
| 23 | <CsScore> |
| 24 | i 1 0 5 2 |
| 25 | i . + . 2.1 |
| 26 | </CsScore> |
| 27 | </CsoundSynthesizer> |
| 28 | ;example written by marijana janevska |