change position objects via MIDI / OSC ?

Discuss problems and solutions.
Post Reply
kandymodular
Newbie
Posts:6
Joined:08 Nov 2016 11:27
Location:Berlin
change position objects via MIDI / OSC ?

Post by kandymodular » 07 Jan 2017 17:20

Hi everyone,

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

greetings from berlin,
Kandy

kandymodular
Newbie
Posts:6
Joined:08 Nov 2016 11:27
Location:Berlin

Re: change position objects via MIDI / OSC ?

Post by kandymodular » 08 Jan 2017 16:27

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.

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: change position objects via MIDI / OSC ?

Post by oldgearguy » 08 Jan 2017 16:57

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.

kandymodular
Newbie
Posts:6
Joined:08 Nov 2016 11:27
Location:Berlin

Re: change position objects via MIDI / OSC ?

Post by kandymodular » 08 Jan 2017 22:33

Hello Oldgearguy,

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

kandymodular
Newbie
Posts:6
Joined:08 Nov 2016 11:27
Location:Berlin

Re: change position objects via MIDI / OSC ?

Post by kandymodular » 08 Jan 2017 23:34

Thank you for your help, i have built the example
Attachments
Change-Position.jzml
(8.71KiB)Downloaded 83 times
Last edited by kandymodular on 10 Jan 2017 06:19, edited 2 times in total.

kandymodular
Newbie
Posts:6
Joined:08 Nov 2016 11:27
Location:Berlin

Re: change position objects via MIDI / OSC ?

Post by kandymodular » 09 Jan 2017 06:31

Second example ...
Attachments
Change-Behavior.jzml
(28.02KiB)Downloaded 85 times
Last edited by kandymodular on 10 Jan 2017 12:55, edited 2 times in total.

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: change position objects via MIDI / OSC ?

Post by oldgearguy » 09 Jan 2017 11:21

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.

Phil999
Regular
Posts:932
Joined:11 Jan 2012 01:53

Re: change position objects via MIDI / OSC ?

Post by Phil999 » 09 Jan 2017 21:44

my Diva Lemur template makes use of this technique. Both the Diva GUI changes and the Lemur template are synchronised.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro

Post Reply