Page 1 of 1

Shift function with OSC button

Posted: 14 Sep 2014 12:57
by n0ne
Hi,

I'm having trouble creating a button with shift functionallity that responds to OSC as well. The thing is, that the button also gets triggered by the OSC message, is there anyway around this? What I want to do is this:

Create a button to, for example, solo a track in Reaper.
- When shift is off the button just solos the track
- When shift is on the button sends an OSC command first to UNsolo all tracks, and then solos the current track (exclusive solo).
- The button is linked to the address in reaper. So when you solo a track in reaper the button on Lemur gets activated.
- This can be done so far by using a script that runs on expression X, checks the status of the shift button, and then runs either function 1 or 2.

The problem however is this: when you click solo in Reaper, the button also gets triggered. Which I don't want (because the function of the button then runs). However I do need to information from reaper to update the button status on the Lemur.

So basically my question is: is there a way on the Lemur to run a script when the button is pressed that only responds to a click on the Lemur (and not to its assigned OSC address).

My apologies if this is a very simple question, but I couldnt find it in the forums (the other shift topic was about midi).

Thanks!
n0ne

Re: Shift function with OSC button

Posted: 14 Sep 2014 16:46
by Phil999
have you tried already existing templates for Reaper? There is one where solo/mute and many other functions are very well implemented. All via OSC.

Re: Shift function with OSC button

Posted: 16 Sep 2014 08:25
by n0ne
Hi,

Yes I tried both Binder and the other template. They're really cool but afaik don't have functionality that I'm describing.

Any ideas?

Re: Shift function with OSC button

Posted: 16 Sep 2014 11:27
by Phil999
n0ne wrote: So basically my question is: is there a way on the Lemur to run a script when the button is pressed that only responds to a click on the Lemur (and not to its assigned OSC address).
I think I understand now. You want an uni-directional OSC button. This should be easy, create a script executed on x, with an OSC out message. Make sure the general OSC mapping of this button is blank. Then Reaper will react to Lemur without giving feedback.

Re: Shift function with OSC button

Posted: 16 Sep 2014 15:10
by n0ne
Hi Phillip,

Thanks! I indeed think that would work, but then is there a way to still let the button reflect the state of the solo button in Reaper? So I could for example turn the button on when I receive the corresponding OSC message without actually firing it.

:)

Re: Shift function with OSC button

Posted: 16 Sep 2014 17:22
by Phil999
you could create an LEDs object as indicator.

But I admit I use Reaper very rarely, I don't know exactly what you want to do. I know similar situations where I want to send commands without feedback, get feedback without sending anything, use two objects on top of each other, use the z value instead of x, execute scripts only when touched or only when released, etc. One can influence one object with another, for example set Switches.x=0 with another Pads object. I found that with Lemur there is always a solution, even for the most complicated things.

Taking advantage of the more advanced functions in Lemur will surely solve your problem. As a general rule, if you want uni-directional commands, you don't use the normal OSC mapping, you work with scripts and custom OSC commands, and scripts that execute when OSC messages are sent from the DAW.

Re: Shift function with OSC button

Posted: 20 Sep 2014 12:42
by n0ne
Ok I'll do that then, thanks for helping me out :)