2012-03-01 00:07:13 +01:00
|
|
|
<CsoundSynthesizer>
|
|
|
|
<CsInstruments>
|
|
|
|
sr = 48000
|
|
|
|
ksmps = 32
|
|
|
|
nchnls = 2
|
|
|
|
0dbfs = 1
|
|
|
|
|
|
|
|
; Use Fluidsynth to render the score using soundfonts
|
|
|
|
|
|
|
|
gifluid fluidEngine; start fluidsynth engine
|
|
|
|
ifont fluidLoad "/usr/share/sounds/sf2/FluidR3_GM.sf2", gifluid, 1
|
|
|
|
fluidProgramSelect gifluid, 1, ifont, 0, 38 ;Synth bass 1
|
2012-03-02 21:03:35 +01:00
|
|
|
fluidProgramSelect gifluid, 2, ifont, 0, 2 ;Electric piano
|
|
|
|
fluidProgramSelect gifluid, 3, ifont, 8, 50 ;Synth strings
|
2012-03-01 00:07:13 +01:00
|
|
|
fluidProgramSelect gifluid, 10, ifont, 128, 25 ;TR-808 drums
|
|
|
|
|
2012-03-13 22:18:50 +01:00
|
|
|
; Second engine so we can vary its volume
|
|
|
|
|
|
|
|
gifluid2 fluidEngine; start fluidsynth engine
|
|
|
|
ifont2 fluidLoad "/usr/share/sounds/sf2/FluidR3_GM.sf2", gifluid2, 1
|
|
|
|
fluidProgramSelect gifluid2, 2, ifont2, 0, 2 ;Electric piano
|
|
|
|
|
|
|
|
gkmix init 0
|
|
|
|
|
|
|
|
|
|
|
|
instr 1, 3, 10
|
2012-03-01 00:07:13 +01:00
|
|
|
ikey notnum
|
|
|
|
ivel ampmidi 127
|
|
|
|
fluidNote gifluid, p1, ikey, ivel
|
|
|
|
endin
|
|
|
|
|
2012-03-13 22:18:50 +01:00
|
|
|
instr 2
|
|
|
|
ikey notnum
|
|
|
|
ivel ampmidi 127
|
|
|
|
fluidNote gifluid2, p1, ikey, ivel
|
|
|
|
endin
|
|
|
|
|
|
|
|
instr 98
|
|
|
|
gkmix line p4, p3, p5
|
|
|
|
endin
|
|
|
|
|
2012-03-01 00:07:13 +01:00
|
|
|
instr 99
|
2012-03-03 13:49:10 +01:00
|
|
|
iamp init 3
|
2012-03-01 00:07:13 +01:00
|
|
|
al, ar fluidOut gifluid
|
2012-03-13 22:18:50 +01:00
|
|
|
al2, ar2 fluidOut gifluid2
|
|
|
|
alo = al + al2 * gkmix
|
|
|
|
aro = ar + ar2 * gkmix
|
|
|
|
outs alo * iamp, aro * iamp
|
2012-03-01 00:07:13 +01:00
|
|
|
endin
|
|
|
|
</CsInstruments>
|
|
|
|
<CsScore>
|
2012-03-13 22:18:50 +01:00
|
|
|
; Tempo
|
|
|
|
t 0 150
|
|
|
|
|
|
|
|
; Final output
|
2012-03-01 00:07:13 +01:00
|
|
|
i 99 0 3600
|
2012-03-13 22:18:50 +01:00
|
|
|
|
|
|
|
; Crescendo's for the piano chords
|
|
|
|
i 98 36 32 0 1
|
|
|
|
i 98 196 32 0 1
|
|
|
|
|
2012-03-01 00:07:13 +01:00
|
|
|
e 1
|
|
|
|
</CsScore>
|
|
|
|
</CsoundSynthesizer>
|