Data Types

This article is here to teach you about the data types in Wire. If you have no experience with coding or programming you have come to the right place.  This won’t be hard. As a matter or fact, the first datatype we’ll explain is as easy as flicking a light switch.


Boolean

Are you gonna be my Bool, true or false?

The Boolean(Bool for friends) can only be in either one of these two states. True or False. 1 or 0. On or Off. Like a light switch. 

In Wire booleans can be used to turn certain features of a node on or off. Like the bypass on an effect. Booleans can also be used in conjunction with a Switch or a Gate node to literally make a light switch operation. Maybe use it to switch between two shapes?

When a boolean is converted into a float or integer it will be either 1(true) or 0(false). Now you can do math with booleans. Or simply have a toggle to add 1 to a certain value.

Booleans can be converted to triggers using the If node.

Integers

Counting for beginners

Integers are like whole numbers, but they can be either positive or negative.

5 is an integers, as is -300 and 41200. 

5.3 is not an integer, neither is -12.60 or pi.

Integers are useful in conjunction with switches and gates to open a certain gate or switch. As well as when working with arrays to address a specific instance in the array.

Integers are converted to floats when they go into an inlet that expects Floats.

Floats

Down here, they all float

Float is short for floating point number, which is just a really fancy way of saying the number has a decimal point in it. It can be either negative or positive. Floats are used very frequently in Wire as many values will range between -1 and 1.

4.31 is a float, -15.12 is a float, the euler constant is a float.

5 is not a float, neither is -23 or your birthday.

There are four types of floats in Wire: Float, Float2, Float3 and Float4.

The higher float types have more elements. For example, a float3 could hold .2 , -.32 and .49218.

Float types can be constructed using the Float2/3/4 nodes or converted to using the To Float2/3/4 nodes.

Trigger

PEW! PEW!

Triggers are one shot events that trigger certain actions in nodes. In the example below you can see the Transport Beat node sending out a trigger each 1/4 beat. This triggers the Attack Release node to blow up the radius of the circle.

Triggers can not be converted into numbers. They are great for BPM-synced effects, reset buttons and one-shot features.

Triggers can be converted to booleans by using the Toggle node.


Shape2D

Pretty stuff in the making

Internally Shape2D is a whole range of coordinates that tell your GPU how to draw it. Because Of this we can do all kinds of cool modulation to it without destroying its integrity. You can blow up a circle 10 times in size and still it will not pixelate like an image or video (Texture2D) would.

When creating generative content, you want to stay in the Shape2D as long as possible to maintain flexibility. Once converted to Texture2D you are working with pixels and working destructively. 

Note that video effects will accept Shape2D as an input. But they will convert your shape to Texture2D in the process. 

Shape2D nodes can be converted to Texture 2D by using the Shape Render. Multiple instances of a shape can be merged together into one channel by using the Merge node.

Texture2D RGBA

All the pretty stuff

Texture2D are all your images, clips, shaders and converted shapes. 

Once you are working with Texture2D you are working in pixel space. So when moving a Rectangle Shape to the left side of the screen would take a value of -1, moving that same shape as a Texture2D on a resolution of 1920x1080 would take a value of -540.

Texture2D Channel

Spliting the pretty stuff

Texture2D RGBA can be split into seperate red, green, blue and alpha channels. You can use the Unpack node to achieve this. Channels can be recontructed to Texture2D RGBA by using either the Texture or To Texture nodes.

String

It’s not a thong!

Strings are a datatype that contains text. You can use strings with the Print node to send them to the Log. In the future you will be able to send Strings to a text generator that will convert your strings to textures.

Geometry 2D

 Euclid would be proud of you.

Geometry 2D contain vertices that will contruct simple geometrical forms like rectangles, circles and triangles. Geometry is one of the building blocks of a 2D Mesh.

The cool thing about geometry? Your GPU can generate hunderds of them without breaking a sweat!

Mesh 2D

Let's get meshy

A Mesh2D is constructed from Geometry2D, Transformation2D and Material. The Mesh 2D node will take these signals and turn it into a mesh. The material will be projected onto the geometry and the transformation2D signal will move, scale and rotate it.

Mesh2D can be converted to Texture2D RGBA using the 2D Render node.

Transformation 2D

Many moves in a small package

Transformation 2D can be supplied to the Mesh 2D node to rotate, move and scale the meshes. 

Material

Materialism at its finest

Material is used to take a texture and project it onto a geometry by creating a mesh. The Texture Material node will help you to create materials.

MIDI

The language of control

MIDI is a communication standard for synthesizers and controllers. Wire can receive MIDI by using the MIDI input node and send out MIDI messages with the MIDI output nodes. You can construct MIDI messages by using the MIDI Write nodes.


OSC

Ultimate control

OSC is another communication standard. It is slightly more complex than MIDI, but is more flexible. Wire can both read and write OSC for you. To learn more about OSC check out our article on OSC (https://resolume.com/support/en/osc)


Slice

A little piece of you

Wire has multiple ways to manipulate Slices you create in Resolume’s Advanced Output. Wire can convert your slices into shapes and textures.



相关文章