Maybe somebody runs in the same issue: Ableton Live (tested 8 & 9) bypasses plugins if they don't say anything for a while and it's UI is closed. This is especially a problem for autonomous plugins which can be silent for one or two bars... (sequencers, generators).
To avoid this you can use a "active sensing" workaround like in the good old MIDI time.
Code snipped which should explain itself (don't use the code as it is - not tested and statics maybe not a good idea)
void AudioProcessor::processBlock ( AudioSampleBuffer&, MidiBuffer& midiBuffer )
{
// ....
if ( getPlayHead() != 0 )
{
if( PluginHostType().isAbletonLive() )
{
class SensingTimer : public Timer {
void timerCallback( ) {
++callback_counter;
}
public:
int callback_counter;
SensingTimer() : callback_counter(1) {
startTimer(250);
}
};
static SensingTimer sensing_timer;
static int last_sensing = 0;
if( last_sensing != sensing_timer.callback_counter ) {
last_sensing = sensing_timer.callback_counter;
MidiMessage sensing_message;
midiBuffer.addEvent( sensing_message, 0 );
}
}
}
// ....
}
I don't spend a lot of time to find a better solution and did not find something in the forum.
If anybody have a better one, just post it.
Please let me know if you know a host which does the same!
Cheers
