Does not send OSC commands when controlled by a midi device

Discuss problems and solutions.
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Does not send OSC commands when controlled by a midi device

Post by Gass n Klang »

Hey guys,
I've got the next problem here: I want a Midi device to control Lemur Android (works well in both directions). Let's say we have a knob in Lemur. So turning the assigne knob on the midi device lets the knob in lemur change values and vice versa. Great.
But now I want to go a step further and remote a DAW by lemur at the same time. So Midi device controls Lemur, while Lemur remotes the DAW via OSC. And there is the problem. Lemur sends out OSC when touching it directly on the android tablet. But Lemur does not send out osc messages when I control it via Midi controller whether I see the changes on the android tablet caused by the midi device. By the way: The Lemur editor shows all changes as long as they are done directly on the tablet. Changes done by the midi device are not shown until I disable and re-enable the "Lemur synchro"
Any solution for that?

Edit: Perhaps you'll wonder why I don't control the DAW directly by my midi device. There are different and important reasons for that. Listing them all would take us too far afield.

Edit 2:
As you can see in the video:
https://youtu.be/iqX4N2rnZis

Turning the controller knob => Lemur follows (midi) but does not send the OSC command for the Valhalla Plugin (decay)
Turning the Lemur knob on the tablet => valhalla Plugin follows and the controller, too.
Last edited by Gass n Klang on 08 Jan 2016 03:20, edited 2 times in total.
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

delete
Last edited by Gass n Klang on 11 Jan 2016 23:31, edited 1 time in total.
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

I added a video in the first post.
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

Can anybody help?
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

I thougth about it a few more times:
The problem seems to be: Lemur can send and receive Midi and osc. But it can only handle Midi bidirectional OR osc. That's why I can controle lemur bidirectional via midi using my controller and even can send and receive osc. But it does not work to connect these two worlds. So sending a midi command, lemur reacts but does not send out osc. I really need that feature. Please liine, integrate that. I bought Lemur for the reason to be the connector between my midicontroller and my laptop. A direct connection midi-controller to laptop does not work for several reasons.
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Does not send OSC commands when controlled by a midi dev

Post by MrCorba »

I think the solution is to create a script set to OnMidi,

You let that script react to your midi controller and then send out a corresponding osc message. Then it should be a working link.

Cheers
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

thanks. I'm very new to scripting. So I tried the following:
oscout(0,'/Songcontainer/x32AssignSecion/Knob1/x',MIDI_ARGS[0]);
It's not working yet.
1) Hoped to send ot the OSC-message through OSC0. Why do I need the MIDI_ARGS ?
2) I'd love to send out the OSC-message given in the OSC-mapping. So that this script even runs if the OSC-message in the mapping changes.
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Does not send OSC commands when controlled by a midi dev

Post by MrCorba »

The MIDI_ARGS is the information sent by your hardware controller, it contains channel/value and other information. I believe this is the way the vector is arranged:
1. In the case of CC messages

MIDI_ARGS[0] is the CC number
MIDI_ARGS[1] is the value
MIDI_ARGS[2] is the Midi channel

2. In the case of Note messages

MIDI_ARGS[0] is the Note number
MIDI_ARGS[1] is the velocity
MIDI_ARGS[2] is the Midi channel
So you would need MIDI_ARGS[0] if you want the value of the knob. If you then in the script say something like Knob.x = MIDI_ARGS[1]; the knob will change on incoming midi and use the mapping from the knob. I'm not able to test this at the moment so I hope this works.

Cheers!
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Gass n Klang
Newbie
Posts: 42
Joined: 01 Jan 2016 20:45

Re: Does not send OSC commands when controlled by a midi dev

Post by Gass n Klang »

Knob1.x=MIDI_ARGS[1];
works. Almost. I've got some feedback problems. The knob in my Lemur project moves but jumps to different values constantly after moving it the first time. I've got some MidiCCs coming in. Perhaps I need som "if" clause that filters out just data from MidiCC 1 ?
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Does not send OSC commands when controlled by a midi dev

Post by MrCorba »

You should be able to filter that out in the Execution fields or try it with an if statement,

If that doesn't work try setting the MIDI_ARGS values to monitors, then you can monitor the incoming values and debug more easily

Cheers
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Post Reply