Next Lemur Update??

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

Next Lemur Update??

Post 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
Attachments
LDJ.jzml
pre-alpha prototype
(83.28 KiB) Downloaded 130 times
axel_liine
Liine Staff
Posts: 126
Joined: 14 Dec 2011 12:12

Re: Next Lemur Update??

Post 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.
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Re: Next Lemur Update??

Post 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
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Next Lemur Update??

Post 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
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Re: Next Lemur Update??

Post 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
axel_liine
Liine Staff
Posts: 126
Joined: 14 Dec 2011 12:12

Re: Next Lemur Update??

Post 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 ?
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Re: Next Lemur Update??

Post 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
axel_liine
Liine Staff
Posts: 126
Joined: 14 Dec 2011 12:12

Re: Next Lemur Update??

Post 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 ?
joebataz
Regular
Posts: 154
Joined: 28 Feb 2012 16:50
Location: Anthem, AZ USA
Contact:

Re: Next Lemur Update??

Post 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
axel_liine
Liine Staff
Posts: 126
Joined: 14 Dec 2011 12:12

Re: Next Lemur Update??

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