Programming issues

Discuss Lemur and share techniques.
Post Reply
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Programming issues

Post by joebataz »

I'm still having problems with programming Lemur, I spent most of yesterday looking for things on this forum and through the manual but am still stumped.
1. Can I read and write midi files directly?
2. How do I create/access global variables I create. i.e. If I create the following script in a Pad array triggered by OnLoad:

decl this, Banks;
this = getobject();
Banks = {'B1','B2','B3','B4'}
setattribute(this,'labels',Banks);

It works great, BUT if I create the following script triggered by OnLoad at the Project (Template) level:

decl Banks;
Banks = {'B1','B2','B3','B4'}

And put this into the Pad array at OnLoad
decl this;
this = getobject();
setattribute(this,'labels',Banks);

It doesn't allow the scrip, I get the warning icon, yellow triangle with red exclaimation point.

I also can't get the Project level script to work (same error) using:
decl this, Banks;
this = getobject(/Mixer/Pad);
Banks = {'B1','B2','B3','B4'}
setattribute(this,'labels',Banks);

or
this = getobject(Pad);

or
this = getobject(Mixer.Pad);

Nowhere in the manual have I been able to find getobject(). I can find getobjectrect() but not getobject().

3. Is there an estimate of when string manipulation and multidimensional arrays might happen?

Thanks,

joeb
www.stoneagelighting.com
"old as dirt and made from rock..."
bxsj
Regular
Posts: 116
Joined: 24 Dec 2011 06:47
Location: Vienna

Re: Programming issues

Post by bxsj »

some quick answers
1. No
2. You need to define global variables either on the project or on the container level. Variables defined in a script are only valid inside the script.
3. Time will show, in the mean time we'll do without ;)
Hope that helps,
B.
Win7 64, Ipad Lemur, Cubase6 and a bunch of Roland Synths and Samplers
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Re: Programming issues

Post by joebataz »

wow, I like your answers! no bs.
www.stoneagelighting.com
"old as dirt and made from rock..."
bxsj
Regular
Posts: 116
Joined: 24 Dec 2011 06:47
Location: Vienna

Re: Programming issues

Post by bxsj »

Thanks for the flowers :) But here is some more information I found while messing around :oops:
"Local" variables can be accessed from outside via their address. That is the variable "testvar" in container "Cont1" can be acessed outside of container "Cont1" by "Cont1.testvar" ...
Lesson learned, never post something w/o testing all the possiblilities. I should have known better :roll:
Cheers,
B.
Win7 64, Ipad Lemur, Cubase6 and a bunch of Roland Synths and Samplers
Post Reply