General
Send Controller Snapshot?
Started by Trailerman on .
Sign in or create an account to join the conversation.
Hi
Loving the Lemur iPad app - what a great piece of design.
I wondered if I could ask something. Is there any way to send a snapshot of all the controller positions on a given page, using one button? ie. - say you're controlling multiple parameters on a synth or mix, you tweak the filter settings, pan, resonance etc. using Lemur until you have the exact settings you want. Is there some way to then transmit those final settings using a single button or command?
Thanks in advance for any tips or suggestions.
Jules
Loving the Lemur iPad app - what a great piece of design.
I wondered if I could ask something. Is there any way to send a snapshot of all the controller positions on a given page, using one button? ie. - say you're controlling multiple parameters on a synth or mix, you tweak the filter settings, pan, resonance etc. using Lemur until you have the exact settings you want. Is there some way to then transmit those final settings using a single button or command?
Thanks in advance for any tips or suggestions.
Jules
.... I'm guessing that means it can't be done or is difficult.
Seems surprising given how powerful this software is. Doesn anyone know which part of the manual I should perhaps be looking at to try and find this kind of functionality?
Thanks again.
Jules
Seems surprising given how powerful this software is. Doesn anyone know which part of the manual I should perhaps be looking at to try and find this kind of functionality?
Thanks again.
Jules
I am quite new to the Lemur as you are.Trailerman wrote:.... I'm guessing that means it can't be done or is difficult.
Seems surprising given how powerful this software is. Doesn anyone know which part of the manual I should perhaps be looking at to try and find this kind of functionality?
Thanks again.
Jules
I think everything is possible with it but few things are easy to implement, at at first till we get the grip.
Here is what you are looking for:
http://www.jazzmutant.com/workshop_tutorialslist.php?id=storing
Thanks so much Kraftf - that looks like exactly what I need.
I'm not much of a programmer, but I'll see if I can get my head around the scripting language and have a go at putting something together which will do the trick. It looks like I only need part of that procedure (I only need to 'transmit' the data, not save and restore presets) so hopefully it'll be a little more straight forward than implementing the whole tutorial.
Thanks again for your help.
Jules
http://www.trailermen.com
I'm not much of a programmer, but I'll see if I can get my head around the scripting language and have a go at putting something together which will do the trick. It looks like I only need part of that procedure (I only need to 'transmit' the data, not save and restore presets) so hopefully it'll be a little more straight forward than implementing the whole tutorial.
Thanks again for your help.
Jules
http://www.trailermen.com
I think that you can do that by using getfirst(obj) then creating a loop and use getnext(obj).
Didn't try it but it should be something like that:
decl obj = getfirst(myinterface);
while(obj != 0)
{
setexpression(obj, 'x', getexpression(obj, 'x'));
obj = getnext(obj);
}
It seems that setting x to it's value will automatically trigger a midi out message and seems to work with vectors as well (multi sliders, pads, ...).
Didn't try it but it should be something like that:
decl obj = getfirst(myinterface);
while(obj != 0)
{
setexpression(obj, 'x', getexpression(obj, 'x'));
obj = getnext(obj);
}
It seems that setting x to it's value will automatically trigger a midi out message and seems to work with vectors as well (multi sliders, pads, ...).
Thanks mbncp - that's extremely helpful.
I'm going to give that a go today. Will that script just get data from the objects on the current page?
Thanks again
Jules
I'm going to give that a go today. Will that script just get data from the objects on the current page?
Thanks again
Jules
hmmm... it's a bit weird here, as I can't call
getfirst(myinterface);
neither can I call
getfirst(Project);
findobject 'Project' or 'myinterface' doesn't work either.
But ...
decl obj;
obj = findobject('MultiSlider'); // multislider is an object on my second interface(page), but can be any object, anywhere (..?)
obj = getparent(obj); // this is funny as it seems to return the project , not the the page/interface
//obj = getparent(obj); // removed that as the project has no parent
Monitor.value = obj; // shows the project obj as pointer
obj = getfirst(obj);
while(obj != 0)
{
setexpression(obj, 'x', getexpression(obj, 'x'));
obj = getnext(obj);
Monitor2.value = Monitor2.value +1; // used to see how many obj it finds and it seems to return all object in the project
}
This will actually go thru all object in all pages.
IMO there is some bug here as obj in getfirst(obj) can be a template (project), interface(page) or a container object, if I read the doc correctly.
getfirst(myinterface);
neither can I call
getfirst(Project);
findobject 'Project' or 'myinterface' doesn't work either.
But ...
decl obj;
obj = findobject('MultiSlider'); // multislider is an object on my second interface(page), but can be any object, anywhere (..?)
obj = getparent(obj); // this is funny as it seems to return the project , not the the page/interface
//obj = getparent(obj); // removed that as the project has no parent
Monitor.value = obj; // shows the project obj as pointer
obj = getfirst(obj);
while(obj != 0)
{
setexpression(obj, 'x', getexpression(obj, 'x'));
obj = getnext(obj);
Monitor2.value = Monitor2.value +1; // used to see how many obj it finds and it seems to return all object in the project
}
This will actually go thru all object in all pages.
IMO there is some bug here as obj in getfirst(obj) can be a template (project), interface(page) or a container object, if I read the doc correctly.
I'm glad you're figuring this stuff out, because I wouldn't know where to start - thank you so much!!
It sounmds like there are some quirks in the language which might put this beyond my capabilities. Once it's working, presumably the complete script can be assigned to any kind of button on the page. I just need to figure out how to limit it to the sliders on only the page in question.
Thanks again. As soon as I get the iPad back from my son, I'll give this a proper look.
Jules
EDIT: Looks like there are a few issues being reported elsewhere, especially under General Discussion. Hopefully the dev's are aware of the problems and will get things fixed ASAP.
It sounmds like there are some quirks in the language which might put this beyond my capabilities. Once it's working, presumably the complete script can be assigned to any kind of button on the page. I just need to figure out how to limit it to the sliders on only the page in question.
Thanks again. As soon as I get the iPad back from my son, I'll give this a proper look.
Jules
EDIT: Looks like there are a few issues being reported elsewhere, especially under General Discussion. Hopefully the dev's are aware of the problems and will get things fixed ASAP.
Don't know why but I had in mind that you needed this for 200 controls, but if you just have a limited amount of controls this is easier to deal with:
Create a custom button control and add it this script, On Expression x then select the arrow up symbol (trigger when going from 0 to else).
decl obj, n, c, a;
a = {'mymultiline1', 'mymultiline2', 'myfader1' }; // add as many controls you have/need, watch the spelling
c = sizeof(a);
for (n = 0; n < c; n++)
{
obj = a[n];
setexpression(obj, 'x', getexpression(obj, 'x')); // force control to re-send midi out
}
You can then just make copies for each page, but make sure to set the correct names.
Create a custom button control and add it this script, On Expression x then select the arrow up symbol (trigger when going from 0 to else).
decl obj, n, c, a;
a = {'mymultiline1', 'mymultiline2', 'myfader1' }; // add as many controls you have/need, watch the spelling
c = sizeof(a);
for (n = 0; n < c; n++)
{
obj = a[n];
setexpression(obj, 'x', getexpression(obj, 'x')); // force control to re-send midi out
}
You can then just make copies for each page, but make sure to set the correct names.
Why do you say this?Is there a limitation with the amount of controls that can be handled in a snapshot variable. Is 256 the maximum size of an array that can be handled or something else?mbncp wrote:Don't know why but I had in mind that you needed this for 200 controls, but if you just have a limited amount of controls this is easier to deal with:
I don't know what is the limit but it's probably larger than 256.No the reason is that no one wants to fill a huge array by hand, at least not me 
mbncp - again thank you!!mbncp wrote:Don't know why but I had in mind that you needed this for 200 controls, but if you just have a limited amount of controls this is easier to deal with:
Create a custom button control and add it this script, On Expression x then select the arrow up symbol (trigger when going from 0 to else).
decl obj, n, c, a;
a = {'mymultiline1', 'mymultiline2', 'myfader1' }; // add as many controls you have/need, watch the spelling
c = sizeof(a);
for (n = 0; n < c; n++)
{
obj = a[n];
setexpression(obj, 'x', getexpression(obj, 'x')); // force control to re-send midi out
}
You can then just make copies for each page, but make sure to set the correct names.
I'm trying to implement this script right now. I'm a complete newb to this kind of thing, but am following your instructions and the manual as best I can.
Just so I'm clear, in your a= line above, am I right in assuming that the controls I'm referencing need to be referenced exactly as they're named in my Project page? In other words if I have 10 individual faders named Fader 1 through 10, I would stipulate these exact same names in this line?
Also, in the setexpression line, am I right in thinking this line sends ALL the data from the appropriate faders and sends them on the correct channel automatically, or does this line also have to be repeated for each fader?
Sorry for being so dumb, and thank you again for all your help. I'll try and post the finished product top the templates page once it's up and running, in case it helps others.
Jules
Sorry - next question:
What should the MIDI mapping properties be for the object which the script is assigned to? I'm using a simple 'custom button' set in 'pad' mode (in order that it transmits the state of all faders on the page whenever it is pressed - toggle wouldn't work correctly).
From tests so far, with the script in place, if I don't assign it a MIDI target, it doesn't seem to do anything at all (no MIDI data is transmitted when I press it). If I assign it a MIDI target then it just performs transmission of the MIDI message assigned to it in it's MIDI properties (note on etc.). Am I perhaps missing something here?
Sorry for my totally ignorance here.
Jules
What should the MIDI mapping properties be for the object which the script is assigned to? I'm using a simple 'custom button' set in 'pad' mode (in order that it transmits the state of all faders on the page whenever it is pressed - toggle wouldn't work correctly).
From tests so far, with the script in place, if I don't assign it a MIDI target, it doesn't seem to do anything at all (no MIDI data is transmitted when I press it). If I assign it a MIDI target then it just performs transmission of the MIDI message assigned to it in it's MIDI properties (note on etc.). Am I perhaps missing something here?
Sorry for my totally ignorance here.
Jules
oops, my bad, the array has to be filled with controls, not text.
so it should be:
a= {Fader1, Fader2, ....}; without the ' '
so it should be:
a= {Fader1, Fader2, ....}; without the ' '
From what I see, a midi event will be automatically sent for each slider, pad, so no need to make a loop like x[0] = x[0]; x[1| = x[1]; ....multifaders, pads, switches ...
No worries - just grateful for your help.
Presumably then the script should look like this (see below). Presumably also, the MIDI properties for the object the script is assigned to (my custom button) are irrelevant, because the button is forcing the faders to resend their current values, so any MIDI message the button itself sends would be in addition to this.
Unfortunately it doesn't result in any MIDI data being sent, so I can only assume the getexpression/setexpression part of the script doesn't work for some reason, or the data which is being returned to 'a' is not correct. Oh well - I really appreciate your help and will continue to try and figure it out.
Jules
Snapshot1B.jpg
Presumably then the script should look like this (see below). Presumably also, the MIDI properties for the object the script is assigned to (my custom button) are irrelevant, because the button is forcing the faders to resend their current values, so any MIDI message the button itself sends would be in addition to this.
Unfortunately it doesn't result in any MIDI data being sent, so I can only assume the getexpression/setexpression part of the script doesn't work for some reason, or the data which is being returned to 'a' is not correct. Oh well - I really appreciate your help and will continue to try and figure it out.
Jules
Snapshot1B.jpg
Don't know what's going wrong, I just tested using 3 faders, and pressing my custom button does send out the 3 cc's.
using midi monitor:
sendCtrlSnapshot.jzml.zip
Btw, you have twice fader3 in your array, shouldn't make a difference though.
You can also post your project, it takes me a few seconds to get it running and testing.
using midi monitor:
14:00:29.728 From Daemon Input 0 Control 1 0 127
14:00:29.728 From Daemon Input 0 Control 1 1 127
14:00:29.728 From Daemon Input 0 Control 1 2 127
This is the template I used:sendCtrlSnapshot.jzml.zip
Btw, you have twice fader3 in your array, shouldn't make a difference though.
You can also post your project, it takes me a few seconds to get it running and testing.
Got it!!
I had the 'x' value missing from the script header - doh.
All working now. Next challenge is to try and save settings as presets, but I have a tutorial on that, and now I understand some of the basic scripting functions should be good to go.
Many many thanks again!
Jules
I had the 'x' value missing from the script header - doh.
All working now. Next challenge is to try and save settings as presets, but I have a tutorial on that, and now I understand some of the basic scripting functions should be good to go.
Many many thanks again!
Jules
Actually I just realised that the limit for an array to be filled in with items is 256 indeed.mbncp wrote:I don't know what is the limit but it's probably larger than 256.No the reason is that no one wants to fill a huge array by hand, at least not me
Damm you're right. It's funny because if I type this :
decl a;
a = {fill(1,1, 256), fill(1,2, 256)};
Monitor.value = sizeof(a);
Monitor shows 256
But ..
Monitor.value = sizeof({fill(0, 0, 256), fill(0, 0, 256)});
shows 512.
which is a bit weird IMO.
Not a big deal as we can use multiple variables, though coding could be more efficient in some situations if we had larger arrays.
decl a;
a = {fill(1,1, 256), fill(1,2, 256)};
Monitor.value = sizeof(a);
Monitor shows 256
But ..
Monitor.value = sizeof({fill(0, 0, 256), fill(0, 0, 256)});
shows 512.
which is a bit weird IMO.
Not a big deal as we can use multiple variables, though coding could be more efficient in some situations if we had larger arrays.