Forum

Finished Patch for Party: anyone want to test and give me guidance?

Hi there, I’m a Newbie from a graphics background rather than a programming one so this is all new to me.

I’ve been using vvvv for a month now and thanks to the great tutorials
and searchable forums I’ve managed to understand enough to put together a patch that I’d like to use at a party.

So first off thanks very much for a great tool and thanks to all the people that help and
answer questions.

Currently the basics work so I thought I’d share it but it would be great if people could offer me any tips on how to optimise it and fix the frame rate issues I’m having.

What it does

A square grid of 16 Image Sequences will be projected on a wall for all the guests to see.
Just behind this wall is a laptop with a live webcam
The guests will press a big button and stand in front of the webcam (I’m using Space bar now)
It records a 3 second clip
This clip is then added to the grid being projected
This continues so that the grid is ever changing and everyone at the party can enjoy :)

How it works

-The User has only one input, pressing the Space Bar (although I’m thinking one big USB button might be cool)

  • Then there’s a count down to get ready and then they record a clip of 3 seconds (no sound)

-This is written as Images to 2 Folders

  1. “ImageSequences”
  2. “Grid”

ImageSequences: In here are 16 folders, each folder corresponds to one of the sections of
the grid. As new image sequences are recorded they replace the existing ones.

Grid: This folder is written to simultaneously and so backs up each and every image sequence
recorded.

(I tried using the VLC plugin and writing to video but this was way to slow and just jammed
my system, images work better.)

Problems/ What I’d like to test

1- I’m going to use just one laptop. I don’t have a projector or another monitor yet so it would be cool if someone could test this:
ie on One monitor the Webcam Renderer is Fullscreened and on the other the Image grid is Fullscreened

2- Framerates: the 3 second count down seems to be right but then as soon as it starts recording/writing images it seems like it’s recording longer than 3 seconds.

3- Playback frame rate: My Webcam is 25fps but the playback always seems off.

4- Should I buy another USB Webcam or would this make things slower? It doesn’t have to be the best quality or anything, it’s just for a party, a bit of fun.

Any help and input greatly appreciated

My Laptop which I’ll be using:
DELL LAPTOP STUDIO XPS 16 (1640)
Intel Core 2 Duo 3.06 GHZ, 1066MHz, 6MB (ACPI x64-based PC)
6144MB RAM (1x2048 + 1x4096) 1067MHx DDR3 Dual Channel
500GB Hard Disk (7200RPM)
Webcam - 2.0MP Integrated Webcam
Windows 7

WEBCAM_GRID.rar (7.1 MB)

hey, nice patch for a party ;-)
if you want to have real time play juste set main loop at 25pfs fore and backdground.
on each change of frame output from this node, call the next image inside your images loop. like this you will have the real farme rate.

nice patch for only 3 months of vvvv experience. it seems to work good, bravo!

now its about the details: if the webcam is on, your patch runs at the fps of the webcam, since you have wait for frame of the video texture set to 1. this is good, as its all sync then, but saving jpeg files is rather slow, this will probably not work in realtime (means the fps of your cam) and you even save them two times. so use bitmap, as they are the fastest to save (depending on the hdd). and don’t save them twice! you can just change the folder name of your 16 sequences… so, put all into one directory and load the appropriate folders… first 1-16, then 2-17, then 3-18 and so on…

and don’t forget to make your life easier with subpatches!

Thanks, I owe it all to this community though, I’ve been pulling apart other peoples patches they’ve posted here and all the help files to try and get what I need and figure out what I can.

tonfilm: Thanks for the feedback, I got rid of the saving twice part of the patch and tried .bmp and they are spot on realtime for writing and reading. Great!

So now I just have to work on implementing your idea of different folders, I’m not sure I quite understand what you mean, could you rough up an example?

With regards to me getting a USB webcam instead of using my built in cam, do you thin this would work speed wise or should I not bother?

Oh and subpatches, do you mean just to use them tp clean up my huge sprawling patch a bit?

Thanks again guys for helping a newbie.

Hello again, I can’t seem to get this working:

“so, put all into one directory and load the appropriate folders… first 1-16, then 2-17, then 3-18 and so on…”

But I’m not reloading whole folders at once, ie first I’m loading 1-16, but then when the next clip is recorded this will go into 17, so I actually want to load 2-17 next but I don’t want the layout of all of them to change each time so I guess I’d need:

17 to replace where 1 was, 18 to replace where 2 was etc… but I’m not sure how to implement this…

as long as the the usb cam has a decent frame rate you don’t have to bother.

yes, modularizing the patch according to its sub problems (display sequences, display record screen, save pictures, load pictures, …) clears things up, especially if you want to reopen it a year later.

with the folders i meant you can save the recorded image sequences in folders using for example the current time (using TimeToString (String) ) as name, and then you display always the sequences in the 16 latest folders (using Dir (File) and GetSpread (String) )…

Won’t this keep changing their layout though?

For example, if it were just a grid of 4 and these were the first folders displayed in their location on the grid:

0 3
2 1

If I create a new folder called 4 I would want it to display like this:
4 3
2 1
As in only the oldest location is replaced but it remains in the same location in the grid.
Then as a new folder 5 is created this is what I’d want:
4 3
2 5
etc…

Forgive me if I’m wrong but won’t your suggestion be like this to start:
0 3
2 1
But then have them all change locations as it plays the latest 4? ie:
1 4
3 2

Okay I think I’ve found a way to search and replace slices that I can use to get what I want.

SliceSearchAndReplace.v4p (7.8 kB)

Crap but I’m stuck in a loop…