Cabbage Logo
Back to Cabbage Site

Outgoing MIDI issues

I am developing my first ever VST plugin and I ran into two issues. One is probably my bug, second not.

My VST plugin is velocity fixer - velofix.csd (1.4 KB) - it sets fixed velocity (set by slider) to incoming notes. This is useful if you have cheapest keyboard as I have.

I noticed two bugs:

  • it does not work if it’s exported as VST3 (VST2 is okay) - outgoing velocity is not fixed
  • if you press more keys at once, only one is released

Aside from that, Cabbage looks very powerful.

Maybe midiin in a loop so you can read all the midi messages arriving in the same kcycle

instr 1
kvol chnget "vol"
kbyvol chnget "byvol"

    kstatus, kchan, kdata1, kdata2 midiin

    if changed(kstatus, kchan, kdata1, kdata2)==1 then
        if kstatus==144 then
            printks "note %d %d\n", 0.5, kdata1, kvol
            midiout kstatus, kchan, kdata1, kvol
        elseif kstatus==176  && kdata1=7 then
            if kbyvol==1 then
                printks "volchange %d\n", 0.5, kdata2
                chnset kdata2, "vol"
        elseif kstatus>0 then
            printks "midi pass %d %d %d\n", 0.5, kstatus, kdata1, kdata2
            midiout kstatus, kchan, kdata1, kdata2

if kstatus!=0 kgoto loop

1 Like

VST3 doesn’t handle midi very well. It’s well known. For example, check this JUCE thread.

And even more:

it seems that I opened whole can of worms. :slight_smile:

Is there any way of using VST3-native note data/objects in Cabbage?

I’m afraid not, and I can’t see that changing any time soon. I think there is a better chance the people at JUCE will update their wrapper, and they will probably do it far better than I could :wink:

Note that I’m still reading through those threads. Perhaps we’ll come across a suitable fix.

Okay. I will just keep using VST2 for MIDI altering plugins for now.

Thanks for help.