Author Archives: karlward

About karlward

NYC ROCK MUSICIAN STOP SONGWRITER GUITARIST SINGER PERCUSSIONIST IN GHOST GHOST STOP ORIGINALLY FROM HOUSTON TEXAS STOP FAVORITE COLORS PINK AND SILVER STOP

“To The People Of The World”

“To The People Of The World, Greetings from Anonymous.” So begins the most recent press release from Anonymous.

@YourAnonNews is one Twitter account that purports to represent Anonymous, the hacktivist group responsible for a number of major cyber attack campaigns. There are several other Twitter accounts as well (@AnonRelations is another example).

Here is the aforementioned press release, itself a good example of the kind of communications made from this account:

YourAnonNews tweet about OpEgypt 2/4/2013

Anonymous wages various online civil disobedience or vigilante campaigns like the one described above (OpEgypt), and manages to do a surprising amount of public relations for these campaigns. Typically, a campaign involves a call to action and a warning to opponents, and that message is echoed chaotically across many different social media outlets (YouTube, Facebook, Twitter, Tumblr). In fact, the messaging is so chaotic that it can become difficult for the public (or the traditional media) to come to a consensus on whether or not Anonymous was involved in a particular attack. For example, take OpAngel, the protests related to the death of Aaron Swartz. Traditional media outlets seem to agree that Anonymous coordinated this January 13 attack against MIT, but there is no such consensus about this much more damaging January 22 attack. The Jan. 22 attack listed the nicknames of the attackers, including LulzSec (a disbanded group) and Sabu (a former hacker turned FBI informant), and then stated “Down with Anonymous.” The confusion about attribution for the incident is discussed here.

In addition to announcing their campaigns, these accounts also comment on breaking news, generally focusing on abuses of power or the erosion of individual rights (e.g. privacy, anonymity, voice in government). Take for instance last night’s breaking news of the just-leaked internal Department of Justice memo that describes the Obama administration’s guidelines for when to assassinate American citizens abroad. Yes, you read that last sentence correctly. Here’s the tweet about the leak:

YourAnonNews tweet about leaked DOJ memo 2/5/2013

These are in-public statements made by activists who desire anonymity and and go to great lengths to protect it. Before the explosion of social media sites and services, these communities existed online in IRC and email lists, and they still exist there, but now they have a surprisingly coordinated public presence.

[This also appeared on the Political Uses of Social Media class blog.]

Raspberry Pi First Config

I got a Raspberry Pi Model B from newark.com this week. Here are my notes about the initial configuration. In general, I’m following Matt Richardson and Shawn Wallace’s excellent Getting Started with Raspberry Pi. This is a great book for getting started, better than these notes for sure. [Aside: Matt Richardson is one of my heroes, and happens to be a classmate of mine at ITP. Check out his other rad work, for example the Descriptive Camera.]

Equipment

You’ll find the following necessary for this howto:

Prepare SD card

I used a Mac to get the Raspian OS onto an SD card, mostly following the directions in GSRP Appendix A.  You should really get that book and follow its directions, because if you screw up with dd you might soon be sitting at the Apple store asking for help with your bricked laptop.

In my case, I did the following:

  1. Download Raspian here and extract it. I’m using Raspian 2012-12-16 “wheezy” as provided by raspberrypi.org in this howto.
  2. Insert the SD card into the Mac.
  3. Open Disk Utility.
  4. Partition the SD card as MSDOS with a single partition.
  5. Find out the name of the disk device associated with the SD card (using the mount command in Terminal).
  6. Unmount the SD card using Disk Utility, but don’t eject it.
  7. Use dd to write the image directly to the SD card (BE CAREFUL, YOU COULD ERASE YOUR COMPUTER), which for me was the following in Terminal:
    sudo dd if=2012-12-16-wheezy-raspbian.img of=/dev/rdisk1 bs=1m
  8. Eject the SD card and insert it into the Pi.

Boot

Connect the Pi to wired Ethernet on a network that does DHCP. In my case, it’s my home network. Connect the Pi to power to boot it up.

