Ableton Live bypasses "silent" plugins with closed UI :: the keep alive workaround


#1

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


#2

Could it also send a single inaudible audio sample, e.g. on sample of 1.0 / 32767.0? That could be sent every few seconds without causing any problems.


#3

I'll test this soon. I beleive audio should do the same...


#4

This sound like a bug, i would contact Ableton support, there are communicative


#5

I believe this is an "performance hack" and Ableton like to reduce unnecessary plugin calls to reduce CPU usage? Maybe?


#6

ask them, for me it makes no sense


#7

I can confirm that Ableton Live did this for years already, most likely for performance reasons. I haven't heard of any other host yet that does the same. 

An occasional Active Sensing MIDI message fixes it. I once tried the "inaudible sample" method, but abandoned it. MIDI seems more lightweight and sensible to me.