trying to get to grips with Array editing - PraxisLive

13 views
Skip to first unread message

Scott R. Looney

unread,
Jul 8, 2019, 8:49:24 AM7/8/19
to PraxisLIVE software discussion group

hi Neil! this is a lovely tool you have going here. really enjoying for the most part but it really needs a decent help guide with screens for dealing with the basic core blocks. i'm not as interested in live coding, but i have enjoying tinkering around with the dataflow editor view and adding and configuring components. i'm using the random component to select from a group of videos but i wanted more precise location control on a video, so i thought i would use the array editor so it would randomize to specific locations. but i don't have any idea how to make an array that Praxis Live understands. i just get a blank screen where i type something. i saw a post earlier where you put values in an array like "1 2 3 4 5", so i'm doing this for position values but it doesn't seem to be working. actually one other question i would like to know is if there's a console printing command so i know if the value is being sent. that way i'd know if a component was spitting out the right values. but the Array Editor is my main issue. anyway whatever you can do to help would be lovely - thanks!

best,
scott

Neil C Smith

unread,
Jul 8, 2019, 9:00:36 AM7/8/19
to Praxis LIVE software discussion group
Hi Scott,

Welcome! Comments inline below.

On Mon, 8 Jul 2019 at 13:49, Scott R. Looney <scottr...@gmail.com> wrote:
> hi Neil! this is a lovely tool you have going here.

Thanks! :-)

> really enjoying for the most part but it really needs a decent help guide with screens for dealing with the basic core blocks.

I realise it's not everything you're looking for, but just checking
you have seen https://docs.praxislive.org/components-core/ and related
sections?

> i'm not as interested in live coding, but i have enjoying tinkering around with the dataflow editor view and adding and configuring components

That really depends what you mean by live coding! ;-) PraxisLIVE is
primarily meant to be a live project development tool. Live coding as
in performing with code is supported by that, and something I
personally do, but that's never been PraxisLIVE's only or primary
reason for being.

> i'm using the random component to select from a group of videos but i wanted more precise location control on a video, so i thought i would use the array editor so it would randomize to specific locations. but i don't have any idea how to make an array that Praxis Live understands. i just get a blank screen where i type something. i saw a post earlier where you put values in an array like "1 2 3 4 5", so i'm doing this for position values but it doesn't seem to be working. actually one other question i would like to know is if there's a console printing command so i know if the value is being sent. that way i'd know if a component was spitting out the right values. but the Array Editor is my main issue. anyway whatever you can do to help would be lovely - thanks!

The position value is normalized, so between 0 and 1. So none of
those values would work, but "0.1 0.2 0.4 0.6" should. However, try
this without changing the video first. It might be an interaction
with that causing a problem.

There's no console out node, but you can add in code `log(INFO, "Value
is " + value);`

Or sticking just with nodes, use a core:variable and connect to that
as well to peek on values. I'm working on an improvement that will
add an option to display node property values on the graph node
itself.

Hope that helps.

Best wishes,

Neil



--
Neil C Smith
Artist & Technologist
www.neilcsmith.net

PraxisLIVE - hybrid visual live programming
for creatives, for programmers, for students, for tinkerers
www.praxislive.org

Scott R. Looney

unread,
Jul 9, 2019, 4:03:40 AM7/9/19
to PraxisLIVE software discussion group

ok i'm still not seeing how this works. editing in the Array Editor is so frustrating. let's say i have 5 locations i a video i would like to randomly switch between. what's the flow of components to get there? in my example i have a container whose job it is to contain all the functions of one video player. so inside the container it seems i would order the following (i'll use square brackets like PD users do):

[start trigger] -------------------------[>play input on [video player1] ]
   |
[timer]----------------[>trigger in [random] with array values "0.2 0.4 0.8 0.314"]-----------[>position input on [video player1] ]

if the [random] component was looking for a folder of files this works fine when using the [>video input on the [player]. but as an array of values it doesn't work. i want [random] to randomly pick a value from the array and apply it to [>position. is there something i'm missing? is there a special format so that [random] knows to select one number from the array each time it's triggered? should i be delimiting them differently so that [random] can recognize each value as an index number and randomly switch? maybe i need a second [random] object generate the index number? i think a bit of tutorial on proper array editing would be very helpful. the [variable] component doesn't really help as it just shows all array values at one time. appreciate any enlightenment on this - thanks!


Neil C Smith

unread,
Jul 9, 2019, 4:17:16 AM7/9/19
to Praxis LIVE software discussion group
On Tue, 9 Jul 2019 at 09:03, Scott R. Looney <scottr...@gmail.com> wrote:
> editing in the Array Editor is so frustrating.

Agreed! A new array editor is on the horizon. Although, you can just
type the numbers into the property field directly too.

> should i be delimiting them differently so that [random] can recognize each value as an index number and randomly switch? maybe i need a second [random] object generate the index number? i think a bit of tutorial on proper array editing would be very helpful. the [variable] component doesn't really help as it just shows all array values at one time.

Are you putting quotes in the array editor?! The variable should show
just one value from the array at a time. If it shows the whole array,
then it must be quoted in some fashion so that there's actually only
an array with one element.

Scott R. Looney

unread,
Jul 9, 2019, 5:34:45 AM7/9/19
to PraxisLIVE software discussion group
i've done both - editing in the editor and directly inputting values. but to answer the question my array was exactly typed like "0.2 0.4 0.8 0.314" with the quotes included. so [variable] seems to think the whole thing is one value. should i be typing this without quotes? i'm used to C# where i'd declare a float array with:

float[] somearray = new float[] {0.2, 0.4, 0.8, 0.314}

should i just be typing what appears between the curly brackets?

Update : allright i think i figured it out. each element requires a separator and a quote like "0.2," "0.4," "0.8," 0.314

makes sense except for the last element not having any quote. i tried enclosing that last one in quotes but it put a / at the end instead. this is what i mean in terms of documentation. if the docs had mentioned that arrays needed to be formatted a certain way it would really help. the idea to use quotes and a comma for each element is pretty non-intuitive, to me at least. it does do some autocorrection, but it will frequently put in escape '/' characters if it gets confused which seems to break that element being recognized, and undo is largely non existent.

anyway i think it seems to be getting one variable at a time, so i believe that's got my question answered. thanks!

best,
scott

Neil C Smith

unread,
Jul 9, 2019, 5:44:24 AM7/9/19
to Praxis LIVE software discussion group
On Tue, 9 Jul 2019 at 10:34, Scott R. Looney <scottr...@gmail.com> wrote:
> Update : allright i think i figured it out. each element requires a separator and a quote like "0.2," "0.4," "0.8," 0.314

No, that's still incorrect. It's just plainly written, space separated values.

ie. just type in

0.2 0.4 0.8 0.314

It's the same as you'd use in eg. a shell script, rather than like Java / C#
Reply all
Reply to author
Forward
0 new messages