If you want to watch the boot messages, or if you don’t have a wired network, you should connect a monitor and keyboard+mouse to interact with the Pi. Even though I intend to run the Pi headless, I connected it to my TV just to watch the boot messages. Watching the boot messages is also helpful because you might catch the IP address that the Pi gets from the DHCP server, which you will need if you want to SSH to the Pi (headless).

Routine Initial Config

Run through raspi-config and make whatever initial tweaks you need.  For example, here’s what I did:

  • attempt to update raspi-config itself
  • change the password for the pi user
  • expand the root filesystem
  • reboot

Install Avahi

After the Pi rebooted, I connected again and ran some software update stuff and installed Avahi:

sudo apt-get update
sudo apt-get install avahi-daemon

Avahi is a zero-configuration networking system similar to Apple’s Bonjour. Once Avahi is there, I will be able to SSH to the name “raspberrypi” on the local network, without having to know the IP address of the Pi after each boot.

Wifi

I don’t want to be connected to Ethernet by a wire, so I setup the wlan0 device following these instructions: Raspberry Pi – Installing the Airlink 101 Wireless N 150 Ultra Mini-USB Adapter (AWLL5099). For my purposes, that process looked like this:

$ sudo cp /etc/network/interfaces /tmp/interfaces
$ sudo vi /etc/network/interfaces
$ diff /tmp/interfaces /etc/network/interfaces 
5a6
> auto wlan0
$ sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /tmp/wpa_supplicant.conf
$ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
$ sudo diff /tmp/wpa_supplicant.conf /etc/wpa_supplicant.conf
0a1,8
> network={
> ssid="secret"
> proto=RSN
> key_mgmt=WPA-PSK
> pairwise=CCMP TKIP
> group=CCMP TKIP
> psk="secret"
> }
$ sudo ifdown wlan0
$ sudo ifup wlan0
$ ifconfig wlan0 | head -2
wlan0     Link encap:Ethernet  HWaddr 00:11:22:aa:bb:cc
          inet addr:192.168.1.30   Bcast:192.168.1.255  Mask:255.255.255.0

Go wireless

I removed the Ethernet cable and rebooted (by pulling the power temporarily).  The Pi booted and Wifi connectivity worked.

MIDI, SuperSensor, and Transport

Pete Repeater is our novel physical interface for audio loops. Our device and its Arduino code control an audio looper by sending MIDI “Note On” messages over a MIDI cable to a computer running the Ableton software looper. Ableton MIDI mapping is used to translate the incoming MIDI from Arduino into Ableton actions (e.g. pressing the stop button on
the software looper).

From the beginning of the coding, we wanted to keep the code as simple as possible. We sought to use existing Arduino libraries, as well as techniques taken directly from class. This led us into some interesting directions, including the creation of two new Arduino libraries (“SuperSensor” and “Transport”).

MIDI was the first hurdle. There are two commonly-used approaches to use MIDI on Arduino. One way is to use the Arduino MIDI library, and the other is to write MIDI directly to the serial port. Tom advocates the latter approach, and that’s the way that Louise and Natasha hooked up ColorPlay to MIDI. I wanted to try the Arduino MIDI library because I hope that this project eventually can do a lot more MIDI than our prototype does. For example, if our project could take MIDI input it could have access to the MIDI clock of another device, allowing the looper to work in sync with the tempo and meter of another device (e.g. a drum machine).

Tom suggested that we start with the simpler (non-library) method and move to using the MIDI library if/when we came to need the additional MIDI functionality. He also advised us that the non-library method allows easy use of a SoftwareSerial device, freeing up the hardware serial port for debugging (e.g. Serial.println commands). We switched back to the DIY MIDI, but didn’t use the SoftwareSerial port (due to lack of time, mostly). One MIDI related problem popped up in our circuit, we which got resolved after talking to Louise and Natasha. The Fritzing diagram of the MIDI wiring in the ITP MIDI tutorial has two problems. First, the power and ground connections are wrong–pin 2 should go to ground, not power. Second, the pins are not numbered or labeled on the diagram, so it’s not clear which pin is 4 and which is 5. Louise and Natasha had figured out the correct wiring so we took a look at their circuit and got ours working.

