Synaesynth @ The Bella Union, Melbourne

Categories Design, Interaction, Visuals

Goodtimes Forever Again

I was kindly invited to bring along my interactive colour to sound conversion instrument to “Good Times Forever Again”, a night which originated in Sydney and later made it’s way to (the welcoming open arms of) Melbourne.

The talent there was amazing, each band had a unique and well-explored sound, the entire night was set against a backdrop of wonderful animated illustrations by Meg O’Shea, some nude body painting and a legitimate magician. I’ve never seen someone make objects appear, dissapear and otherwise transmogrify right in plain sight before.

From the event page:

This is the second Goodtimes Forever show in Melbourne after the first big night back in April, making it the third since the event kicked-of started in Sydney.  This night is going to offer you a mix of the (un)usual music, art and goodtimes, but for the first time they’re gonna have a MAGICIAN!

Design Play Cards at National Gallery of Victoria

Categories Design, Visuals

The Design Play Cards are going to be exhibited in the NGV as part of the #melbournenow exhibition, which runs from November 22, 2013 up until March 23, 2014.

Melbourne Now celebrates the latest art, architecture, design, performance and cultural practice to reflect the complex cultural landscape of creative Melbourne. This ambitious and far-reaching exhibition across NGV Australia and NGV International will show how visual artists and creative practitioners have profoundly contributed to creating a place with a unique and dynamic cultural identity.

read more

More than 300 hundred talented artists, architects, designers and others are going to be exhibited. It’s free entry so come along and have at look at what Melbourne has to offer.

Melbourne Now | 22 Nov - 23 Mar | FREE ENTRY

Displaying webcam video on Raspberry Pi using pygame

Categories Open-source, Programming, RMIT, Visuals

Another small exploratory project related to my undergraduate Major Project had me trying to stream video onto a small 3.5″ TFT LCD display using a webcam connected to a Raspberry Pi mini computer.

 

Firstly, not all USB webcams work with the Raspberry Pi, so after trying randomly to find a working webcam I discovered this list of Raspberry Pi verified peripherals and bought myself a Logitech C100 for $20 on ebay.

Secondly, USB webcams seem to be horribly slow on the Raspberry Pi, pulling dodgy framerates at what might be <10fps at their full resolution (in my case 640×480 pixels). Originally, I was using the custom imgproc library (available here) but found that there was either a lack of simple documentation for extended functionality like scaling and so on, or that the library wasn’t built to perform those sorts of tasks. Eventually I settled upon using the pygame library (which you can get here). The documentation for pygame is thorough and easy to navigate, making troubleshooting and extension or exploration of the library very easy to do.

In order to combat the low framerate and because resolution is not a priority (for the purposes of the concept I will be testing) I decided to pull the webcam feed in at a much lower resolution (32×24 pixels) and then scale it up to full screen (640×480 pixels). I’m unsure if the webcam can actually pull the feed in at 32×24 pixels, I have to look into that – and perhaps some pixel dropping techniques.

I wrote the code, copied it over, connected the webcam to the Raspberry Pi and ran the following python script:

import sys
import pygame
import pygame.camera

pygame.init()
pygame.camera.init()

#create fullscreen display 640x480
screen = pygame.display.set_mode((640,480),0)

#find, open and start low-res camera
cam_list = pygame.camera.list_cameras()
webcam = pygame.camera.Camera(cam_list[0],(32,24))
webcam.start()

while True:
    #grab image, scale and blit to screen
    imagen = webcam.get_image()
    imagen = pygame.transform.scale(imagen,(640,480))
    screen.blit(imagen,(0,0))

    #draw all updates to display
    pygame.display.update()

    # check for quit events
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
        webcam.stop()
        pygame.quit()
        sys.exit()

After a brief pause a pygame window pops up and the webcam feed is shown on the screen, scaled to fullscreen. The framerate is better than the full resolution webcam feed, but is still very slow by modern standards.

 

Drawing in Python using Arduino data via serial

Categories Open-source, Programming, Visuals

Following on from my previous post where I established serial communication between an Arduino and a Raspberry Pi, I needed to find out if I could store the data being sent from the Arduino in a variable on the Raspberry Pi and use it to alter some functions in a Python script.

I wrote up a piece of code that tries to read the data from the serial and use it to change the colour of a circle drawn in the center of a 640 x 480 pixel screen:

# Title: Arduino2RPiSerial
 #
 # Goal: to draw a circle based on colour values sent from the arduino
 #

import pygame
 import sys
 import serial

pygame.init()

#create a screen
 screen = pygame.display.set_mode((640,480))

#create colour
 redValue = 255
 fgColour = (redValue,0,0)
 bgColour = (0,0,255)

screen.fill(bgColour)

#serial(device,baud)
 ser = serial.Serial('/dev/ttyACM0',9600)

# LOOP
 while 1 :

#Update from serial
 redValue = ser.readline()
 #update colour value
 fgColour = (redValue,0,0)
 pygame.draw.circle(screen, fgColour, (320,240), 200, 0)
 pygame.display.update()
 pygame.time.delay(5)

# check for quit events
 for event in pygame.event.get():
 if event.type == pygame.QUIT:
 pygame.quit(); sys.exit();