Sonar Tonebank

The Sonar Tonebank is a simple musical instrument that uses a range sensor to trigger sound samples. Players can create musical soundscapes by moving in front of the range sensor, which maps pitch to distance. This project was created using an Arduino, a PING sonar sensor and the Minim sound library in Processing.

Code & Notes

The Processing code is actually very simple. The program reads range data from the Arduino via the serial port, then triggers samples and visualizer elements according to the distances reported. Any set of samples could be used (for this version, I’m using 16 different short sound textures generated with Reason), and it’s easy to imagine how the code could be modified to send MIDI signals instead of triggering samples.

img_0209

// SONAR TONEBANK

// 1.0
// Jeff Watson
// 27 April 2009

import processing.serial.*;
import ddf.minim.*;

// arduino variables

Serial myPort; // The serial port

// video variables

// minim variables

Minim minim;

AudioSample bell;
AudioSample bell2;
AudioSample bell3;
AudioSample bell4;
AudioSample bell5;
AudioSample bell6;
AudioSample bell7;
AudioSample bell8;
AudioSample bell9;
AudioSample bell10;
AudioSample bell11;
AudioSample bell12;
AudioSample bell13;
AudioSample bell14;
AudioSample bell15;
AudioSample bell16;

// visualizer variables

void setup () {

size(640, 480, P2D);
background(0);
noStroke();

minim = new Minim(this);
bell = minim.loadSample(“F#3.wav”, 2048);
bell2 = minim.loadSample(“G#3.wav”, 2048);
bell3 = minim.loadSample(“A#3.wav”, 2048);
bell4 = minim.loadSample(“C#4.wav”, 2048);
bell5 = minim.loadSample(“D#4.wav”, 2048);
bell6 = minim.loadSample(“F#4.wav”, 2048);
bell7 = minim.loadSample(“G#4.wav”, 2048);
bell8 = minim.loadSample(“A#4.wav”, 2048);
bell9 = minim.loadSample(“C#5.wav”, 2048);
bell10 = minim.loadSample(“D#5.wav”, 2048);
bell11 = minim.loadSample(“F#5.wav”, 2048);
bell12 = minim.loadSample(“G#5.wav”, 2048);
bell13 = minim.loadSample(“A#5.wav”, 2048);
bell14 = minim.loadSample(“C#6.wav”, 2048);
bell15 = minim.loadSample(“D#6.wav”, 2048);
bell16 = minim.loadSample(“F#6.wav”, 2048);

// List all the available serial ports
println(Serial.list());
// Open whatever port is the one you’re using.
myPort = new Serial(this, Serial.list()[1], 9600);
// don’t generate a serialEvent() unless you get a newline character:
myPort.bufferUntil(‘\n’);
}

void draw () {
// everything happens in the serialEvent()
}

void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil(‘\n’);

if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// convert to an int and map to the screen height:
float inByte = float(inString);
int VideoMod = int(inString);

println(VideoMod);

// 1st Octave

if ( VideoMod < 5 )
{
bell.trigger();
delay(33);
fill(0,0,255);
rect(1,0,128,480);
}

else if ( VideoMod < 8 )
{
bell2.trigger();
delay(33);
fill(13,82,122);
rect(129,0,128,480);
}

else if ( VideoMod < 11 )
{
bell3.trigger();
delay(33);
fill(0,0,255);
rect(257,0,128,480);
}

else if ( VideoMod < 14 )
{
bell4.trigger();
delay(33);
fill(13,82,122);
rect(385,0,128,480);
}

else if ( VideoMod < 17 )
{
bell5.trigger();
delay(33);
fill(0,0,255);
rect(513,0,128,480);
}

// 2nd Octave

else if ( VideoMod < 20 )
{
bell6.trigger();
delay(33);
fill(0,0,0);
rect(0,0,640,480);
fill(0,0,255,191);
rect(1,0,128,480);
}

else if ( VideoMod < 23 )
{
bell7.trigger();
delay(33);
fill(0,0,0);
rect(0,0,640,480);
fill(13,82,122,191);
rect(129,0,128,480);
}

else if ( VideoMod < 26 )
{
bell8.trigger();
delay(33);
fill(0,0,0);
rect(0,0,640,480);
fill(0,0,255,191);
rect(257,0,128,480);
}

else if ( VideoMod < 29 )
{
bell9.trigger();
delay(33);
fill(0,0,0);
rect(0,0,640,480);
fill(13,82,122,191);
rect(385,0,128,480);
}

else if ( VideoMod < 32 )
{
bell10.trigger();
delay(33);
fill(0,0,0);
rect(0,0,640,480);
fill(0,0,255,191);
rect(513,0,128,480);
}

// 3rd Octave

else if ( VideoMod < 35 )
{
bell11.trigger();
delay(33);
fill(0,0,0);
rect(0,100,640,380);
fill(0,0,255,127);
rect(1,0,128,480);
}

else if ( VideoMod < 38 )
{
bell12.trigger();
delay(33);
fill(0,0,0);
rect(0,100,640,380);
fill(13,82,122,191);
rect(129,0,128,480);
}

else if ( VideoMod < 41 )
{
bell13.trigger();
delay(33);
fill(0,0,0);
rect(0,100,640,380);
fill(0,0,255,191);
rect(257,0,128,480);
}

else if ( VideoMod < 44 )
{
bell14.trigger();
delay(33);
fill(0,0,0);
rect(0,100,640,380);
fill(13,82,122,191);
rect(385,0,128,480);
}

else if ( VideoMod < 47 )
{
bell15.trigger();
delay(33);
fill(0,0,0);
rect(0,100,640,380);
fill(0,0,255,191);
rect(513,0,128,480);
}

// Extra note clears screen

else if ( VideoMod < 50 )
{
bell16.trigger();
delay(33);
background(0);
}

else if ( VideoMod > 50 )
{
}

}
}

See also: Arduino-Graph

img_0207

The Arduino code is also pretty straight-forward. All it does is translate the raw PING sonar data into easier-to-handle Imperial and metric measurements, which are then sent out the serial port to Processing.

int pingPin = 7;

void setup()
{
Serial.begin(9600);
}

void loop()
{
long duration, inches, cm;

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// We give a short LOW pulse beforehand to ensure a clean HIGH pulse.
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);

// The same pin is used to read the signal from the PING))): a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);

// convert the time into a distance
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);

Serial.println(inches);

delay(100);
}

long microsecondsToInches(long microseconds)
{
// According to Parallax’s datasheet for the PING))), there are
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
// second). This gives the distance travelled by the ping, outbound
// and return, so we divide by 2 to get the distance of the obstacle.
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{
// The speed of sound is 340 m/s or 29 microseconds per centimeter.
// The ping travels out and back, so to find the distance of the
// object we take half of the distance travelled.
return microseconds / 29 / 2;
}


See also:
Arduino-Ping

img_0208

During the early prototyping phase, I also made a simple Theremin using the PING sensor, based on Alberto Bietti’s excellent documentation. The piezo speaker and button on the current version of the project are remnants of this prototype; I’ve left them on there for now for demoing purposes.

This project was created as an exercise for Perry Hoberman’s graduate seminar, Experiments in Interactivity II.

Dream_Jrnl

dream_jrnl

Dream_Jrnl is a generative literature experiment that algorithmically creates evocative and mysterious texts.

This program was created using Processing and RiTA as an exercise for Perry Hoberman’s Experiments in Interactivity II (CTIN-544) seminar. The source material is a dream log I kept during the summer of 2008.

Click here to launch Dream_Jrnl in a separate window. Interact with the application by clicking, moving the mouse or typing.

IMAP Manifesto

Manifesto/Artist Book
Full color, 60pp

manifesto-photo

Created December, 2008 for Anne Balsamo’s Seminar in Media and Design Studies (CNTV-601).

Hard-copy available upon request.

Download the .pdf here.

UPDATE: Those interested in quick gloss of this document can now read the “Six Points” of the Manifesto below.

The Six Points

1. Everything is Triage

This is an emergency. How did we get here? Where are we going? None of us can pretend to know. Time and being are incomprehensible. No matter how fine-grained our imaging systems may become, the great mysteries of our existence will always elude us. This is the baseline of anxiety for all humans. Even in the absence of environmental, economic and social stressors, living this life requires an enormous amount of courage. And for most of us, contemplating these fundamental questions about our origins and fate are viewed as “luxuries.” Bills need to be paid, friends and family need to be cared for, complex social arrangements must be navigated, and so on–

Every car on the highway is occupied. Every building in the city is densely packed with fear, desire, grief and joy. If all of that was gone and there were only two or three of us left, trapped, say, on some alien planet, would we not huddle together and work for our mutual survival? How does the line get drawn, then? Is it merely numbers that turn families into clans and clans into factions and so on down the line, separating us not only from each other but also from the basic facts of our existence? Perhaps this division is only transitory, the effect of competing stories told to while away the time and wash away the terror in a flood of certainty. Let it be our task to do the work to identify and break down these divisions and increase the potential for collective action in the spirit of mutual aid.

2. Technology is a deal with the devil and we are already in Hell

Consider the orangutan, or the dolphin, or the rat. There is no humanity without technology. Our most basic of tools, symbolic communication, is an emergent property of our being. Even feral children draw and sing spontaneously. We did not make this deal with the devil, the one that says we will trade the innocence of the Animal for a shot at immortality and omnipotence via technic; that particular agreement predates us. We may not be Nature’s final impulse in this direction, but it cannot be forgotten that it is the aspiration of all life to survive, and survival means expansion, diversification, adaptation and transformation. Our instinctive tool-making and symbol-weaving practices are as much an expression of Life as Old Man’s Beard or the Yellow-Beaked Cuckoo.

And yet — and herein lies the challenge — while there is no humanity without technology, technology itself is not human. By building, we change our world and force new realities upon ourselves. We must not see ourselves as being in conflict with our creations; and yet conflict arises nonetheless. Technological systems take on energies of their own and seek their propogation. The earth does not care who it is that carries its flag into the Beyond; if robots work best, then robots it will be.

The paradox of our provenance is that, to survive and prosper as technological beings, to bring-into-existence an extrasolar destiny on behalf of Life itself,  we have also needed to be distinctly communal in nature and generous in spirit. Despite all our wars and horrors, we could not have made it out of whatever Origin it is we emerged from without deeply caring for one another. The human conscience is no accident. Fealty is an ancient thing; love even older. No one stands up for the humans but the humans themselves.

Perhaps it is this very tension that drives us forward and motivates “innovation.” Having inherited a restrictive, potentially self-defeating contract from our genetic forebearers, we seek to find workarounds and loopholes. Generations pass as these loopholes open and close. The leaders among us seek technological answers to technological problems. We spiral through recursivity, for the devil with whom we have struck this deal lies within us.

3. The future is non-profit

Where will you be in five hundred years? Let us not get bogged down in an impossible-to-resolve discussion about the relative merits of cooperation and competition, welfare states and free markets, the tragedy of the commons, the invisible hand and the rest of it. That battle of inches is for another playing field. It’s an argument between rival ice-making factions at the dawn of refrigeration: you sad, sad, people — let go of it, your time has passed. Scoring points in a debate about how best to structure an economy or galvanize a populace might make you feel better about yourself and advance you in this or that econo-sexual realm, but how does the Old Push and Pull really play out in your community in the Long Run?

(And never mind the unfolding collapse of the global economy, the revelation that we have all been party to a gigantic, murderous Ponzi scheme. This should not be a surprise to anyone. The greatest evils are the ones that escape identification.)

No, the notion that the Future is non-profit is not a political one. Let’s call it scientific instead. Pragmatic. Honest. What outcomes can humanity really expect in the centuries to come? This author proposes two scenarios. In the first, we see an increasingly fuedal arrangement, with food and fuel gathering around centers of wealth protected by military power. On the periphery, mass starvation, murder and disease predominate. Geopolitics becomes defined by resource wars and factionalism. We already seem well on our way to this destination. But it is not my belief that this is where we will ultimately arrive.

Rather, I propose a second possibility. In this scenario, neofuedalism continues to emerge in the manner suggested above, but finds that it is incompatible with the fruits of its own endeavor. Militarism made the Internet, and the Prodigal disapproves of the Parent. The great instrument of power, namely the withholding and transfer of Capital, has always depended on its lieutenant, the Minister of Information. And loose lips sink ships. In this new age, lies are easier to tell, but secrets harder to keep. The mendacious will be exposed. Calumny will fold back upon itself. And as the crowds huddling around the castles dwindle in number — some slipping out and into the Wastes beyond, others losing life and limb to incursions from without — the blame will fall squarely on the Center.

This is the Long View, and we must recognize that it is not in our nature to act in the interests of descendents ten generations hence. Let it be said that, despite his own interests in Extreme Posterity and Vavilovian Seed Banks and Millenium Clocks, this author is not advocating a multi-century strategy-of-living. Indeed, quite the opposite. We are tactical beings. We work best when we work provisionally (see “Point the Fourth”). It will be a while yet before this cycle of Exploitation, Privation, Revelation and Revolution (EPRR) radiates through the totality of our experience. But right now, we can observe it playing out in the Inner Circles. And we can Act, and in our action, maybe, just maybe, lay the groundwork for generations to come.

4. Provisional living provides best

The larger the plan, the more replete it is with errors. Telescope through time. Imagine the weather in a week, a month. Consider the known unknowns and the unknown unknowns (for what discussion of strategy and tactics would be complete without a reference to D.R.?). It is our tendency to personalize things, and therefore unsurprising that we should ascribe the shifts in fortune of nations and corporations and crime syndicates to the careful planning of their overlords. But, as any historian will tell you, the story of warfare or capital or conspiracy is less about the grand plans that succeed than it is about those that fail. Whatever may be said about the victors of History and the way that it has been written, it is always the Opportunists that win the day.Hubris is one of our oldest themes. Words lose their meaning the more you try to use them to bend the world to your will. Envision the best future possible, but do not worship it or it will destroy you. This is the true meaning of the old admonishment against idolotry. As soon as an objective ceases to be provisional, it becomes dangerous. Have your aims and see them through, but keep your wits about you.

5. Story encompasses all

Story is the most potent technology in existence. Stories move fast and weigh nothing. But beware: they can shred rainforests. For a story is what an army tells itself as it sharpens its machetes.

“This is what we’re going to do. This is why. This is what will happen.”

Stories motivate. All kinds of darkness and light.

6. Art is a light

You know it’s true.

More: download the .pdf

Kcolc

Kcolc is a visual/textual timepiece suitable for display on billboards or other large public displays.

This program was created using Processing as an introductory exercise for Perry Hoberman’s Experiments in Interactivity II (CTIN-544) seminar.

Click here to launch Kcolc in a separate window.

S.T.I.F.L.E.

stifle

S.T.I.F.L.E. is an interactive fiction about broken hearts, experimental pharmaceuticals and wandering philosophers. Written using Inform 7, Fall 2008.

Play here (requires Java): http://remotedevice.net/if/

The Black Sea Tapes

Experimental Media Archive/Alternate Reality Game
Concept, Design and Puppetmastery: Jeff Watson

Exhibitions: The Black Sea Tapes is currently underway.

The Black Sea Tapes is a long-term cross-media storytelling experiment straddling the border between hoax and Alternate Reality Game. In 2001, I received a Media Arts grant from the Canada Council for the Arts to produce a cycle of films and media artifacts which were to be presented as the work of a decades-dead and hitherto unheralded Georgian filmmaker. These films and artifacts were not conceived of as ends in themselves, but rather as parts of a larger metanarrative that would be uncovered and co-created through the curiosity and imagination of an audience.

The Game

The Black Sea Tapes is a long-term Alternate Reality project. Unlike “traditional” ARGs, which thrive on “establishing a network of players who are in the know,” (McGonigal, 44) this project seeks to evade identification as a game for as long as possible (and thus could be classified as a kind of “dark play” ARG). Currently-active game elements include:

  • Engimatically-marked videotape copies of supposedly long-lost film works by the deceased Georgian auteur, “distributed” in washrooms, restaurants, film clubs and other public spaces in various cities around the world.
  • Websites containing information about Georgian cinema and underground artists, most of which is “real”, but some of which makes reference to the fictional filmmaker whose identity is at the centre of this experiment.
  • Web posts on film- and Georgia-related message boards written about the fictional filmmaker by a “member of the family.”
  • Tangentially-related curatorial art projects involving another of the fictional filmmaker’s family members, who is herself a filmmaker.
  • Wikipedia entries that make reference to the fictional filmmaker.

The further growth and development of this project depends on the nature and scope of audience responses to the virally-distributed media components. At the time of this writing, the “mystery videotapes” and web components mentioned above have been in circulation for several months. Additional tapes will be distributed in a similar manner until media clips begin to appear on the internet, uploaded and posted by those who find the tapes and are curious enough about their enigmatic content to share them online. By monitoring a variety of video hosting sites (YouTube, Google Video, Daily Motion, etc) for descriptive keywords and phrases from the labels on the tapes themselves, I hope to engage with the discovery and discussion of these works and, in combination with the ongoing development of other metanarrational components, shepherd forward an emergent narrative concerning the emotional collapse of a young filmmaker at the end of Georgian Communism.

Background

In the context of the history of representation, the aim of this project is to explore, exploit, and explode the semantic structures that underpin the narrative cinema’s capacity to organize historical, social, and individual identity. At issue here are the ways in which film narratives can activate or deactivate the audience’s “metafilmic imagination” — the ability to extrapolate the fictional world that lies beyond the confines of the frame — by foregrounding or occluding questions regarding the origin, intention, and historical position of the film text. Suspense, for example, is created through a partial occlusion of the filmmaker’s intentions — the question “What’s going to happen next?” is only interesting and engaging from the viewer’s perspective if there is some uncertainty as to what the author of the work is trying to say (or, minimally, how she is trying to express a commonly held notion), an uncertainty which is only relieved by the final resolution of the plot.

Suspense thus goes to the putative identity of the film’s author, questioning and ultimately resolving her intentions through figures of character. Importantly, however, there are a range of ontological questions which are rarely, if ever, asked of audiences by narrative filmmakers. In the world of commercial film production, publicity, star systems, formal conventions, and explicit ties to official organs (MPAA, etc) effect a pre-emptive strike on questions regarding the origin and social role of individual narratives: Genre-based advertising ensures that audiences do not have to bother asking themselves “What type of film is this?” or “Who is this film intended for?”; star power and official approval tacitly endorse the ideological position of the narrative, encouraging the audience to align themselves with, rather than question, the philosophy (or lack thereof) of the producers; studios, distributors, and the press release the audience from wondering about where, when, how, and by whom the film was made.

Even in the realm of the avant-garde, such questions are rarely at issue in a film’s reception: we almost always know who made it, when, where, and quite often, why. In both cases, the viewer’s concentration is focused, as it were, “within the frame”: comfortably ensconced in a well-established ontological context, the fiction plays out within a “factual” setting. It is my contention that this “factual” setting — an amalgamation of assumptions, conventions, and extrapolations based on extant knowledge and information received through promotional materials — is no less fictional than the narrative of the film proper, and no less fertile ground for storytelling. The Black Sea Tapes addresses this issue by constructing a fiction of context that does not stop at the edges of the frame.

Canada Council for the Arts references and media clip samples are available to interested institutions and employers. Please get in touch with me at remotedevice-at-gmail-dot-com to request further information.