Array sizes

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

Post by joebataz » 16 Jul 2014 23:56

How big an array can I use with Lemur 5. This is what I'm looking at:
32 arrays each holding an array of 50 arrays each holding 100 decimal numbers.

Doable?

THX,

Joe B

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: Array sizes

Post by Softcore » 17 Jul 2014 15:03

Not more than 256 bytes unfortunately

joebataz
Regular
Posts:154
Joined:28 Feb 2012 16:50
Location:Anthem, AZ USA
Contact:

Re: Array sizes

Post by joebataz » 18 Jul 2014 15:35

Softcore,

thanks for the response, but are you sure about that? I'm pretty sure that I am using arrays bigger than that right now. I've been using my app for so long I'll have to go look at the core code again. I had thought that at the Lemur execution level arrays just contained pointers to memory locations that held the actual data. Let me digress a little:
My app LDJ is meant for control of a DMX interface, the DMXIS by ENTTEC. I control about 50 DMX devices. In LDJ the 50 devices used to be just on and off switches pointing to the DMXIS software which stored Banks and Presets. Banks are a grouping of Presets, which hold the DMX data. I can turn these Presets on by send a note pair on MIDI channels 15 (Banks) and 16 (Presets). Lemur was exceptional allowing me to get down to 64th note timing which allowed me to send 3 or 4 of these pairs out without any noticeable latency. I used arrays to save a note pair, the MIDI timecode, and a name. As part of LDJ I also had a video page which talked to VDMX5 by way of OSC. I've used this system with great success for well over a year.
On and off is great and can work well in clubs and parties but a true lighting designer knows that dimming is critical for subtlety in enhancing audio. So I've done a total rewrite from the ground up. I have 88 channels of DMX data (a number from 0 to 127) grouped into 8 device types. This is ALL working manually. I also have the ability to send the data out according to saved and on the fly dimming curves. My plan was to stuff the 88 pieces of data, in reality 96 with tags and timing data, into a "scene". 50 of these scenes would be used by one piece of audio (i.e. song) and 32 songs stored. That would be the ideal but we don't live in a perfect world, just a fast one so I was hoping to break the 96 into the mentioned 8 groups.
Manual operation works beautifully but timed crossfades are a little jumpy. The biggest hurdle I have right now is how to store the DMX data and retrieve it. I hope to get some screen shots up soon.

Thanks for listening and I'm open to suggestions from the forum.

Best regards to you folks (especially Macciza, Nick and Softcore),

Joe B

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: Array sizes

Post by Softcore » 18 Jul 2014 15:59

lemur manual page 149

Specification
Certain technical limitations exist within the Lemur environment. Some of these figures will be
addressed in the near future, some later, some never.
• Menu object is currently set to maximum number of 32 items.
• Expression text length is currently set at maximum of 256 characters.
• Vector/List length in a script variable is currently set at a maximum of 256 elements.
• Multiline script length is currently set at a maximum of 4096 characters.
• Maximum number of entries in an array is currently set to 256 (maybe less when dealing
with long entries);
• MIDI System Exclusive message maximum size is currently 256 bytes.
• Maximum size limits also apply to OSC messages due to underlying transport packet size.

;)

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: Array sizes

Post by Softcore » 18 Jul 2014 16:01

Now the thing is, you cant have an array in an array (I believe thats called a 2 dimensional array? not sure).....So we are left with defining a subarray out of an array with a maximum of 256 entries - and the entries become less if you have strings in there.

joebataz
Regular
Posts:154
Joined:28 Feb 2012 16:50
Location:Anthem, AZ USA
Contact:

Re: Array sizes

Post by joebataz » 18 Jul 2014 16:17

[attachment=2]LDJV2_1.jpg[/attachment]Screenshots
Joe B
Attachments
LDJV2_3.jpg
LDJV2_3.jpg (133.37KiB)Viewed 2370 times
LDJV2_2.jpg
LDJV2_2.jpg (95.66KiB)Viewed 2369 times
LDJV2_1.jpg
LDJV2_1.jpg (91.19KiB)Viewed 2369 times

joebataz
Regular
Posts:154
Joined:28 Feb 2012 16:50
Location:Anthem, AZ USA
Contact:

Re: Array sizes

Post by joebataz » 18 Jul 2014 16:26

THAT'S where it is!

I was looking for that page.

Of course the whole thing becomes moot if we could ever have a load/save option on the iPad. I know there are ways to do it from the Lemur editor but not the way I need it, especially when I have a bunch of other software running while I'm doing an event.

Thanks again for the response!

Joe B

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

Re: Array sizes

Post by oldgearguy » 18 Jul 2014 18:09

Softcore wrote:Now the thing is, you cant have an array in an array (I believe thats called a 2 dimensional array? not sure).....So we are left with defining a subarray out of an array with a maximum of 256 entries - and the entries become less if you have strings in there.
We've done tricks to pretend we have multi-dimensional arrays by dynamically building up variable names using numbers from one array and then using something like findobject() on the resulting name. Of course for that to work you have to use Monitor objects and store the data in the value portion, so the coding gets a little ugly, but there's nothing stopping you from building up multi-dimensional arrays that way.

I used Monitor objects this way: (note - this was cut from the .jzml, so the syntax may not be exact, but you get the idea)

b1.value={7, {0.31, 0.31, 0.59, 0.59, 0.72, 0.72, 0.59}, {0.45, 0.12, 0.12, 0.97, 0.97, 0.76, 0.76}};
b2.value={7, {0.31, 0.18, 0.18, 0.31, 0.31, 0.59, 0.59}, {0.34, 0.34, 0.55, 0.55, 0.12, 0.12, 0.91}};
b3.value={7, {0.31, 0.31, 0.59, 0.59, 0.72, 0.72, 0.59}, {0.56, 0.12, 0.12, 0.76, 0.76, 0.55, 0.55}};

then the code is something like this:

cfg = findobject('b' + (algNum+1));
myData = getexpression(cfg, 'value');

numPts = myData[0];
setattribute(LineArt, 'nbr', numPts);
LineArt.x = subarray(myData, 1, numPts);
LineArt.y = subarray(myData, 1+numPts, numPts);


There's nothing stopping you from using 'arr1', 'arr2', 'arr3', etc as elements in the array and then de-referencing those as well. Although I ran into size limitations trying to pre-define the arrays with large names for each element.

joebataz
Regular
Posts:154
Joined:28 Feb 2012 16:50
Location:Anthem, AZ USA
Contact:

Re: Array sizes

Post by joebataz » 18 Jul 2014 19:17

On the money oldgearguy!
Thats how I was doing it (dereferencing) in my first version of LDJ. Looks like I'll be doing the same with my V2. Only thing is I don't use monitor I use globals. My biggest issue especially with timing is to keep lookups as quick as possible. I also use integers and get the vals for the faders using range statements.

Joe B

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

Re: Array sizes

Post by oldgearguy » 18 Jul 2014 19:24

joebataz wrote:On the money oldgearguy!
That's how I was doing it (dereferencing) in my first version of LDJ. Looks like I'll be doing the same with my V2. Only thing is I don't use monitor I use globals. My biggest issue especially with timing is to keep lookups as quick as possible. I also use integers and get the vals for the faders using range statements.

Joe B
Maybe it was just because I was not as savvy in the beginning, but I had trouble trying to dereference multiple layers using straight variables because they're not objects. Lemur seemed to allow dynamic references to variables in some cases and not others. At the time I got frustrated and went with objects. Speed versus size versus maintainability are always the tradeoffs you have to deal with when coding. In my case I was creating an editor that was talking to old hardware and sending too much data too fast was my big concern.

Post Reply