Cabbage Logo
Back to Cabbage Site

MIDI Questions

Can you send out PC messages to the VST host in Cabbage?

So far no success.

The MIDI examples also did not give me any positive results.

How do you debug this if you can’t connect to a MIDI port in Cabbage?

In the Cabbage audio settings all MIDI input and output ports are available.

The Cabbage host cannot output MIDI messages. Each Cabbage plugin can, but only to other plugins within a DAW. Typically you export a MIDI out plugin, and then bring it into a DAW to drive some other plugin. You can also hook up MIDI plugins in the Cabbage patcher (Ctrl+P / CMD+P). But the Cabbage IDE itself cannot output MIDI messages.

Hi Rory, understand that and that’s what I want: send PC’s to another plugin in my host to select it’s patches.

I’m using a Midi monitor plugin without filter in my host to monitor any incoming MIDI messages from Cabbage plugins I connect to it. Nothing appears in the monitor.

I wonder what I do wrong, maybe the Csound command line options?

Tomorrow I will dig in deeper.

Thanks anyway.

Hi @PatrickB, I just tried one of the examples here and I don’t get no MIDI from it either. Something is broken. Leave it with me. I’ve no idea when this broke :see_no_evil:

OK. Thanks Rory. :+1:

Ok, turns out it was a user error and there was an issue with the MIDI example .csd I was testing with. Try this one:
MIDI_Out.csd (588 Bytes)

When I drop this into a track in a DAW and route its MIDI output to another track it works as expected. Let me know.

Rory,

I can confirm that this example works. Just tested it in my host.
So we now know that note on/off messages arrive.

However still not be able to send PC messages.
I was trying:
midiout 192,1,21,0 and outkpc 1, 21.0, 0, 127

I am sending at k-rate

Thanks Patrick. To be honest, I’ve never tried sending program change messages. Let me check the source code and see if I ever added that…

[edit] I don’t see anything in the source that would prevent these messages from being output by the plugin :thinking

Rory, no hurry, this evening I will look into it further.
Not much time for the moment.

Thanks.

Seems to be working fine for me. Try these two .csd files. When I patch them together I pick up the PG messages from one in the other.

sendPCMessages.csd (681 Bytes) MIDIListener.csd (919 Bytes)

Rory,

finally got this working but not exactly 100%.

If you export as a VST3 it does not work.
As a dll, VST2 it works perfectly.

Don’t know however if this is related to my host or this is a problem in Cabbage.
Maybe you can check from your side.

I will use the VST2 plugin to continue debugging my program since this works.

Sorry, I assumed you were using VST2. VST3 doesn’t support MIDI CC output1. It’s extremely frustrating.

[1] Looks like they added some kind a legacy MIDI CC hack… for now I would stick with VST2 if its available.

You mean MIDI Continuous Controllers?
I use VST3’s all the time with pedals and foot switches via MIDI.
In this case it are patch changes.

Anyway it works with VST2 so I can continue, thanks.

It looks like they might have addressed the issue, but I’ve not followed it that closely.

Ok, that’s a real mess.

I’m using VST3 only a few months now due to the fact that upgrades to the products I’m using did not include VST2 versions anymore (under pressure from Steinberg I assume).

So far I did not experience any major problems.

Anyway I will not lose any sleep over this. :grin:

Thanks Rory. :+1:

Hi Rory, seems you are the right person to ask my question to. I am not very familiar with coding, and new to Cabbage. What I am trying to build is a AU or VST Midi effect pluging dashboard to control the 70 robot instruments at the Logos Foundation (Gent-Belgium). (You can find the list with instruments and details here: https://www.logosfoundation.org/instrum_gwr/manual.html ). I managed to find out how to do the graphical part and layout, but do not know how to code the corresponding cc’s to external midi and skip csound (if needed)? Would be very nice if you could help me out here, thank you in advance, Alain

Hi @AVZ, that looks like an interesting project. You will need to learn to code the Csound stuff in oder to build this. There is no way to ‘skip’ Csound, or maybe I misunderstood? There are a few MIDI out examples that ship with Cabbage that you could look at. The thing to do for now is export them as plugins and bring them into your DAW, then mess about with them and see how they work for you. TO send CC messages from Csound you will need to use the midiout opcode, but I am not sure how CC messages are currently handled by VST3.

1 Like

Thanks for your fast reply Rory, I will checkout the midi out examples and see what happens in Logic X (in my case). Thank you, regards, Alain

Hi Rory, I tried the CCout.csd, and exported as “AU midi effect plug in”. Logic x finds the plugin, and I see that midi is being send , but logic will not record it. I sent a screenshot of the event list, and one of the coding. The only thing I need is to be able to assign a controller to a “ccnumber”, on midi out. Once I know the code for one knob, I should be able to build the full plugin. Thank you for your help in advance, Alain. this is a link to one of my compositions for the robot orchestra if interessted: https://youtu.be/pLBQV3c1l88

Lovely composition. These robots look like a lot of fun!

So the plugin is sending MIDI, but Logic doesn’t pick it up? So it doesn’t work as you would expect? I have to admit to having very little experience with MIDI output in Logic, and Logic in general for that matter.

The outkc opcode might be a little easier?