Logic controller surface assignments


#1

Hi together

Hope someone can help me. Think its a simple problem. Didnt find something about that in the forum.

Some users have noticed that the controll surface stuff in logic does not work. I could reproduce the problem. I also tried it with an older version of the juce demo plugin and it didnt work too.

The problem:

  1. I go to Preferences --> Control Surfaces --> Controller Assignments…
  2. I choose the “easy view” and push the “Learn Mode” button.
  3. Now i move a slider of the plugin, but Logic does not recognize it and no assignment is possible.

This seems to work with most of the other plugins. I remember that i had send events of type:

kAudioUnitEvent_BeginParameterChangeGesture
kAudioUnitEvent_EndParameterChangeGesture

in my older Audio Units. I see that something like that is implemented in the juce framework. Do i have to call these events by myself?


#2

It does all that for you - have a look at AudioProcessor::beginParameterChangeGesture()


#3

Thanks a lot for looking at that. Got the feedback that there is the same issue in Ableton Live. But dont hestiate, the plugins do normal automation tasks pretty well :slight_smile:


#4

Hi Jules

Could you reproduce this issue. I got a user feedback that the problem still exists and i could reproduce it. Maybe i do something wrong, but i dont think so, it seems that it doesnt work with the demo plugin too. I move a plugin slider , but Logic does not recognize it and logic/ableton cant assign it to the midi controller.

Here the code of my project, i finally had to release the source, had not enough donations, it didnt hurt as much as i thought :slight_smile:


Its uploaded as svn repository.


#5

In the demo I didn’t make any calls to beginParameterChangeGesture(), so that’d explain why it might not automate. (I probably should sort that out).

But are you saying that you did call the gesture methods but still have problems…?


#6

[quote=“jules”]
But are you saying that you did call the gesture methods but still have problems…?[/quote]

No i didnt in my juce project. Did it in one of my older non juce projects. I see that you have implemented those methods in the wrappers, they do exactly what they should:

[code] void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue)
{
sendAUEvent (kAudioUnitEvent_ParameterValueChange, index);
}

void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index)
{
    sendAUEvent (kAudioUnitEvent_BeginParameterChangeGesture, index);
}[/code]

If i have to call them, how should i do that? Are there some events or methods to overwrite that indicates the begin and end of a gesture?


#7

It depends on how your UI works. E.g. if you’ve got a slider, you might want to use the sliderDragStarted() and sliderDragEnded() callbacks to do it. If you’ve just got a button, you’d probably simply call them before and after setting the param. That’s why I can’t really automate these calls, you have to call them in whatever way makes sense for your app.


#8

Ok, this makes sense. Thanks for the input. Didnt know that i have to do that by myself… It looks that sliderDragStarted() and sliderDragEnded() are the right events for doing that. I see your problem. The GUI compnents now need more information like the AudioProcessorEditor and the numerical index of the current parameter. Thats stuff that is useful for audio plugin applications only.

I have already overwritten the original Slider class and will try to call these events within my Sliders. Thanks for the solution.


#9

I did something like this:

[code]
void TalComponent::sliderDragStarted (Slider* slider)
{
TalCore* const filter = getFilter();
filter->beginParameterChangeGesture(slider->getName().getIntValue());
}

void TalComponent::sliderDragEnded (Slider* slider)
{
TalCore* const filter = getFilter();
filter->endParameterChangeGesture(slider->getName().getIntValue());
}[/code]

The name includes the parameter number. Maybe someone knows how i can get a index of a slider in a more elegant way without making 100 “if” statements and without using the name?


#10

Use Component::getProperties() to give each slider a property specifying its index, and then just retrieve that number in the callback.


#11

Great, thanks!