VL : My beginners questions from girlpower

Hello…

I’m just making a log of my VL beginners questions here (and will add answers too as I find them).

I hope it’s useful for others to read through if they’re getting started. I could also move this off-forum but the forum seems the most obvious place to put it for now.

Editor

How to open multiple VL editor windows

How to add subpatches / how to nest subpatches into one VL patch [girlpower/_Basics/DataStructure]

Can a pin be assigned to Create [girlpower/_Basics/ValueRecorder ValueRecorder’s ValueTrack has white IFrameClock pin]

YES → but must be set in the subpatch itself (check ValueTrack patch)

What is this little popout about?

image

It looks like something to do with Generic. There are no tool-tips on mouseover

Object Oriented

Can an operation be assigned to multiple Members

Can you see which members an operation is assigned to (Other than the colour)

Sometimes members seem to be nodes, whilst others pins. What is the difference?

Perhaps this:
image

How to code custom regions

image

It seems to be that the region becomes a delegate which is passed to the operator which is the region.

What is the process node?

It seems to be the ‘default’ node which comes with a Record?

Difference between Records and Classes?

Also : it might be better to use the terms ‘Classes’ or ‘Records’ in the tutorials rather than ‘Data types’ and ‘Data structures’. Or do we need to consider a notion of data types also?

How can multiple nodes be created in one patch?

This is generally done using Operations
You can select Operation from the NodeBrowser to create an Operation region

Interfaces

The Gray Book mentions that VL doesn’t support inheritance, but perhaps implementing an interface is something different?

V4 interop

How to select which operations are available from V4?

In the Attractor demo, the Attract and Attractor nodes are available in the V4 NodeBrowser, but not Displace or AttractByMany (or any extra operation you add). This is perhaps because Attractor is Generic (then also - where does the 2D-ness come from?

Spreading

Attract vs AttractByMany

In the V4 patch we see ‘Attract’, and in VL we see ‘Attract’ and ‘AttractByMany’. The ‘AttractByMany’ is called even if there is only a single slice in the V4 patch. This implies there is a mapping betwee nthe AttractByMany VL operation and the Attract V4 node definition.

Answer : The Attract and Attractor (Join) nodes are defined in the VVVV.Attractor.vl top level. Also this operation is not generic - which is perhaps why it is visible within V4.

Persistence / DataFlow

Can a field be mutated without being explicitly set using the pad input

e.g. if we were to implement our own collection in C# call it CustomList and then import it into VL, we have an instance of customList on a pad, and we want to insert a slice. In theory we wouldn’t then need to set the value on the pad again as the existing value would have been mutated.

Side-issue : would this also need auto-evaluate considerations? (Since the upstream is mutated, there is no downstream, and therefore perhaps the patch is not aware that the Insert action would need to be performed.

Maybe:?
image

Note : this might be bad design practise if we’re aiming for functional style

Does a value need to be ‘get’ in order to be ‘set’

image

doesnt work if we do:

image

The correct value from seek time will be output this frame, but wont be stored for later frames

Why does a Get output an instance e.g. GetKeyframes in _Basics/ValueRecorder

It’s possibly because the patch isn’t aware of whether the subpatch might be mutating the value, and therefore following the ‘mutate → output → pad input’ pattern, we must always output an instance.

This pattern in ValueRecorder/Playhead:
image
Appears to be equivalent to an =
or am I missing something?

1 Like

great collection…a couple of pointers if i may (beware that links to the gray book may not always have the full answer yet):

  • How to open multiple VL editor windows: not yet i’m afraid

  • How to add subpatches / how to nest subpatches into one VL patch: See Groups and Categories

  • What is this little popout about? It is called Operation Signature (sorry, pix still missing)

  • Can an operation be assigned to multiple Members: Not on purpose, but when this happens through inverence, you’ll see a warning. Behavior still undefined.

  • Can you see which members an operation is assigned to (Other than the colour): There is a Setting called ‘TooltipShowOperation’ which you can set to ‘true’

  • What is the process node? It is indeed the default node. It doesn’t “come” with a record though. See also Nodes.

  • Difference between Records and Classes? The idea is that “datatype” is the umbrella term for “records” and “classes”. See also Datatype Patches

  • How can multiple nodes be created in one patch? see above: groups and categories and Operations in general

  • How to select which operations are available from V4? See info about Exposing Operations and Datatypes

1 Like

and some more:

  • Attract vs AttractByMany: this is probably answered here
  • Can a field be mutated without being explicitly set using the pad input: yes, that is the main feature of mutability. “In theory we wouldn’t then need to set the value on the pad again as the existing value would have been mutated.” exactly. “this might be bad design practise…” depends on what you’re doing. the power of vl here is that it allows for both ways and doesn’t impose any ideas on the user. and with great power always comes great responsibility (for you the programmer in that case).
  • Does a value need to be ‘get’ in order to be ‘set’: the reason to this behavior is to be found in the IF in this case: in the true-case the if returns the seektime which is set to the Time pad. but then in the false-case the unconnected input of the IF is taken and written into the Time pad. (grrr…still no documentation on IF in the gray book)
  • Why does a Get output an instance e.g. GetKeyframes in _Basics/ValueRecorder: since the datatype ValueTrack is a class (ie. mutable), with any operation you apply to it, the state may change (vl has no way of knowing that) and therefore order of execution is important. that is why class member nodes basically pipe through the instance so that you can patch in a clear order of execution.

i’m afraid i don’t understand the last question with the distance and = in the screenshot.

1 Like

Wonderful! I’ll be looking at these more tomorrow.
In reference to the last question…
In the ValueRecorder/Playhead patch there’s a comparison in the patch which checks whether the distance between two float values == 0. I think this is only true if Loop Start == Loop End, so why not just use an = and get rid of the Distance. I guess I’m missing something.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.