With the MIDI output working, the next step was getting the analog sensors to deliver reliable info about the state of PeteRepeater. The first thought was to do some averaging of the values coming out of the Arduino analogRead command. But we planned to have multiple sensors, so that means we needed to keep track of the averages for several sensors simultaneously. Since Arduino is basically a C/C++ coding environment, I assumed I could use a C struct to keep all this data in one variable per sensor. This proved challenging in Arduino, because structs have to be used in a very specific way within the IDE. After trying various strategies, I abandoned the use of the C struct and dove into the creation of my first Arduino library, which I named “SuperSensor.” The library defines a new type (SuperSensor, which is an object) that wraps analogRead and provides a moving average method. Each sensor will have its own SuperSensor object, so the code for averaging only has to be written once. The Arduino library tutorial was the main resource I used to get the library code working.

After the sensor value averaging was figured out, the next challenge was the creation of an audio transport. Our Arduino code could now tell whether the piece was in the bank, but we only want to send MIDI commands when the state changes: when the piece goes in, we want to send a MIDI command, and then not send another MIDI command until the piece is removed. In essence, we need to track the current desired state (e.g. recording) and also we need to know if the desired state is different from the current state. This led to the creation of a second Arduino library called “Transport.” The library defines a new type (Transport, an object) thats methods for the audio operations we implement in our project. The object keeps good track of when state transitions occur, and provides a way to find out when they do. The code is definitely not sophisticated in how it tracks state transitions and will be augmented soon to make it more robust. The next feature will be the addition of user-definable callback functions that will be called whenever state transitions occur. For example, a user of the library should be able to write some code and attach it to the record state, so that anytime the transport goes into the record state, the user code is called.
From a cursory review of how other Arduino libraries implement callbacks, this does not look terribly difficult.

I learned C++ in a college class back in the day, but I have not ever written anything of significance in C++. I did not expect to be writing C++ code in this class, or really ever again, but the Arduino library tutorial and the open source libraries distributed with Arduino make the creation of a simple Arduino library about as easy as it could be. Though the code for SuperSensor and Transport are on GitHub already, I plan to refine the libraries a bit before announcing their release.

The use of existing and new Arduino libraries has enabled us to keep our Arduino code simple and readable. C++ is back, it is in your basement, the code is coming from INSIDE THE HOUSE!

Birth of Pete Repeater

For my PComp final project, I started with a short list of four possible ideas. I casted about for potential collaborators, and Jon Wasserman agreed to brainstorm with me on the project. We kicked a bunch of ideas around and kept running into a wall called Tom Igoe. I mean that in a good way. Let me explain.

Intro to Physical Computing is a class about meaningful interactions between humans and objects, focused on the capabilities and physical language of the human body. Many of the project ideas that Jon and I pitched to each other (or pitched to Tom and our class) did not fit the type of interaction that is the goal of the class. I came to realize that our project ideas mostly fell into these categories

  1. neat device that does not require significant human interaction
  2. obstruction that explores human relationship to technology
  3. novel use of the physicality of a technological object

When the class met to talk about our project ideas, in every project proposal Tom would ask the same first question: what does the human do? This question is what I’m going to call the “Igoe Wall,” the barrier between neat interactions and meaningful interactions.

One of my project ideas was a live audio looper, and this is the project that eventually morphed into our actual final project. When I initially described it to Tom, I called it “a live audio looper stompbox that doesn’t suck.” I explained how frustrating and limiting the typical looper is, since it is usually controlled by foot switches. This is where I encountered the Igoe Wall, a la “why do you want to make a stompbox if you already know that you dislike that interface?” and “couldn’t you make a different interface that is more playful, more expressive?”

So I went home and sat in front of a computer throwing out as many different interfaces as I could think of. One of my first ideas was inspired by the first Superman movie, the crystal computer in Superman’s Fortress of Solitude. After writing up descriptions of about ten of these possible interfaces, I started to see a way to climb over the wall.

The inspiration was the band Mission of Burma, who have done live audio manipulation during their shows–and did it way back in the early 1980s–with tape machines instead of our fancy digital shenanigans. The difference between Mission of Burma and a lot of groups that do live audio manipulation is simple: with Mission of Burma, the person doing the live audio manipulation (first Martin Swope, later Bob Weston) is not playing any other instrument. In fact, they start with the assumption that live audio manipulation is an instrument in and of itself, rather than a tool used by a musician. As soon as I embraced the idea that the looper did not have to be controlled by a musician who is probably busy doing something else, the interface options opened up dramatically. The silly notion of building an interface that worked like Superman’s crystal computer did not seem impossible anymore.

