| I changed it a bit.
The strange thing is, that the midiout to an external synth works, but
somehow the line
fluidNote giengine1, 1, i(kdata1), i(kdata2)
in instr 99 does nothing???
Richard
; Select audio/midi flags here according to platform
;-+rtmidi=virtual ;;;realtime audio out and realtime midi in
-odac -iadc --midi-device=0 -M0 -Q0 -m0d -B256 -b64
;-F ./midis/%s
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
giStat ftgen 0, 0, -60*kr, 2, 0; size for 60 seconds of recording
status
giChan ftgen 0, 0, -60*kr, 2, 0; size for 60 seconds of recording
channel
giDat1 ftgen 0, 0, -60*kr, 2, 0; size for 60 seconds of recording
data1
giDat2 ftgen 0, 0, -60*kr, 2, 0; size for 60 seconds of recording
data2
massign 0, 1
;massign 2, 2
;massign 10,10
; piano
giengine1 fluidEngine
isfnum1 fluidLoad "./samples/acoustic_piano_imis_1.sf2", giengine1, 1
fluidProgramSelect giengine1, 1, isfnum1, 0, 0
; bass
giengine2 fluidEngine
isfnum2 fluidLoad "./samples/003.3mg GS Roland Sound Set 16 bit Bank.SF2",
giengine2, 1
fluidProgramSelect giengine2, 2, isfnum2, 0, 33 ; Fingered bass
; drums
giengine10 fluidEngine
isfnum1 fluidLoad "./samples/003.3mg GS Roland Sound Set 16 bit Bank.SF2",
giengine10, 1
fluidProgramSelect giengine10, 10, isfnum1, 128, 32
instr 1
mididefault 60, p3
midinoteonkey p5, p4
ikey init p5
ivel init p4
fluidNote giengine1, 1, ikey, ivel
endin
instr 2 ; bass
mididefault 60, p3
midinoteonkey p5, p4
ikey init p5
ivel init p4
fluidNote giengine2, 2, ikey, ivel
endin
instr 10 ; drums
mididefault 60, p3
midinoteonkey p5, p4
ikey init p5
ivel init p4
fluidNote giengine10, 10, ikey, ivel
endin
instr 99
prints "PLAYING!%n"
kindx linseg 0, 60, ftlen(giStat)
;read the k-signal
kstatus table kindx, giStat
kchan table kindx, giChan
kdata1 table kindx, giDat1
kdata2 table kindx, giDat2
if kstatus != 0 then
printks "status = %d chan = %d data1=%d data2=%d \n", 0.1, kstatus, kchan,
kdata1, kdata2
midiout kstatus, kchan, kdata1, kdata2
fluidNote giengine1, 1, i(kdata1), i(kdata2)
endif
endin
instr 100 ; only play back
imvol init 7
asigl, asigr fluidOut giengine1
outs asigl*imvol, asigr*imvol
endin
instr 101
imvol init 7
asigl, asigr fluidOut giengine1
outs asigl*imvol, asigr*imvol
kstatus, kchan, kdata1, kdata2 midiin
if kstatus != 0 then
printks "status = %d chan = %d data1=%d data2=%d \n", 0.1, kstatus, kchan,
kdata1, kdata2
endif
prints "RECORDING!%n"
kindx linseg 0, 60, ftlen(giStat)
;write the k-signal
tablew kstatus, kindx, giStat
tablew kchan, kindx, giChan
tablew kdata1, kindx, giDat1
tablew kdata2, kindx, giDat2
endin
instr 102
imvol init 4
asigl, asigr fluidOut giengine2 ;add a stereo flanger
adelL linseg 0, p3*.5, 0.02, p3*.5, 0 ;max delay time =20ms
adelR linseg 0.02, p3*.5, 0, p3*.5, 0.02 ;max delay time =20ms
asigL flanger asigl, adelL, .6
asigR flanger asigr, adelR, .6
outs asigL*imvol, asigR*imvol
endin
instr 110
imvol init 7
asigl, asigr fluidOut giengine10
outs asigl*imvol, asigr*imvol
endin
i 101 0 60 ; record
i 102 0 60
i 99 62 60 ; play back data
i 100 62 60
e
--
View this message in context: http://csound.1045644.n5.nabble.com/midi-recorder-tp5099814p5100075.html
Sent from the Csound - General mailing list archive at Nabble.com.
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|