Cabbage Logo
Back to Cabbage Site

This code runs on csound but not on cabbage

I have this really simple code that I check with the midi monitor. Csound seems to run it without any problems and I see the pitch wheel message on the midi monitor. When I run the same code in cabbage nothing happens. I see the midi keys come in to cabbages console but the midi monitor is empty.

form caption("Untitled") size(400, 300), guiMode("queue"), pluginId("def1")
keyboard bounds(8, 158, 381, 95)

; 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


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




i130 0 3600

I do not have a midi monitor to test your code. But… have you set a MIDI output from Cabbage settings?

Yes, I checked the midi in/outs on both programs.

Can I ask what the midi monitor is?

It is an application that tracks and displays midi messages. It has the ability to act as a destination for programs that output midi so when i route the midi output of cabbage/csound it displays what the output from my code is.

The Cabbage IDE does not output midi so trying to hook it up to an external program won’t work. Cabbage plugins can output midi, but you’ll need to run them in a DAW. So maybe using vanilla Csound is the best option here?

Ohhh okay. This not me trying to be smart it’s just a genuine question but what does the midi out in the settings do in Cabbage?

Oh boy, I see now where the confusion might arise from. I think that’s just there by default as part of the audio/midi setting widget I’m using. Sorry, I never realised it was there. :man_facepalming:

Thank you for the explanation. What would you say the best daw is for testing? I currently try fl studio but never got to a point where I was sure I did the routing right.

I usually test with Reaper as I find it the most straightforward for routing. If you export one of the Midi example from the Misc examples menu that should get you up and running.

1 Like

Thanks again.