Page 1 of 2

Next Lemur Update??

Posted: 29 Mar 2012 20:13
by joebataz
Any idea on when the update with the editor fix(es) will be released??

New issue:
Global variable; A_CurFrame , initialized to 4
Monitor; value = A_CurFrame
Custom Button; set as Pad;
script; incFrame
OnExpression x goes to 1

incFrame script (no parameters)
A_CurFrame--;
if(A_CurFrame == -1) A_CurFrame = 4;

press button 8 times
Monitor shows
4,3,2,1,0,-1,-2,-3,-4

change script to
A_CurFrame--;
if(A_CurFrame < 0) A_CurFrame = 4;

init A_CurFrame to 4
press button 8 times
Monitor shows
4,3,2,1,0,-1,-2,-3,-4


change script to
A_CurFrame = A_CurFrame - 1;
if(A_CurFrame < 0) A_CurFrame = 4;

init A_CurFrame to 4
press button 8 times
Monitor shows
4,3,2,1,0,-1,-2,-3,-4

I tried every conceivable code, same results.
Quit Lemur on iPad (cleared it out of memory)
Restart Lemur, same thing
Restart Lemur editor on iMac, same thing
Restart iMac, iPad, create new button, yada, yada, yada
Same results. The if statement NEVER fires.

I am baffled by this. So I'm including my entire template, this template sort of works but this is the rewrite version so a lot is missing.
In the left top area of the template is a monitor; A_CurFrameMonitor. Above that the light green button with the single left-pointing arrow is the button that contains all the code that I want to work, and of course doesn't because of this issue. Next to the monitor is a blank white button that has just the 2 lines of code mentioned above. If you want to reset A_CurFrame to 4 press the rightmost light green button with the right-pointing arrow/line button next to the red B OFF button.

Any help or "DUHHHH, where did you learn to program, you missed........." will be greatly appreciated.

Thanks,

joeb

Re: Next Lemur Update??

Posted: 29 Mar 2012 21:45
by axel_liine
I can confirm you spotted a bug there. A variable initialized with a positive constant keeps being interpreted as positive later on, even when it crosses zero.
The fix probably won't make it in the pending update which has been recently approved, but in the one right after.
Very sorry about this one, will let you know as soon as the fix is out.

Re: Next Lemur Update??

Posted: 30 Mar 2012 00:16
by joebataz
So can I do a negative initialize and then go ahead and set it to positive/negative values later?

thx

joeb

ps, thought I was going a little crazy!

jb

Re: Next Lemur Update??

Posted: 30 Mar 2012 01:50
by Macciza
Hi

Wouldn't it simply be easier to start at 1 rather than 0 ?
Then it becomes - if(A_CurFrame == 0) A_CurFrame = 5;
No actual zero crossing that way . . .
Cheers
MM

Re: Next Lemur Update??

Posted: 30 Mar 2012 02:25
by joebataz
MM,

Since the arrays are zero based I would have to change how I do a lot of things so I found a way around it. I just check to see if A_CurFrame is at the zero element and if I it is I just set A_CurFrame to the size of the array of then decrement it by one. Since it only occurs when I'm stepping backward it works fine and I don't need to change all the rest of the code. BTW. Did you check out the template?

Thanks for the suggestions.

joeb

Re: Next Lemur Update??

Posted: 25 Jun 2012 14:21
by axel_liine
axel_liine wrote:I can confirm you spotted a bug there. A variable initialized with a positive constant keeps being interpreted as positive later on, even when it crosses zero.
The fix probably won't make it in the pending update which has been recently approved, but in the one right after.
Very sorry about this one, will let you know as soon as the fix is out.
The fix is included in Lemur 3.2, can you confirm it fixes your problem ?

Re: Next Lemur Update??

Posted: 25 Jun 2012 14:51
by joebataz
It was still there with text objects but not using monitors so I have it working another way.

Thanks for the update!

joeb

Re: Next Lemur Update??

Posted: 25 Jun 2012 16:19
by axel_liine
Hmm, are you saying you can reproduce a similar bug with Text objects ? That would be using scripts to convert integer to strings ?

Re: Next Lemur Update??

Posted: 25 Jun 2012 18:13
by joebataz
No I was reading directly from an array into a text object like so:

setattribute(A_CurrTime,'content',A_SeqTime[A_CurFrame]);

A_CurrTime was the text object. A_SeqTime is an array of numbers. Currently they are integers that I populate but the idea is to eventually get midi time codes into the array. A_CurFrame is the current position in a sequence being executed.
A_SeqBank holds the integers representing the channel 15 midi notes and A_SeqPreset holds the integers representing the channel 16 midi notes. The idea is to look at the midi timecode being sent from the audio and when it hits the value in A_SeqTime to send the midi note pairs on 15 and 16. This was where I was having issues with the timing which are now no longer issues because I got help understanding how to implement timing in the "frame" world. The above was strictly meant to show where in the audio the current sequence is. Does that make sense?
I got around it by using Monitor objects instead of text objects JUST for the time array. I have a couple of scripts which get the values from the Bank and Preset arrays and lookup the text based on the array value. It all works now so I am cleaning up the code. It used to be split between two pages and now it will just reside in the Sequencer page. The Live_Mixer is meant to send the midi pairs to Abelton live so I can store sequences as midi tracks. I could eliminate that if I could save and load directly on the iPad and transfer using iTunes, etc. But this has worked and I've created dozens of midi tracks this way. My site www.stoneagelighting.com (Gallery) has examples of the midi sequences running lights using the DMXIS VST in Live and the midi tracks created using my Lemur app. It's really a beautiful thing and has saved me days programming the tracks and getting the timing as tight as it currently is.

Let me know if this helps

joeb

Re: Next Lemur Update??

Posted: 26 Jun 2012 08:05
by axel_liine
joebataz wrote:No I was reading directly from an array into a text object like so:

setattribute(A_CurrTime,'content',A_SeqTime[A_CurFrame]);
Ok, that actually can't work as you can only pass a string to a Text object's 'content' attribute. Passing an integer will not convert it to a string, and just leave the attribute unchanged.