src/Examples/FLOSS Manual Examples/02 Quick Start/02C02_Midi_Ctl_in.csd
raw| 1 | <CsoundSynthesizer> |
| 2 | <CsOptions> |
| 3 | -+rtmidi=virtual -M1 -odac |
| 4 | </CsOptions> |
| 5 | <CsInstruments> |
| 6 | |
| 7 | sr = 44100 |
| 8 | ksmps = 32 |
| 9 | nchnls = 2 |
| 10 | 0dbfs = 1 |
| 11 | |
| 12 | instr 1 |
| 13 | ; --- receive controller number 1 on channel 1 and scale from 220 to 440 |
| 14 | kFreq ctrl7 1, 1, 220, 440 |
| 15 | ; --- use this value as varying frequency for a sine wave |
| 16 | aOut poscil 0.2, kFreq |
| 17 | outs aOut, aOut |
| 18 | endin |
| 19 | </CsInstruments> |
| 20 | <CsScore> |
| 21 | i 1 0 60 |
| 22 | </CsScore> |
| 23 | </CsoundSynthesizer> |
| 24 | ;Example by Andrés Cabrera |