Archive for October 28th, 2008

28
Oct
08

soundFlower Update

I realised I hadn’t spent enough time optimising the controls of my tb soundFlower qcClip, so I’m uploading an updated version. Same effect, but the control ranges make a bit more sense, and the audio-response is a bit better.

Also, I didn’t mention in my previous post that you need the excellent Kineme Audio Tools plugin to run this QTZ.

New version in the Box.net widget ‘tb soundFlower 1.01.qtz’

Advertisements
28
Oct
08

tb MetaImage Update (CIFilter Code)

Updated version of the Meta-Image filter I did ages ago, originally based on one of Pete Warden’s original free FreeFrame effects. This one has a couple of nice new options and the whole thing has been implemented in a single CIFilter patch, this time.

CIFilter Kernel Code:

/*
	'Meta-Image' effect.
	Original image is scaled and tiled, optionally recoloured
	by multiplication with colour of centre pixel of each tile.
	Based on original FreeFrame effect by Pete Warden.
	
	toneburst 2008
	https://machinesdontcare.wordpress.com
*/

///////////////////
//   Pre-zoom    //
///////////////////

kernel vec4 vvZoom(sampler Image, vec2 Center, float Level) 
{	
	// Based on VVZoom effect, from
	// http://www.vidvox.com/phpBB2/viewtopic.php?t=1785&highlight=vvzoom
	
	vec2 loc = destCoord();
	loc = samplerTransform(Image,loc);
	vec2 modifiedCenter = samplerTransform(Image, Center);
	loc = (loc - modifiedCenter)*(1.0/Level) + modifiedCenter;
	
	return sample(Image,loc); 
}

/////////////////////////////////////////
// Simple version, without recolouring //
/////////////////////////////////////////

kernel vec4 tbMetaImage(sampler Image, vec2 Divisor, float Mix)
{
	// Input image dimensions
	vec2 dims = samplerSize(Image);
	// Normalised coords of current pixel
	vec2 xyNorm = samplerCoord(Image) / dims;
	
	// Coords to sample tiled image
	vec2 miniImagePos = fract(xyNorm / Divisor);
	
	// Output tiled image
	return sample(Image, mix(xyNorm,miniImagePos,Mix) * dims);
}

//////////////////////
// With recolouring //
//////////////////////

kernel vec4 tbMetaImageClr(sampler Image, vec2 Divisor, float Mix)
{
	// Input image dimensions
	vec2 dims = samplerSize(Image);
	// Normalised coords of current pixel
	vec2 xyNorm = samplerCoord(Image) / dims;
	
	// Coords to sample tiled image
	vec2 miniImagePos = fract(xyNorm / Divisor);
	// Coords to sample centre pixel of each tile
	vec2 colorPos = (floor(xyNorm / Divisor) * Divisor) + 0.5 * Divisor;
	
	// Color at centre of current tile
	vec4 centreColor = sample(Image, colorPos * dims);
	// Sample scaled input image for current tile
	vec4 miniImage = sample(Image, mix(xyNorm,miniImagePos,Mix) * dims);
	
	// Output tiled image * centre color
	// mixed with original mini image color
	return mix(miniImage,miniImage * centreColor,Mix);
}

.. and the JavaScript from the bottom panel:

function __image main(__image Image, __vec2 Divisor, __number Type, __number PreZoom, __number Mix)
{
	// Scale and round control values
	Divisor.x = 1 / Math.round(Divisor.x); // Range 50 > 1, exponential-in
	Divisor.y = 1 / Math.round(Divisor.y); // Range 50 > 1, exponential-in
	
	// Pre-zoom
	center = new Vec(0.5 * Image.extent.width,0.5 * Image.extent.width);
	var zoomedImage = vvZoom.apply(Image.definition,null,Image,center,PreZoom);
	
	if(Type == 0.0) {
		return tbMetaImage.apply(zoomedImage.definition, null, zoomedImage, Divisor,Mix);
	} else if(Type == 1.0) {
		return tbMetaImageClr.apply(Image.definition, null, Image, Divisor,Mix);	}	
}

One nice new feature I’ve added is the ability to ‘mix’ between the effect and original image, but not as a simple crossfade- it’s actually mixing between the coordinates the image is sampled at, so you get this weird zooming effect.

I’ve realised I should be thinking more about making my effects start in an interesting way. Rather than just being on or off, I could have them transition in some interesting way from the original image to the effected version. Or maybe this wouldn’t be such a great idea, usability-wise. Anyone any thoughts on this?

28
Oct
08

tb SoundFlower

An audio-reactive circular oscilloscope-type thing, with feedback.
Requires Kineme Audio Tools plugin.

This is an old project resurrected. I’ve finally got around to adding the ability to choose the audio interface and channel for the effect via a little info box, overlaid on top of the output. It’s a not-particularly elegant hack, but I can’t see any other way of doing it, since you can’t populate an Index splitter with names items programmatically from inside QC (as far as I know).

tb_soundFlower.qtz in the widget.




Twitter

October 2008
M T W T F S S
« Sep   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Links

Blog Stats

  • 487,906 hits
Advertisements