Troubleshooting

change position objects via MIDI / OSC ?

Started by kandymodular on .

Sign in or create an account to join the conversation.

8 posts

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.
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.