Project
^^KnobLed_ Module
Started by Macciza on .
Sign in or create an account to join the conversation.
Hi All
^^KnobLed Help.tiff
Have been meaning to post some stuff but keep wanting to tweak something a little more (never-endingly it seems) . . .
So I decided to at least post the basic module idea implementation so here it is.
It is a Knob with an Led marker based on Phil999's initial design but neatly encapsulated for ease of resizing and usage via standard Lemur syntax.
It presents 'x','z' and 'value' variables that should be able to be used in the same way you would use a Knob. A small 'Help' module is also included.
It is at a 'default' size of 100px (10*horizontal) - the container needs to be 'unlocked' to be altered, then 'lock' it again for easier moving.
This is an 'in-line' version in that it is self-contained; a refactored 'function library' based version is also almost finished.
I also have a number of specialisations of this object in the works but am still deciding on my preferred implementation.
Working on a few other nice ideas as well that I hope to post before too long . . .
Edit:©2013 Macciza. CC BY-NC-SA
Attribution-NonCommercial-ShareAlike
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.
Cheers
MM
^^KnobLed_Help.jzlib
^^KnobLed_.jzlib
^^KnobLed Help.tiff
Have been meaning to post some stuff but keep wanting to tweak something a little more (never-endingly it seems) . . .
So I decided to at least post the basic module idea implementation so here it is.
It is a Knob with an Led marker based on Phil999's initial design but neatly encapsulated for ease of resizing and usage via standard Lemur syntax.
It presents 'x','z' and 'value' variables that should be able to be used in the same way you would use a Knob. A small 'Help' module is also included.
It is at a 'default' size of 100px (10*horizontal) - the container needs to be 'unlocked' to be altered, then 'lock' it again for easier moving.
This is an 'in-line' version in that it is self-contained; a refactored 'function library' based version is also almost finished.
I also have a number of specialisations of this object in the works but am still deciding on my preferred implementation.
Working on a few other nice ideas as well that I hope to post before too long . . .
Edit:©2013 Macciza. CC BY-NC-SA
Attribution-NonCommercial-ShareAlike
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.
Cheers
MM
^^KnobLed_Help.jzlib
^^KnobLed_.jzlib
Hmmmm.....looks nice but it works erratically in my editor. I press "e" to see it in action and it doesnt work smoothly....
edit: Not sure whats going on here.....I get a container with a knob in it (looks like it).....but there is no knob object in it????
edit no2: forget edit no1 - I rarely use locking for containers so I had forgotten....
Still works erratically though....at least in the windows Lemur editor with "e" mode....
edit: Not sure whats going on here.....I get a container with a knob in it (looks like it).....but there is no knob object in it????
edit no2: forget edit no1 - I rarely use locking for containers so I had forgotten....
Still works erratically though....at least in the windows Lemur editor with "e" mode....
Oh yeah
It's presented at a 'default' size of 100px (via 'locking'- which hides the internals) . . .
This makes it easier to move etc once it is set up.
Highlight the container and click the 'lock' icon above the 'Transparent' checkbox . . . .
Sorry
MM
It's presented at a 'default' size of 100px (via 'locking'- which hides the internals) . . .
This makes it easier to move etc once it is set up.
Highlight the container and click the 'lock' icon above the 'Transparent' checkbox . . . .
Sorry
MM
yeah sorry about that - I re-edited above!
Hmm
Works like a charm on Mac;~} . . .
And on the iPad . . .
MM
Works like a charm on Mac;~} . . .
And on the iPad . . .
MM
Ok trying to see what might cause the problem I have found out:
1. Disabling all the scripts doesnt solve the problem
2. The knob behaves "as if" something is keeping it "locked" to values
3. deleting the "x" and "z" expressions in the container makes the knob work properly
It all behaves as if the x,z variables in the container are not "discriminated" by the editor with the x,z variables INSIDE the knob causing a weird "lock up"....
4. re-enabling the scripts, the knob works properly
Im willing to bet if I re-add the expressions but I dont use the x,z names it will work too.....
1. Disabling all the scripts doesnt solve the problem
2. The knob behaves "as if" something is keeping it "locked" to values
3. deleting the "x" and "z" expressions in the container makes the knob work properly
It all behaves as if the x,z variables in the container are not "discriminated" by the editor with the x,z variables INSIDE the knob causing a weird "lock up"....
4. re-enabling the scripts, the knob works properly
Im willing to bet if I re-add the expressions but I dont use the x,z names it will work too.....
Nope.....replaced the container expressions x,z with k,l - of course I also replaced the references inside the epxressions.....
Still doesnt work....
Im curious if this happens to other users too or its just my editor......Lets just wait and see....
Still doesnt work....
Im curious if this happens to other users too or its just my editor......Lets just wait and see....
Hi
Try this one- it is saved unlocked.
And what about on your iPad? The Editor isn't 'perfect' in Run mode . . .
The x and z vars do the 'set/get' stuff together with the knob script and would need to be edited correctly to work - best left alone . . .
MM
KnobLed_unlocked.jzlib
Try this one- it is saved unlocked.
And what about on your iPad? The Editor isn't 'perfect' in Run mode . . .
The x and z vars do the 'set/get' stuff together with the knob script and would need to be edited correctly to work - best left alone . . .
MM
KnobLed_unlocked.jzlib
Same thing with the unlocked version you sent too!
I dont have the iPad with me right now but I can surely test it in a few hours and report back!
I could only make it work if I edit the container x,z expressions to something as simple as
x=Knob.x
z=Knob.z
I dont have the iPad with me right now but I can surely test it in a few hours and report back!
I could only make it work if I edit the container x,z expressions to something as simple as
x=Knob.x
z=Knob.z
A side question....
I have tried in the past in a multiline script:
Knob.x=Knob2.x=1;
And the editor wouldnt let me use two ermmmm "=" signs yet I see you use them in the expressions......
Is the above supposed to be "legal" in Lemur scripting?
I have tried in the past in a multiline script:
Knob.x=Knob2.x=1;
And the editor wouldnt let me use two ermmmm "=" signs yet I see you use them in the expressions......
Is the above supposed to be "legal" in Lemur scripting?
Hi
No - I am pretty sure assignment is 'binary', only 2 args messages used . . .
Ahh - No, That is part of a shorthand 'if/then/else' <if>?<then>:<else> . . .
Thats the part the does the setting, so yo can address the module normally i.e. KnobLed.x=0;
Cheers
MM
And I am pretty sure it should just be a windows issue (I hope)
No - I am pretty sure assignment is 'binary', only 2 args messages used . . .
Ahh - No, That is part of a shorthand 'if/then/else' <if>?<then>:<else> . . .
Thats the part the does the setting, so yo can address the module normally i.e. KnobLed.x=0;
Cheers
MM
And I am pretty sure it should just be a windows issue (I hope)
I'll test on my iPad and report back......
here's what I have though.......
x= x![size=150]=[/size]Knob.x?Knob.x=x:x
z= z![size=150]=[/size]Knob.z?Knob.z=z:z
I noticed the first "=" (in bold) hence my question above!
here's what I have though.......
x= x![size=150]=[/size]Knob.x?Knob.x=x:x
z= z![size=150]=[/size]Knob.z?Knob.z=z:z
I noticed the first "=" (in bold) hence my question above!
Hmm
Definitely Windows prob then I'd say . .
And does it do that if you type it in yourself?
It should be an 'if then else' command and it will play up if the 'not equals' is not evaluating properly.
On iPad it will be fine . . .
MM
Definitely Windows prob then I'd say . .
And does it do that if you type it in yourself?
It should be an 'if then else' command and it will play up if the 'not equals' is not evaluating properly.
On iPad it will be fine . . .
MM
Ahaaaa now I get then
If x!=Knob.x then x=Knob.x else x=x....
No wait a minute.....shouldnt it be:
x=x!=Knob.x?Knob.x:x
I have in the editor
x=x!=Knob.x?Knob.x=x:x
the logic of which I still cant comprehend......
Damn Im confused.......
BRB after testing with iPad
If x!=Knob.x then x=Knob.x else x=x....
No wait a minute.....shouldnt it be:
x=x!=Knob.x?Knob.x:x
I have in the editor
x=x!=Knob.x?Knob.x=x:x
the logic of which I still cant comprehend......
Damn Im confused.......
BRB after testing with iPad
Official results:
Windows 7 32 bit, editor in "e" mode - not working, the knob does not respond to cursor or responds erratically
Windows 7 64bit, editor in "e" mode - not working, the knob does not respond to cursor or responds erratically
iPad 2, latest iOS, latest Lemur - knob does not respond to cursor or responds erratically
I think that the following
x!=Knob.x?Knob.x=x:x
means if x is not equal to Knob.x then Knob.x=x BUT all this is used in defining the x (KnobLed.x) expression so essentially it returns
x = Knob.x = x
and this causes the problem
(and the same of course for KnobLed.z and Knob.z)
Windows 7 32 bit, editor in "e" mode - not working, the knob does not respond to cursor or responds erratically
Windows 7 64bit, editor in "e" mode - not working, the knob does not respond to cursor or responds erratically
iPad 2, latest iOS, latest Lemur - knob does not respond to cursor or responds erratically
I think that the following
x!=Knob.x?Knob.x=x:x
means if x is not equal to Knob.x then Knob.x=x BUT all this is used in defining the x (KnobLed.x) expression so essentially it returns
x = Knob.x = x
and this causes the problem
(and the same of course for KnobLed.z and Knob.z)
Ok
Seems theres a problem with it in last releases . . .
I forgot I was on beta versions -sorry ...
Damn - I probably should have waited . . .
MM
Seems theres a problem with it in last releases . . .
I forgot I was on beta versions -sorry ...
Damn - I probably should have waited . . .
MM
No problem...The good part is it isnt a problem related to OS (editor) or to specific user iPad configuration.
Nice work guys.
Be great to get this one sorted, it looks like very interesting code with great potential for the concept of modules generally, if I'm not mistaken.
I was thinking of ways to make modules this self-contained but lacked the scripting chops to do it programmatically so this is gold, Jerry! GOLD I tells ya!
Be great to get this one sorted, it looks like very interesting code with great potential for the concept of modules generally, if I'm not mistaken.
I was thinking of ways to make modules this self-contained but lacked the scripting chops to do it programmatically so this is gold, Jerry! GOLD I tells ya!
Hi
Yeah part of the idea I was hoping to present here was just that - Object 'subclassing' - or drop in replacements that get used like normal objects . . .
So getting/setting etc does not need to delve any deeper than the first level, and as much as possible is hidden away . . .
Also the easy resizing makes them more reusable without delving into the objects construction
And also to expand on that in terms of 'inlined' objects and 'external lib' objects as an approach to Module design and use . . .
This module is inline- all the scripting is repeated in every module; an external version has most of the functions in a library once that get calls from objects.
Inline is fine for a few objects but may be wasteful if you are using a lot of them, in which case Libraries are better . . .
May start a thread for discussion of general Module design principles, implementation and use . . .
Yeah part of the idea I was hoping to present here was just that - Object 'subclassing' - or drop in replacements that get used like normal objects . . .
So getting/setting etc does not need to delve any deeper than the first level, and as much as possible is hidden away . . .
Also the easy resizing makes them more reusable without delving into the objects construction
And also to expand on that in terms of 'inlined' objects and 'external lib' objects as an approach to Module design and use . . .
This module is inline- all the scripting is repeated in every module; an external version has most of the functions in a library once that get calls from objects.
Inline is fine for a few objects but may be wasteful if you are using a lot of them, in which case Libraries are better . . .
May start a thread for discussion of general Module design principles, implementation and use . . .
What troubles me with this approach is whether the extra programming required for such "enclosed" modules is justified in terms of "processing economy". I mean, if we need ten lines of code-script for somethin that we could just go into a lower level (as end users) and set manually, isnt it a better option in terms of having a "lightweight" final template?