Ctrl+B For Concurrency

March 13th 18:23
by why

Photo by Golan Levin.

I’ve walked away from ART & CODE in Pittsburgh with a pile of new hackers to idolize. Krikey, the things these artists are doing while everyone else is rewording their unit tests and staring at the TIOBE index. My mind has been shredded into wispy, semi-autonomous ribbons.

One profound change of mind for me is this: I haven’t given visual languages a fair shake. These languages (such as Max/MSP and vvvv) aren’t just good languages. To watch someone code fluently on a canvas just looks completely natural. And, particularly in the case of vvvv, you have a language which moves effortlessly between visual and textual. (I’ll cover that more next week.)

vvvv defies so much of the usual criterion. The thing runs only on Windows and is written in Delphi. For scripting, it embeds a language called HLSL. (Who really cares, though. No one’s going to put away Zelda if we ever found out it had some Visual Basic in it.) Sebastian wasn’t apologetic of Delphi, he doesn’t seem to know bout the language wars, and I was more than happy to forego the opinions.

Photo by Marty McGuire.

Yes, that’s Sebastian Oschatz in the green scarf. He is normally joined by Max Wolf, Sebastian Gregor and Joreg, who comprise the rest of the vvvv team.

As you can clearly see, he’s a nice, gentle fellow who believes in visual coding and kept needling me all weekend to cross over to their side.


A vvvv program looks like this.

And the output can be, well, anything beautiful at all.

(Oh and if you plan to install vvvv, be sure to read the Installation Issues notice at the bottom of the download page. DirectX gave me problems until I slowed down and gave all those points my full attention.)


One astounding feature of vvvv is a thing they call boygrouping. (An allusion to the precision that can only achieved by young pop stars thanks to the gift of the hands-free mic.)

He drove the point home with this photo, taking care to point out the sublime positioning of the hands. Imagine each hand is a box running vvvv.

So, let’s say you have a taxing operation in vvvv that you want to farm out to an armada of machines, all of whom are listening intently. Or, more commonly, you might be spreading an animation out between displays, but keeping the timing unified.

Every node in vvvv has a set of inputs (at the top of the node) and and a set of outs (at bottom.) You simply highlight the nodes you want to boygroup and hit Ctrl+B.

And they turn blue. Syntax highlighting, let’s call it.

The input value coming into the LFO node (a single toggle button value) gets marshalled and broadcast over UDP periodically to the group. Only primitive data types are transferred (numbers, strings, colors) and the highlighted nodes are executed on all slaves. If you discover that too much data is being passed around, maybe the block you chose isn’t working spread out, you can simply re-highlight and Ctrl+B to try a different set of ins and outs.

Each machine in the boygroup has its own ID, so you can selectively pass data to certain machines and choreograph with finer control.

If you’re running vvvv right now and hitting Ctrl+B and wondering why you’re not suddenly controlling a fleet somewhere on Earth, bear in mind that you have some setup to do in advance. (Namely, running vvvv with either /client or /server flags, then initiating a connection with each machine.)

Abstracting concurrency away to a hotkey. Can you believe that? Wild. There’s more even. And I’ll get into it next week.

Now begin the comments …

23 comments

Carlo Cabanilla

said on March 13th 13:53

Have you ever played with Quartz Composer on OSX ? It’s also a visual programming language similar to the one you describe.

Agree with Carlo

said on March 13th 15:37

Quartz Composer is worth checking out.

oh man

said on March 13th 15:39

ok those 2 little kids in the front row of the top photo make me feel old … and I’m only 28 ….

_why

said on March 13th 17:04

Good, glad you mentioned Quartz Composer. In a way, vvvv is a lot more minimalistic than Composer. For instance, you have iterators in Composer. Whereas vvvv doesn’t have any kind of looping!

Sebastian said they held off adding it and never ended up needing it. A truly unbelievable statement, until you see that vvvv itself is just a giant loop. More on that next week, I have a lot more to tell you.

