ofxAbletonLive icon indicating copy to clipboard operation
ofxAbletonLive copied to clipboard

Predefined automation (in arrangement) gets overridden via ofxAbletonLive

Open polyclick opened this issue 8 years ago • 1 comments

Ok, so when you have this Ableton Live Set which has some predefined automation going on in the arrangement view; the automation gets overridden (grays out) when the first automation change in the arrangement view got send over to LiveOSC into this addon.

I think the problem is related to ofxAbletonLiveParameter in which you detect parameter changes (from outside -> in) but then, when a change is detected; the value gets resent to Ableton via an OSC message.

void ofxAbletonLiveParameter::setValue(float value)
{
    parameter->set(value);
    ofxOscMessage msg;
    msg.setAddress(oscAddress);
    if (!skipTrack) {
        msg.addIntArg(track);
    }
    msg.addIntArg(device);
    msg.addIntArg(index);
    msg.addFloatArg(value);
    sender->sendMessage(msg);     // <----- trouble when ableton is sending over paramter change to this addon
}

void ofxAbletonLiveParameter::parameterChanged(float & value)
{
  setValue(parameter->get());
}

should be:

void ofxAbletonLiveParameter::parameterChanged(float & value)
{
  parameter->set(parameter->get());     // only setting the value, not resending it
}

I hope I'm correct, at least, my problem is solved by changing this line. :D

polyclick avatar Apr 10 '16 10:04 polyclick

the parameterChanged callback is for when you change the value from somewhere else (i.e. a GUI) and then it transmits it to ableton. if you do it this way, this wouldn't update ableton. maybe it would be better for you to simply have a handle to the parameter itself, i.e. ofxAbletonLiveDevice::getParameter()->set.

genekogan avatar Apr 12 '16 17:04 genekogan