Visual Programming Workend

This semester i’m offering a Visual Programming Workend. In two days I will show you the basics of programming in a language, that is not based on symbols like letters and numbers but on graphical elements like boxes and wires.

last semester we worked with the graphical programming environment called Pure Data. This semester you’ll have the option to choose one of two languages for the workshop: Pure Data or VVVV. Below you’ll find a poll … the majority wins.

 

 

Both programming environments are based on similar principls and both are good in interfacing with external hardware like webcams, arduinos or the usual HIDs. But there are still some pros and cons for both environments.

Pure Data
+ works on Mac and Windows (and Linux)
+ good for synthesizing sound
– bad for synthesizing visuals and image analysis
– kind of outdated/not very active community

VVVV
+ good for synthesizing visuals and image analysis (motion tracking, color detection, blob detection)
+ up to date/active community
+ modern user friendly interface
– works only on Windows
– not very good at synthesizing sound

 

Advertisements

Pure Data Workend

Great Workshop last weekend! Below you’ll find the patches we built …

If you want to review the very basics, please watch the first three of these video tutorials or read about them at flossmanuals.net.

1. GEM basics

download link

Use [gemwin] and [gemhead] to display graphics

use [gemwin] and [gemhead] to display graphics

2. Dealing with jittery (microphone) data + using the mouse input

download link

change the height of an rectangle by microphone input and the tranasparency by mouse movment

change the height of an rectangle by microphone input and the tranasparency by mouse movment

3. Change the backgound color of the GEM window

download link – save this patch in the same folder as the parent patch and call this abstraction by creating an object called random-gemwin-bg.

random gemwin background abstraction

random gemwin background abstraction

4. The very useful map abstraction

download link – save this patch in the same folder as the parent patch and call this abstraction by creating an object called map-values.

remember the very useful map abstraction

remember the very useful map abstraction

4. Using the webcam

download link – see the [pix_video] helpfile for more information

display webcam feed in a gem window + rizise the image keeping the aspect ratio

display webcam feed in a gem window + rizise the image keeping the aspect ratio

5. Read an anlalog sensor connected to an Arduino (Firmata)

download link – the PD patch
download link – the Arduino Environment

To use this patch, you will need to have an Arduino board with the Standart Firmata firmware installed:

  1. Download and install and open the Arduino environmet
  2. Connect the Arduino board
  3. Select your type of Arduino: tools > board
  4. Select your serial port: tools > serial port > dev/tty/usb… or COM
  5. Open the Standart Firmata sketch: file > examples > Firmata > StandartFirmata
  6. Upload StandartFirmata to your Arduino
arduino + standart firmata + pd: reeds analog sensor

arduino + standart firmata + pd: reeds analog sensor

6. Control servo

download link – the PD patch
download link – the Arduino Environment

To use this patch, you will need to have an Arduino board with the Standart Firmata firmware installed:

  1. Download and install and open the Arduino Environmet
  2. Connect the Arduino board
  3. Select your type of Arduino: tools > board
  4. Select your serial port: tools > serial port > dev/tty/usb… or COM
  5. Open the Standart Firmata sketch: file > examples > Firmata > StandartFirmata
  6. Upload StandartFirmata to your Arduino
arduino + standart firmata + pd: servo

arduino + standart firmata + pd: servo

7. Read messages send by an OSC app

download link – PD patch
Play Store/App Store – touchOSC is used in the example below

To use the example below, set the outgoing port of the touchOSC app to 8000. The [route] objects are set for messages sent by touchOSC.

read osc messages with pure data

read osc messages with pure data

8. Send your phones accelerometer values to Pure Data with OSC

download link – PD patch
Play Store/App Store – touchOSC is used in the example below

To use the example below, set the outgoing port of the touchOSC app to 8000. The [route] objects are set for messages sent by touchOSC. The accelerometer values may be different for your phone. You may have to change the range of the sliders or do some additional math.

receive accelerometer data using OSC

receive accelerometer data using OSC