Klondike

said on March 13th 18:09

To be honest, I hadn’t really noticed vvvv the same way you did — perhaps because I was just extremely tired. I definitely got distracted through that particular session. But you’re really selling me on it. Your points about the hotkey for concurrency make more sense when laid out and explained in writing and pictures, too.

It seems like a merger between Processing (focus on visual transformations, but text based language) and Max/ MSP (focus on audio transformations, but visually based language). I’m interested to see more posts on it, and anything you do with it.

RJ Ryan

said on March 13th 20:15

HLSL isn’t really a scripting language :) it’s a shader description language for DirectX so you don’t have to write your shaders in GPU assembly.

Brandon

said on March 13th 20:24

I didn’t get your comparision between HLSL & VB. HLSL is about as hardcore as you get (short of asm). You’re writing programs that run on a GPU using massive parallelism. VB is, well, not hardcore at all.

"GRUNNUR"

said on March 13th 20:51

Brandon: The comparison was between VB and Delphi, it seemed to me.

Zorbid

said on March 13th 20:54

Could it be that neither of them is exactly… elegant :-p

Zorbid catching up

said on March 13th 20:55

I was replying to Brandon..

_why

said on March 13th 22:59

Sure, I’m still new to HLSL and its use in vvvv. Sebastian seemed to use HLSL much like a scripting language (in that he translated some visual code into textual) and the snippets he showed appeared to be something of a strongly-typed Javascript.

I’ll show a concrete example soon and you’ll probably be correcting my language and reclassifying things properly a second time.

Also

said on March 14th 01:51

Check out Alice http://www.alice.org/

programming with characters from the Sims. Concurrency included!

Cane

said on March 14th 03:41

Talking about “Art & Code”, and beginners… when will you update the Hackety Hack site and release the new version?
The anticipation is killing me. ;)

Simon Strandgaard

said on March 14th 08:00

…concurrency, very clever!

relevant shameless self-promotion…

I have made a long list of visual languages, with my own opinion to each of them (strongly biased).

I’m working on a similar program called GraphicDesignerToolbox (version 1 soon to be released).

aze

said on March 15th 11:38

thanks for the quote i’m touched you appreciate my work
best regards & code bless vvvv!

Andy

said on March 15th 15:04

How about the (open source) Field. It looks like a visual wrapper around Processing dressed in Jython. Or something.

failrate

said on March 15th 18:11

vvvv looks a lot like the shader tools one finds in various game packages, like unreal. It also looks a lot like werkkzeug [sp?], which is a very nice demo generator.

The ctrl+B concurrency switch, though? That’s just pure hotness :)

James

said on March 16th 10:43

wow thanks for pointing out Field and Graphic Designer Toolbox, GDT in particular is awesome because it looks like it can do what I was wanting to use Zborntoy (an After Effects plugin) to do, but couldn’t justify the price tag.

rbxbx

said on March 16th 20:07

not to be a lazy jerk, but how does vvvv compare to say, jitter (from the cycling74(max/msp)camp) ?

_why

said on March 19th 16:50

rbxbx: Jitter is a really nice setup for mixing and editing videos live, probably second to none. vvvv has some video support (like you can use FreeFrame plugins, for instance) but people mostly use vvvv for video graphics generation, both 2-D and 3-D.

With all of these kits (PureData as well,) it’s sort of about what kind of look you’re shooting for and what environment you feel comfortable in.

Kristleifur

said on March 23rd 16:05

Oh man, the “Meaning of vvvv” page is beautiful.

rbxbx

said on March 25th 15:12

@_why thanks for clearing that up. I wonder if vvvv will run in crossover…

MenTaLguY

said on April 7th 22:43

So now you see why us concurrent types are so keen on functional purity. :)

said on Mon DD HH:MM

* do fancy stuff in your comment.

PREVIEW PANE