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

Advertisements

Pure Data – Erste Schritte

Arduino Test-Patch

Der Arduino Test Patch, im Hilfe Browser unter pduino zu finden.

Pure Data (Open Source) ist eine visuelle Programmierumgebung, die für die Synthese von Musik entwickelt wurde. Seit dem wurde PD mit vielen Plugins erweitert und bietet mittlerweile auch Grafik- und Videofunktionen. Außerdem ist Pure Data gut geeignet, um Schnittstellen mit externer Hardware wie Arduinos, HIDs und MIDI/OSC fähigen Geräten herzustellen. Pure Data ist damit sehr gut geeignet, um „hardware-lastige“ Interaktionen zu gestalten. Pure Data ist nicht geeignet um grafische Benutzerschnittstellen zu entwerfen. Dafür eingnet sich z.B. HTML5 Animationssoftware wie Hype 2 (30 USD) oder die Adobe Edge Tools (Gratis aber mit Registrierungszwang bei Adobe).

Die kommerzielle Programmierumgebung MAX/MSP basiert auf Pure Data. Vieles was wir in PD lernen werden lässt sich auf MAX/MSP übertragen.

Installation
Pure Data Extended Downloadseite
Pure Data Extended enthält neben dem Hauptprogramm viele nützliche Externals (so heißen Programmbibliotheken bei Pure Data) wie Gem und Pduino.

Handbuch
Auf flossmanuals.net findet man ein ausführliches Pure Data Handbuch.

Video Tutorials
Auf Youtube findet man diese hervorragenden Video Tutorials (insgesamt 35 Video). Viele der komplexeren Tutorials beschäftigen sich zwar mit der Musiksynthese, sind aber trotzdem sehenswert, da sie viele Basics erklären, die auch für Pure Data allgemein gültig sind.

Der Pure Data Hilfe Browser
Der vielleicht beste Einstieg ist der Hilfe Browser, der in Pure Data selbst enthalten ist. Zu finden ist der Hilfe Browser unter Hilfe > Pd Hilfe Browser … oder mit [cmd (Apfel)] + [B]

PD Hilfe Browser

Unter Manuals/0.Intro/… findet man interaktive Lektionen die Pure Data von Anfang an erklären.

Projects @ Fritzing

If you need some help with your circuits, check fritzing if you can find  a similar project to yours.

Inverter Synth

3. Nov. 2012
by myredhotcar for kids
LED Transistor Switcher Project 

3. Nov. 2012
by myredhotcar for kids
LED Array 

3. Nov. 2012
by jaboston for amateurs
Arduino Mp3 Player - Arduino Jukebox 

23. März 2009
by omer for kids
FSR 

 

Orientation tracking made easy

Hi all!

I recently released a tutorial and all the needed code to build an orientation tracker. I first thought about building this tracker when doing a course as a guest a while ago, so now it’s coming back.

I think the possibility to sense the orientation of things in real-time opens up a whole new dimension of possibilities in Physical Computing. Even more when it can be done wirelessly.

Tutorial and code is here: http://dev.qu.tu-berlin.de/projects/sf-razor-9dof-ahrs

Hope this will be useful,
Peter

the first try to control a screen application with a potentiometer- connecting arduino and processing

 

Bildschirmfoto_2011-11-09_um_12

this is an example of the graph we created 

 

First we uploaded the standardFirmamenta on the arduino board.

Then we wrote the following code in processing:

import processing.serial.*;

import cc.arduino.*;

 

Arduino arduino;

 

int INPUT_PIN = 0;

int xPos = 1;         // horizontal position of the graph

 

void setup () {

  // set the window size:

  size(400, 300);        

 

  arduino = new Arduino(this, Arduino.list()[0], 57600);  

  for (int i = 0; i <= 13; i++) {

    arduino.pinMode(i, Arduino.INPUT);

  }

 

  // set inital background:

  background(0);

}

void draw () {

    // convert to an int and map to the screen height:

    float value = float(arduino.analogRead(INPUT_PIN)); 

    value = map(value, 152, 1023, height, 0);

    // draw the line:

    stroke(127, 34, 255);

    line(xPos, height, xPos, value);

 

    // at the edge of the screen, go back to the beginning:

    if (xPos >= width) {

      xPos = 0;

      background(0);

    } 

    else {

      // increment the horizontal position:

      xPos++;

    }

}

SensorWiki.org

The aim of this project is to provide a thorough review of the main types of sensing technologies used in musical applications. As new sensing technologies become available, this open space will provide an up-to-date resource for researchers in the field, complementing information available in books and textbooks such as Trends in Gestural Control of Music (Wanderley and Battier, eds. 2000) and Digital Musical Instruments: Control and Interaction Beyond the Keyboard (Miranda and Wanderley, 2006).

More than 30 techniques are described, along with their sensing principles and examples of actual devices that implement those principles. For each sensing technique, one or more devices are described with information on how to obtain them (links to distributors, prices), as well as photos of the device and necessary setup/conditioning circuits, circuit diagrams, one or more videos showing the devices used in practice, and finally, simulation circuits compatible with the software CircuitMaker.