| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o lpsholdp.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr = 44100 |
| 12 |
ksmps = 32 |
| 13 |
nchnls = 2 |
| 14 |
0dbfs = 1 |
| 15 |
|
| 16 |
instr 1 |
| 17 |
ipan = p4 |
| 18 |
ktrig = 0 ; (no retriggering) |
| 19 |
; kphase - looping pointer - is generated using a random spline |
| 20 |
kphase rspline 0,1,0.5,5 |
| 21 |
; a loop sequence of midi note numbers and durations |
| 22 |
; val dur val dur etc... |
| 23 |
knote lpsholdp kphase, 60, 1, 59, 0.1, 62, 1, 64, 1, 67, 0.1, 65, 1 |
| 24 |
asig gbuzz 0.2, cpsmidinn(knote), 30, 1, 0.5, 1 |
| 25 |
outs asig*ipan, asig*(1-ipan) |
| 26 |
endin |
| 27 |
|
| 28 |
</CsInstruments> |
| 29 |
<CsScore> |
| 30 |
; cosine wave. |
| 31 |
f 1 0 16384 11 1 |
| 32 |
|
| 33 |
; 2 layers of the loop are played each with a different pan position (p4) |
| 34 |
i 1 0 60 0.25 |
| 35 |
i 1 0 60 0.75 |
| 36 |
|
| 37 |
e |
| 38 |
</CsScore> |
| 39 |
</CsoundSynthesizer> |