Page 1 of 1

change position objects via MIDI / OSC ?

Posted: 07 Jan 2017 17:20
by kandymodular
Hi everyone,

It is possible to control or change the XY position of the objects via MIDI or OSC?

greetings from berlin,
Kandy

Re: change position objects via MIDI / OSC ?

Posted: 08 Jan 2017 16:27
by kandymodular
that would be so cool …
I change the instrument plug-in with Mackie Control setup and the Lemur objects change their position to get different synthesizer faces !?
This would save a lot of CPU and FPS.

Re: change position objects via MIDI / OSC ?

Posted: 08 Jan 2017 16:57
by oldgearguy
straightforward.

Object size and position is determined by the rect attribute.
So - objRect = getattribute(obj, 'rect');
Set the x, y positions as you want (objRect[0] and objRect[1] in this example) then call
setattribute(obj, 'rect', objRect);

and the object will move.

You'll need a script to read and translate incoming MIDI CCs (for example) that you can use to send new positions.

To test, set up a fader or knob to control the X or Y and have a script in it to modify the position of another object.

Re: change position objects via MIDI / OSC ?

Posted: 08 Jan 2017 22:33
by kandymodular
Hello Oldgearguy,

You have an example patch for me, which I can orient myself, how to do it.

Re: change position objects via MIDI / OSC ?

Posted: 08 Jan 2017 23:34
by kandymodular
Thank you for your help, i have built the example

Re: change position objects via MIDI / OSC ?

Posted: 09 Jan 2017 06:31
by kandymodular
Second example ...

Re: change position objects via MIDI / OSC ?

Posted: 09 Jan 2017 11:21
by oldgearguy
Glad you were able to work it out. Many of us do not spend a lot of time constantly checking on the Lemur forums. Also, we are often busy with other things and do not always have a lot of time to create examples.

The best approach is to do what you did -- ask the question, (hopefully) get some hints/guides/examples and then try to work it out yourself. No one knows your application better than you do, so you will know exactly how the pieces fit together.

When I have time and access to a Lemur environment, I will post examples, but I thought a quick set of notes was better than not helping at all.

Re: change position objects via MIDI / OSC ?

Posted: 09 Jan 2017 21:44
by Phil999
my Diva Lemur template makes use of this technique. Both the Diva GUI changes and the Lemur template are synchronised.