|
Post by joebataz on Feb 26, 2019 2:43:30 GMT
A few years ago I was trying to setup ways to get pretty precise timing for MIDI signals coming out of Lemur. It involved setting up loops based on having globals that I could use inside of a procedure which could then be used across several procs. Hence my dismay over the original forum disappearing. Along with that forum went a couple of years of notes and code postings, (AaAAAAAAAAAAAAAaaaaaaaaaaaa.............) So now not having a photographic mind I need to refresh how the timing works. So if anyone out there can give me a quick overview of Lemur frames I'd really appreciate it.
With that in mind I'm also wondering why I'm getting multiple MIDI records for what I believe is just a single call to noteout. Gotta run, to be continued
joeb
|
|
|
Post by joebataz on Feb 26, 2019 8:35:48 GMT
I have the following code in a button:
decl z,w; z = time +10; AAmsg = z; while(time<z){w=1;} AAmsg = 'done';
I have 2 monitor objects in 1 is the variable time which ticks away nicely. In the other I have AAmsg which first shows me z. Then I watch the time field go right past the z field and it never changes to 'done' Now we know why I miss the other forum. Thank you very little liine!!!! maccazia where are you when I need you!
joeb
|
|
richg
Full Member
Posts: 4
|
Post by richg on Apr 23, 2019 12:28:41 GMT
You've created a 'trap' with the while(time<z){w=1;} statement. The code execution gets stuck there so nothing updates.
Here are some steps I followed to achieve what I think you're trying to do:
----------------------------------------------------------------------------------- 1. Add a CustomButton to the canvas, call it Btn. 2. Add two variables to it call AAmsg and var (which is your 'z', but I stay away from using 'z' because it's sometimes an internal variable like 'x'). You should now have three variables: x, AAmsg, and var. 3. Add two scripts: reset() and UpdateAAmsg() 4. reset() will be: Execution: On Expression, x, rising.
var=time+10;
5. UpdateAAmsg() will be: Execution: On Frame
if(time<var) AAmsg = 'Waiting...'; else AAmsg = 'done';
6. Add a Monitor to the canvas and set its value to Btn.AAmsg -----------------------------------------------------------------------------------
|
|