Functions in Populate Variable Node

Questions and answers on how to get the most out of FFAStrans
Post Reply
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

Functions in Populate Variable Node

Post by novalis »

Hi there,
I'm stuck here a little with the following problem:
The loudness analyzer gives me an array of numbers to work with and to be able to do some further logic (compare them to target values etc) and log them out, I want to set the first item of each array as a new variable via the populate variable node.
This does not work however: If I set it to a string user var, I get the command once I log the vars out but not its output, like so:

Code: Select all

$readarray($jsonencode([-5.086133,-5.086133]),1)
If I use a float or int user var, I just get 0.
What am I missing here?
Thanks and best,
Lukas
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Functions in Populate Variable Node

Post by momocampo »

Hi Lukas,
I think you forgot quotes for values, you should try like this :

Code: Select all

$readarray("[-5.086133,-5.086133]", 1)
And the "1" behind values isn't necessary for you cause it's the default behaviour.So without, it will return the first value.


Cheers.
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

Re: Functions in Populate Variable Node

Post by novalis »

Hi Momocampo,
thanks a lot! That fixed it
Post Reply