As I worked on this initial brainstorm, the idea that held my attention longest on was inspired by puzzle pieces. Imagine a looper that is turned on by putting a specially shaped piece into a “bank” that is custom made to hold those pieces. If you put the piece into the bank in the forward direction, the looper will record and playback. But if you flip the piece over, the looper will reverse the loop and play it backwards. The pieces will be sized according to the number of musical measures each contains. A “1 bar” piece will be one quarter the size of a “4 bar” piece. I wanted the pieces to only fit in two ways, right-side-up and up-side-down, but not when the pieces are rotated.

When I presented this idea to the class last week, I got some great feedback from Tom and my classmates. Tom honed in on a few points of interest:

  • explore the difference between a musical tool and musical instrument–what makes them different?
  • think about the physical language of musical performance, and how you might translate the physicality of a guitarist or a DJ into the interaction

My classmates suggested many other details, and the two that stuck were:

  • aim for something usable by kids (Jay)
  • think much more closely about exactly what happens when a piece is picked up and when it is put down (Natasha)

It was around this time that Jon and I agreed to shack up on this project. More about that in a later post.

Slow Down, Buy Some Apples, Eat a Cookie

New York has, for me, always been a walking city. Not strolling like one might imagine the Parisians do, but fast walking, like a New Yorker. I love walking and I can’t imagine how different my life would be if I had spent my young adult days in a place like Houston (my hometown) where walking is just not part of the culture. The obvious pleasure of walking in New York is the infinite variety of paths one can take. You can always take a different street that you’ve never seen, or you can zigzag through a different neighborhood that you haven’t visited in a while. Stop at a park for a minute, or walk downtown along a river. But the other great thing about walking in New York is much more subtle, and it has everything to do with the subway. When you travel somewhere in NYC, you generally walk to the nearest subway stop. You don’t know exactly when the train will come, so you aren’t watching the clock like you would if you were trying to catch the 7:11 out of Hoboken–because if you miss the 7:11 you will have to wait an hour for the next train. It’s a subtle difference, but I think everyone would agree that watching the clock changes the character of any moment.

Last year, I moved out of the five boroughs, and my experience of New York became the commute: always a train to catch; always counting the minutes and calculating the effect of any delay; keeping mental tabs on the likelihood of catching the train; and worst, only (and always) shuttling to or from a subway station or Port Authority or Secaucus or Hoboken or Penn. It’s not the same experience of the City at all.

This change became apparent to me when a classmate invited me to visit the Union Square Farmer’s Market one sunny afternoon. As I walked the short blocks from Waverly Place up to Union Square, I felt myself walking like a commuter. I thought–wait a minute, why am I hurrying? I slowed down a little, and I consciously avoided looking at the time. I’m sure my blood pressure dropped ten points. I walked the last couple blocks, from 12th Street to Union Square, a little more like the old New Yorker that’s still in there somewhere.

At the bottom of the park there was a craft fair going on, but I walked past it and focused on my invitation, the farmer’s market at the top of the park. It had been more than a year since I visited the farmer’s market, and I remember the last time. My wife and I bought some New York state local honey from one of the apiaries. Then we walked the rest of the way home, stopping at the Tompkins Square farmer’s market and buying some local fish there. We walked much slower than usual then too, because she was pregnant with our daughter at that time.

Today I decided to look for cherries, but apparently I missed the window because none of the stands had any. After checking out a few stands, I picked up a bag of honeycrisp apples. Honeycrisp for the win.

There was a bakery stand that advertised their cookies, so I followed my “no place to get to” vibe over there and picked out a chocolate walnut cookie. It was cold outside, and the cookie was cold as well. It also wasn’t super fresh. As I realized these things, I happened by another bakery stand that was crowded, and probably for good reason. Lesson learned: go to the busy bakery stand.

The apples turned out to be great. The cookie was just so-so. But the best of the experience was just slowing down for a little while and appreciating the city, with nowhere in particular to be.