Saturday, April 26, 2008

Production Strategy

For my drift 3 I intend walk from my home (~60th street) due west to 76th street and then head due south on 76th in a straight line. 76th/Cleveland starts as a residential area for a few blocks and then turns into commercial for a few blocks and then repeats. For my last two drifts I was pretty much exclusively in residential areas. For this drift I'm looking to find more "action" in terms of the footage I collect. My goal is to collect footage (exclusively video clips) that can be used in loops using the process I describe below. As far as sound goes I am going to attempt to use sync sound which I will also modify in the process below.


I would like to use Cinelerra's XML based EDL file format to create a improvisation based method of visual rhythm by way of Rock Band's Drum Kit. Which is a USB device designed for the Xbox360 gaming system. When you plug it in it detects a USB device but doesn't know what to do with it... Well in Windows it does but I'm using Linux so I have to find an alternative.

First, I needed to find software to access an Xbox360 controller on my computer.
I was able to locate a driver written to work with the Xbox360 controller but it didn't support Rock Band's devices. Lucky for me the device is pretty much an Xbox360 controller just not detected as one. I modified the driver to detect the device and treat it as a normal Xbox360 controller and it works!

Xbox360 Controller Source code;
xpad.h
xpad.c

My updated to xpad.c to work with Rock Band's drums

Then I wrote a program to simply log the input from the device into a text file
Button: X Time: ######

Where X is the button number and ##### is the time in milliseconds it was pressed at

Source code: joystick.cpp

Now that I had a log of input I needed to figure out what I wanted to do with it.
I wrote another program that took the log file and created a valid EDL data I could use with Cinelerra. The drum pad itself is 4 pads and 1 kick pedal. I decided to use the kick pedal as a “switch” so I could have 8 distinct actions for my input.

1 Go back 1 frame and create a freeze frame of that image until another button is detected
2: Go forward 1 frame and create a freeze frame of that image until another button is detected
3: Play video forward at normal speed of 30FPS
4: Play video in reverse at normal speed of 30FPS
5: Toggle flipping the video horizontally
6: Toggle flipping the video vertically
7: Jump to the last frame in the video clip (also doing a +1frame jumps to the first frame since it loops)
8: Jump to the middle frame of the clip

Source code: convert.cpp

The EDL format is pretty complex and I haven't found documentation on what does what so I had to basically run trail and error tests to figure out what did what. I was able to locate how to create simple layouts using the following format in the section of the file. Each follows the following format

<edit startsource="X" channel="0" length="Y"><file src="FILENAME"></file> </edit>
FILENAME is the video/image sequence to use
X is the frame to start at
Y is the length of frames to display

I was able to determine how to use filters/effects but it's not very easy to incorporate into my program as it's a complete different section of the EDL file and would require a lot more work to incorporate. Which is why for my flip methods I simply use a 3 additional prerendered clips to perform that task.

I'm attempting to create sync sound based on when I press a button but due to the design of my application it is just not feasible at this time to accurately sync sound.

Here is my "Base Case" Cinelerra project file to give you an idea of what one looks like.

No comments: