Using line with variables
The helpfile that comes with the line object describes various ways you can linearly move between two numbers, it explains how to use variable time values, but it doesn't explain variable destination values, can anyone help me with this?
for example a volume fader on an interface, the destination values are constantly going to change as the user wants to change things.
cheers
Aid
this was a bit of a dumb question, it wasn't as difficult as i expected, I've just created a line object with no additional arguments, time value goes into the middle inlet and a variable destination value can go into the left inlet
You could also [pack] your variables into destination-time pairs. This way the time setting is remembered and doesn't have to be set again each time you change the destination value.
lh
ah, sorry to be misleading :P
actually this doesn't work!
in between your number and the line object, use a message box saying $1 5
$1 is a variable - it'll be replaced with any number the message box recieves. 5 means 5 milliseconds. connect the message box to the first inlet of line (or line~) and it'll fade to any value you send to the message box over 5ms. obviously write $1 20 or whatever if you want a longer fade time.
simple!
Quote: Zh wrote on Sun, 14 December 2008 16:39
----------------------------------------------------
> in between your number and the line object, use a message box saying $1 5
>
> $1 is a variable - it'll be replaced with any number the message box recieves. 5 means 5 milliseconds. connect the message box to the first inlet of line (or line~) and it'll fade to any value you send to the message box over 5ms. obviously write $1 20 or whatever if you want a longer fade time.
> simple!
----------------------------------------------------
I'm pretty sure line doesn't like this, I found a really easy way to do it eventually;
slider (or rotary/int etc) goes into the first inlet of line, and also goes into a bang message, the bang message then goes into a message box with your desired time value
every time you move the slider you trigger the bang message and the output of line will linearly travel to your new destination value :)
thanks for your help guys... I would like to understand pack a bit more can anyone point me to a good source or otherwise?
Quote: Zh wrote on Sun, 14 December 2008 16:39
----------------------------------------------------
> in between your number and the line object, use a message box saying $1 5
>
> $1 is a variable - it'll be replaced with any number the message box recieves.
----------------------------------------------------
sorry to be more specific, line doesn't seem to like $1 variables, I might be wrong!
This does work.
Quote: AidanTek wrote on Tue, 16 December 2008 12:42
----------------------------------------------------
> Quote: Zh wrote on Sun, 14 December 2008 16:39
> ----------------------------------------------------
> > in between your number and the line object, use a message box saying $1 5
> >
> > $1 is a variable - it'll be replaced with any number the message box recieves.
> ----------------------------------------------------
>
> sorry to be more specific, line doesn't seem to like $1 variables, I might be wrong!
>
----------------------------------------------------
agreed
it might be easier to see what's happening if you change the message
from "$1 20" to "$1 2000"
this way line will ramp to the new variable over 2 seconds, instead of
20 ms
--Sam
On Dec 16, 2008, at 5:06 AM, fairesigneaumachiniste wrote:
>