· Lecture 12: Interface Programming

Lecture 12: April 10, 2013
Assignment: Take a device you made. Build an interface on the "desktop".

Lecture Notes:

What I did:

I took the hello.load board I made in the "Input devises" class and read it using Pure Data, then visualized the load on the capacitance sensor with colorvalues and synthesized sound.

Here is a video (wmv format) of the hello.load sensor with an elastomer between sense and GND (four "Drop's"; Dutch liquerices).
Screenshot here:


"Drop"/liquerice-elastomer-sensor

Pure Data is a nodebased scripting environment able to work with data, sound, moving and static images as well as graphics. The "interface" by default is happening inside the script but the scripts can be executed directly from batchfiles. There are also a couple of external libraries to Pure Data with deals with a "true interface". One of these is GrIPD. Its a cross-platform GUI frontend to a pd script and can run over TCP/IP so the execution of the script and the interface can be on seperate computers and platforms. The design metaphor for Pure Data is connecting audio equipment with patch cables. All things happen "real-time" in Pure Data so no compiling is needed to make changes.


Adding the GrIPD library to the startup script on Windows

My first goal was to mimick the python example provided by Neil Gershenfeld using Pure Data and then output the values in other ways than the given example. Since Pure Data works in a serial mode and each node only does one thing at a time, functions quickly becomes elaborate on screen - however this also makes it really easy to see what is going on even with poorly documented "code".

There is a nice manual on Pure Data here. That site also has free manuals for a number of other free softwares.

The finished Pure Data script is here (You'll have to change the port and the audio settings to suit your needs). It basically massages the data from the hello.load board into numbers usefull for rgb colors (0-255) and sound. The colored square in the right hand image of the Pure Data script window is controlled be the output of the hello.load board. Each of the three values of the original python script is also outputted to graphs (visible in the right hand side of the picture below) as well as modulated sound in the computer speakers.

The resulting script:


Pure Data script...

Larger version here.

Things which went wrong:

Nothing really went wrong. It was fun nevertheless..

Things to fix:

I didn't have enough time to get the GrIPD to work with an interface detached from the computer running the script. But I will get that to work at some point since Pure Data seems to be able to do a lot of what I plan to do (active sound masking for noisy environments - adding audial "decals" to the annoying sounds making them more pleasurable).