| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac -m0d --midi-key-oct=4 --midi-velocity=5 -F midiChords.mid |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o pset-midi.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; by Menno Knevel - 2021 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
0dbfs = 1 |
| 16 |
nchnls = 2 |
| 17 |
|
| 18 |
; midiChords.mid can be found in examples folder |
| 19 |
|
| 20 |
instr 1 |
| 21 |
|
| 22 |
pset 1, 0, .1 |
| 23 |
|
| 24 |
istarttime = p2 |
| 25 |
iattack = 0.005 |
| 26 |
isustain = p3 |
| 27 |
irelease = 0.06 |
| 28 |
p3 = isustain + iattack + irelease |
| 29 |
|
| 30 |
ifrequency cpsmidi |
| 31 |
iamplitude = p5*.2 ;lower volume |
| 32 |
|
| 33 |
print p1, p2, p3, p4, p5 |
| 34 |
asig STKBandedWG ifrequency, iamplitude |
| 35 |
outs asig, asig |
| 36 |
|
| 37 |
endin |
| 38 |
</CsInstruments> |
| 39 |
<CsScore> |
| 40 |
i1 0 60 ; runs for 1 minute, midifile time lasts for 35 seconds |
| 41 |
</CsScore> |
| 42 |
</CsoundSynthesizer> |