I’m working on a plugin controlled by Launchpad that does audio in, audio out, midi in, and midi out (midi from and to the launchpad that is). Most of it works as a VST. However, Ableton seems to block midi out until the first signal of midi has been seen going in. There are probably reasons for this, and I relate this to Live also silencing audio if none has been produced for a few seconds. Has anybody had any experience with this, or even known about a workaround? As it stands I cannot have the plugin reset the launchpad lights on song load.
I would post this on Ableton’s forum as well, just expect to see more audio developers here.
To recreate, just build a new plugin that initialises a initialisedMidi
bool to false
, then in the processBlock function:
if (!initialisedMidi)
{
midiIn.addEvent (someMidiMessage, 0);
initialisedMidi = true;
return;
}
The someMidiMessage
will not go through to the launchpad hardware (I would guess no hardware at all). If I add a midiIn.isEmpty()
check, the launchpad reset message will go through (and adding impulse in the AudioSampleBuffer will be audible, etc).
if (!initialisedMidi && !midiIn.isEmpty())
{
midiIn.addEvent (someMidiMessage, 0);
initialisedMidi = true;
return;
}
I wish it was my lack of understanding the prepareToPlay
/processBlock
/releaseResources
cycle, but with debugger I found out that the message was actually sent out, just silenced.
I hope somebody else has seen this same problem, eg. sequencer plugins I figure would suffer from this same thing.