ofxAbletonLive
ofxAbletonLive copied to clipboard
Predefined automation (in arrangement) gets overridden via ofxAbletonLive
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
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.