Page 1 of 2

Knobs & Values displayed

Posted: 14 Nov 2012 18:57
by julien
Hi there,
I'd like to display values from a knob but not raw ones (from 0. to 1.)
Basically, I want to display string values instead of numerical.
from 0 to 0.1 I want to display 1/32
0.1 to 0.2 I want 1/16
etc

any easy way for that ?

Re: Knobs & Values displayed

Posted: 15 Nov 2012 00:56
by Macciza
Hi
Lots of different ways
Nested if statements are one way . . .
You can set the values in an array, globally perhaps, {'1/32','1/16'} you need quotes to return strings . .
and reference that instead ~ array[1] for "1/16" . . ..
Maybe even a global function displaying float_as_timediv if you are doing it a lot . . .
Cheers
MM

Re: Knobs & Values displayed

Posted: 15 Nov 2012 07:51
by julien
Hi Macciza,
okay totally got it.
not totally, global stuff needs to be declared where?

Re: Knobs & Values displayed

Posted: 15 Nov 2012 13:19
by Macciza
Hi
Just a reminder that things have scope - stuff declared at Project level is essentially global
But stuff can also be defined locally within objects and over-riddden as well

Some choose to put user functions and arrays into a container called functions, _func or similar and access them from there . .
ie setting a Monitors value _func.as_time_val(Knob.x) or using
or you can have a lot in the root directory and then just use them directly.
It depends on how you are approaching/structuring your programming I guess . . .

Hope that helps
MM

Re: Knobs & Values displayed

Posted: 15 Nov 2012 13:45
by julien
Yes I checked that.
Indeed, it is even represented visually in the bottom right part with that tree structure.

In my case, I would have some functions like that.
I guess I would trig the calculation as soon as the value of the knob changes.

But I'm still stuck.
Can I have multiple lines scripts ?

I guess I have to put a value like that, on my knob :
= f(x)

where f is my global function, right?

Re: Knobs & Values displayed

Posted: 16 Nov 2012 01:49
by Macciza
Hi Julien
Yes - That is one of Lemurs strengths, its scripting
The 'Internal' section of the tree structures shows most of the builtin functions
Define your own at varying levels using the 'Script' button at the bottom,
Also many/most of the parameter fields will accept logical statements as well

Check out the User Library at http://liine.net/en/community/user-library/
There are several DJ/Live Projects there.
As I mentioned earlier Lemurs strength is it's scripting
Do you want one Project that will cover 15 songs with a common interface . . .
Or do you want 15 different interfaces ? One for each song, tailored to it specifically?
Or something in between? A general central interface with optional extras on call?

Cheers
MM

Re: Knobs & Values displayed

Posted: 16 Nov 2012 08:31
by julien
I made a basic setup with 3 interfaces and some tabbed containers.
I still didn't go further because of schedule/time.

I'll perform there: http://creativetechnologylive.wordpress.com and again at a couple of events where I'm living, France.
Then I'll dig scripting on Lemur.
I'm currently more into scripting/patching in Max on the computer side and using Lemur for basic remote control and feedback.

Re: Knobs & Values displayed

Posted: 17 Nov 2012 01:35
by Macciza
Hi

Ultimately, using both Max,M4L, SC whatever, in conjunction with Lemurs scripting gives the most power.
Being able to 'offload' tasks to Lemur makes things far easier in many situations, simplifying what you need to do on both sides. Lemur can act like hardware and give complex responses to simple input ie. color response to velocity, flashing etc

Would be good if you could write up a review of what you are doing, and post it here on the Forum . . .

Cheers
MM

Re: Knobs & Values displayed

Posted: 17 Nov 2012 09:00
by julien
SURE.
I wanted to make a post on my blog about my system.
But as I wrote, it is very simple.
I'm using only a clip matrix mapped to ableton live + a bunch of knobs/faders mapped statically through MIDI.

Re: Knobs & Values displayed

Posted: 17 Nov 2012 09:26
by Macciza
No worries

I guess sometimes simplicity is also another key . .
Being able to make just what you need and no more is powerful too!
Cheers
MM