I know this forum is for Cabbage related questions but I couldn’t get any answers in the Csound forum and I’m desperate for help.
I have this if statement but it only runs on the first time. I’m trying to send a pitch bend message everytime the C note is pressed.
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out Audio in No messages
-+rtmidi=NULL -M0 -Q0 ;;;RT audio I/O with MIDI in
; For Non-realtime ouput leave only the line below:
; -o midiin.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 10
nchnls = 1
massign 0, 130
pgmassign 0, 130
instr 130
kstatus, kchan, kdata1, kdata2 midiin
if (kstatus == 144 && kdata1%12==0 &&kdata2>0 ) then
outkpb 1, 70, -200, 200
endif
if (kstatus == 144 && kdata1%12==1 &&kdata2>0 ) then
outkpb 1, 30, -200, 200
endif
endin
</CsInstruments>
<CsScore>
i130 0 3600
e
</CsScore>
</CsoundSynthesizer>
Is it a problem with the score section? I tried a while loop but I get the same result.