PDA

View Full Version : MFC template for Freeframe source plugins (try it!)


victimofleisure
27th July 2006, 08:43 PM
After I wrote the Whorld source plugin, I got the idea that it would have been handy to have some kind of template project to start from, along the lines of "TODO: add your drawing code here". I looked at the FreeFrame SDK, but it wasn't quite what I had in mind. I wanted something optimized for writing source plugins, rather than effects. Specifically, I wanted the template to mirror the structure of a typical MFC graphics app, with a surrogate main frame and view, so that drawing code could be transplanted from an app to a plugin with minimal modifications. For example, in Whorld, the view uses the exact same source file in both the app and plugin; the differences are simple enough to be managed with #ifdefs.

So I finally got around to making the template project. It's called FFSrcPlug. It has a rudimentary demo view which draws a bouncing ball, and it exposes a single Freeframe parameter (the ball speed). The plugin DLL and the template project sources are in the same zip file, which is here:

http://whorld.org/temp/FFSrcPlug-1.0.0.zip

I've only tested FFSrcPlug.dll under TZT and Resolume. If you can test it in other hosts and post the results here, I would be grateful.

Speculation: could it be that part of the reason why Freeframe source plugins aren't so common is because there wasn't a clear example to start from? If that's so, maybe this template will spark an explosion of cool source plugins! You never know...

Chris Korda
http://whorld.org

sleepytom
27th July 2006, 10:08 PM
wow thanks Chris :)

the sample plugin works in VJamm 3 and in VJOgold

Can i include this template in the offical sourceforge freeframe downloads?

MoRpH
27th July 2006, 11:11 PM
Awesome work Chris. Are you on Opentzt.com forums yet? Do you mind if I mirror you post over there so some other opentzt users can get inspired?

hamageddon
27th July 2006, 11:31 PM
chris hereby nominated for freeframe innovation award :)

and yeah i'm beating the dead horse again! ;)
http://www.vjforums.com/showthread.php?t=9297&highlight=screensavers
let's have more freeframe synthesizers, why can't we take it from here?

DrEskaton
28th July 2006, 08:45 AM
this is great...

is anyone game to try and convert this into an xcode project for mac ppls?

karl?

karl
28th July 2006, 11:25 AM
this is great...

is anyone game to try and convert this into an xcode project for mac ppls?

karl?

Sure, lend me a mac :-)

karl
28th July 2006, 12:39 PM
I'll talk to Intrinsic if I can borrow his mac again, thenagain I think I got a XCode FF skeleton some where in the closet...

k

karl
28th July 2006, 12:47 PM
Sorry Doctor, the skeleton in my closet are GCC scripts, no XCode there :shrug:

k

karl
28th July 2006, 01:00 PM
Compile freeframe:

gcc -DTARGET_OS_MAC -c -O3 FreeFrame.cpp -o FreeFrame.o -include MyEffect.h


Compile your effect:

g++ -DTARGET_OS_MAC -dynamiclib -O3 MyEffect.cpp FreeFrame.o -o MyEffect.o -include MyEffect.h


Make OSX dist:

mkdir MyEffect.frf
mv MyEffect.o MyEffect.frf/MyEffect
rm FreeFrame.o


The defs I needed to compile Intrinsics Win32.cpp and .h files on OSX:

#include <Carbon/Carbon.h>
#define __stdcall
#define APIENTRY
typedef unsigned char BOOL;
typedef Handle HANDLE;
typedef void* LPVOID;
#define BYTE UInt8
#define WORD UInt16
#define DWORD UInt32
#define LARGE_INTEGER UInt64


copy the MyEffect.frf folder to your say isadora's plugin folder

You now got a OSX FreeFrame effect!

k

victimofleisure
29th July 2006, 06:17 AM
>>>Can i include this template in the offical sourceforge freeframe downloads?

Yes, please!

>>>mirror you post over there so some other opentzt users can get inspired?

Yes again! I'm on the TZT forums, but it didn't occur to me to post there.

>>>freeframe innovation award

YAY!:sun:

tonfilm
29th July 2006, 02:22 PM
hi, how do you create the outputs of the FF plugin? meso created some motion tracking FF's with the output specification you find here: FreeFrameExtendedSpecification (http://www.vvvv.org/tiki-index.php?page=FreeFrameExtendedSpecification+)

its very useful to find a common way to create FF outputs...