mac online apple blackjack


Mres Digital Media Blog.

Leave a Reply



A big thanks to Flora Davoll, Tom Schofield,  Adrian Park and all the CL Techs (even Rich).

Final Code.

New SetUp Sketch

After discussion with the group we’ve moved a few things around as to allow a good flow of people around the space as well as to accomodate all exhibiters.

As can be seen I am now going to have the back left space as you enter Space 4. The screen is going to be 2.4m long by 0.69 wide. to create a panorama and keep to my 32:9 aspect ratio. I hope that this will mean that the viewer is engulfed with a full visual spectrum and allow them to explore the space successfully.

Audio Code for piece

/**Using sketch by Damien Di Fede as basis to affect audio volume as the viewer approaches the screen.
Working with a frequency of 50 and then mapping the bandwith to the viewers Z co=ordinate. This is to allow for a multi sensory experience. Not only will the sketch be aware of the users location and be reacting to them, the sound of waves will intensify as they near the screen, further bringing attention to themselves and their role within the investment and narrative within the artwork.

* Band Pass Filter
* by Damien Di Fede.
* This sketch demonstrates how to use the BandPass effect.
* Move the mouse left and right to change the frequency of the pass band.
* Move the mouse up and down to change the band width of the pass band.

import ddf.minim.*;
import ddf.minim.effects.*;

Minim minim;
AudioPlayer groove;
BandPass bpf;

void setup()
size(512, 200, P2D);

minim = new Minim(this);

groove = minim.loadFile(“STE-020-MP3 File.mp3”);
// make a band pass filter with a center frequency of 440 Hz and a bandwidth of 20 Hz
// the third argument is the sample rate of the audio that will be filtered
// it is required to correctly compute values used by the filter
bpf = new BandPass(440, 20, groove.sampleRate());

void draw()
// draw the waveforms
// the values returned by left.get() and right.get() will be between -1 and 1,
// so we need to scale them up to see the waveform
for(int i = 0; i < groove.right.size()-1; i++)
float x1 = map(i, 0, groove.bufferSize(), 0, width);
float x2 = map(i+1, 0, groove.bufferSize(), 0, width);
line(x1, height/4 – groove.left.get(i)*50, x2, height/4 – groove.left.get(i+1)*50);
line(x1, 3*height/4 – groove.right.get(i)*50, x2, 3*height/4 – groove.right.get(i+1)*50);
// draw a rectangle to represent the pass band
fill(255, 0, 0, 60);
rect(mouseX – bpf.getBandWidth()/20, 0, bpf.getBandWidth()/10, height);

void mouseMoved()
// map the mouse position to the range [100, 10000], an arbitrary range of passBand frequencies
float passBand = 50;
float bandWidth = map(mouseY, 0, height, 50, 500);
// prints the new values of the coefficients in the console

void stop()
// always close Minim audio classes when you finish with them
// always stop Minim before exiting



After experimentation and playing about with video transitions and blends it has (as previously mentioned) meant that I am unable to proceed as planned. I have thought about hw to include the same idea as before having separate characters appear as the user moves around. After thought and sketching I have decided to proceed with creating a panorama : A panorama (formed from Greek πᾶν “all” + ὅραμα “sight”) is any wide-angle view or representation of a physical space, whether in paintingdrawingphotographyfilm/video, or a three-dimensional model.


The reason for this is I will be able to create a vista, a 180* degree space that we can not achieve without the use of technology. This also will invite the viewer to move so that they can view the whole image at once, this movement in turn affecting the video that they are witnessing. Thus, they will not be able to take in the full scene unless they stop and take notice. Then if they move again the scene  will have changed and they must reflect again on the new scene.




Kinect Music video

YouTube Preview Image


Is that 2 Kinects I see?

Bash need

Having some issues with Osceleton quitting in terminal, its having segmentation errors... it seems I may need to look into bash script so I can restart the command....

!!        Run the last command again


So I’ve been having some issues with my video peice, either memory errors occur or when using GSMovie objects and converting them to PImages they decide to just draw black pixels after a short time working. So I’ve come across tint() function. Did a quick sketch and looks like its worth investing a quick sketch using video footage.

If this does not work however I have been playing about with maybe using several versions of the sketch running on different machines, therefore allowing desired results (hopefully). That or have separate characters  reacting to user presence on their own screen. Will be thinking through this over the next week. Logistics are equipment, space etc.

Sound recordings have been made now and its just getting the sketch working correctly as well as processing and grading the film footage.

Current code Examples

Code Examples

Osceleton Part of sketch Code

//import libraries so communication can happen with Kinect as well as be able to handle

//movie files

import processing.opengl.*;

import oscP5.*;

import netP5.*;

PFont f;

OscP5 oscP5;

int userCount=6; //kinect max 7

float X;

float Y;

float Z;

float xmap;

float ymap;

float zmap;

float maxZ = 100.0;

//make an array of users

User [] myUsers = new User[userCount];//make array of users to hold a string 0-6

int closestUser=1000;

void setup() {

size(screen.width, screen.height);

f= loadFont(“Serif-48.vlw”);

//load font for de-bugging

oscP5 = new OscP5(this, “”, 7110);

//check each user in turn, first user 0 then user 1 etc

for (int i=0;i<myUsers.length;i++) {

myUsers[i]= new User(0, 0, 0);




void oscEvent(OscMessage msg) {

//println(“msg results “+msg.checkAddrPattern(“/user/”+str(1))  );

//closestZ = maxZ;//resetting Z

for ( int i=1; i <= userCount; i++ ) {

if (msg.checkAddrPattern(“/user/”+str(i))) {

//i must be out as if not it will bugger up message)

//need to create variable of maximum users

X = (msg.get(0).floatValue());

Y= (msg.get(1).floatValue());

Z = (msg.get(2).floatValue());

xmap = map(X, 0, 1, 0, width);

ymap = map(Y, 0, 1, 0, height);

zmap = map(Z, 0, 3.5, 0, maxZ);

myUsers[i-1].update(xmap, ymap, zmap);

//beneath not needed but kept in case

/* if ( zmap > 0.0  && zmap < closestZ ) {//using greater than zero as when kinect loses user it prints 0.0

// if( i != closestUser ) { println(“Found new user ” + i ); }

closestUser = i;//will update with loop

closestZ = zmap;//closestUser z mapped to 100 for ease

myUsers[i-1].update(xmap, ymap, zmap);





void draw() {




int yPos = 50;

for (int i=0;i<myUsers.length;i++) {

if (i == closestUser) {//-1 because an array so User 1 is actually 0

fill (125);


else {



//print zvalues to screen

//text(i + ” = ” + myUsers[i].z, 10, yPos);

text(i+” “+myUsers[i].isAlive,10,yPos);

yPos += 50;



yPos += 50;

text(“closest User is “+closestUser, 10, yPos);


//a function which checks which user is closest and returns the index of that user eg.

//which number in the array of users they are

void returnClosestUser() {

//int indexOfClosestUser=100;

//go throught the list of users

//int localClosestUser=100;

float closestZ=1000;

for (int i=0;i<myUsers.length;i++) {

//check their zpos against the current closestZ

//if it’s less than this but isn’t 0 then…

if (myUsers[i].z<closestZ&&myUsers[i].z!=0) {

println(“got closest Users which is now ” + i);

//make this the new closest z


//and this is the index of the new closest user





User Class Code

class User {

float x, y, z;

//previous values of x,y,z – we will use these to see if this person has moved since last

//frame or not

float px, py, pz;

int timer;

boolean isClosestUser;

boolean isAlive;

User (float lx, float ly, float lz) {







void update(float lx, float ly, float lz) {




//if nothing has changed since the last frame

if (px==x&&py==y&&pz==z) {



//if we are moving we are also alive





//how many frames someone needs to stay still for before we consider them dead

int timeOutThreshold=60;

if (timer>=timeOutThreshold) {








void drawUserEllipse() {

ellipse(x, y, z, z);

//println(“values of user data are : “+x+” “+y);



Pimage Code for Video Transitions

//getting invalid memory error or set a breakpoint in malloc_error_break to debug


Movie movieBottom;

Movie movieMiddle;

Movie movieTop;

PImage TopAlpha ;

PImage MiddleAlpha;

int transparencyTop;

int transparencyMiddle;

float playheadBottom;

float playheadTop;

float playheadMiddle;

void setup() {

size(1024, 576, P3D);

TopAlpha = createImage(width, height, ARGB);

MiddleAlpha = createImage(width, height, ARGB);

movieTop = new Movie(this, “Close1-MAgicTest”);

movieMiddle = new Movie(this, “trimmedTest-MAgicTest”);

movieBottom = new Movie(this, “DMTimeLapse2-MAgicTest PhotoGood-MAgicTest”);;;;


void draw() {

println (mouseY);



image (movieTop, 0, 0);

playheadTop = map(mouseX, 0, width, 0, movieTop.duration());


println (“playingTop”);


else if ((mouseY<170)&&(mouseY>100)) {//next zone <(height/3) && <(height/3)*2


transparencyTop = (int) map(mouseY, 170, 100, 0.0, 255.0);



int x=0;

int y=0;

for (int i = 0; i < TopAlpha.pixels.length; i++) {

color myColor = movieTop.get(x, y);

TopAlpha.pixels[i]= color(myColor, transparencyTop);


if (x>=width) {






image (movieMiddle, 0, 0);

image(TopAlpha, 0, 0);

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());

playheadTop = map(mouseX, 0, width, 0, movieTop.duration());




else if ((mouseY>150)&& (mouseY<251)){

image (movieMiddle, 0, 0);

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());




else if ((mouseY > 250 ) && (mouseY<385)) {


transparencyMiddle = (int) map(mouseY, 385, 250, 0.0, 255.0);



int x=0;

int y=0;

for (int i = 0; i < MiddleAlpha.pixels.length; i++) {

color myColor = movieMiddle.get(x, y);

MiddleAlpha.pixels[i]= color(myColor, transparencyMiddle);


if (x>=width) {






image (movieBottom, 0, 0);

image(MiddleAlpha, 0, 0);

playheadBottom = map(mouseX, 0, width, 0, movieBottom.duration());

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());




else if (mouseY >384) {

println (“playing bottom”);

image (movieBottom, 0, 0);

playheadBottom = map(mouseX, 0, width, 0, movieBottom.duration());




/*still working on this to develop states according to z so that the system knows what to do and will save it getting confused/ memory leaks. Also still developing the if esle and true false statements to allow the system to access video library in correct order*/