Sonification of Mass Ave buses, from Nubian to Harvard.
Updated for Max8 and Catalina
This patch requests data from MBTA API to get the current location of buses – using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more interesting to poll at a slower rate, because the updates don’t seem that frequent. And buses tend to stop a lot.
This project uses version 3 of the API. There are quality issues with the realtime data. For example, there are bus stops not associated with the route. The direction_id and stop_sequence data from the buses is often wrong. Also, buses that are not in service are not removed from the vehicle list or indicated as such.
The patch uses a [multislider] object to graph the position of the buses along the route – but due to the data problems described above, the positions don’t always reflect the current latitude/longitude coordinates or the bus stop name.
You will need to replace the API key in the message object at the top of the patch with your own key. Or you can probably just remove it. The key distributed with the patch is fake. You can request your own developer API key from MBTA. It’s free.
Open the Max console window so you can see what’s happening with the data
click on the yellow [getstops] message to get the current bus stop data
Toggle the metro (at the top of the patch) to start polling
Turn on the audio (click speaker icon) and turn up the gain
Note: there will be more buses running during rush hours in Boston. Try experimenting with the polling rate and ramp length in the poly-oscillator patch. Also, you can experiment with the pitch range.
The Soundcloud client-id is embedded in scnode.js – you will need to edit this file to replace the worthless client-id with your own. To get a client ID you will first need a Soundcloud account. Then register an app at: http://soundcloud.com/you/apps
first time instructions
Open the Max patch: sc.maxpat
In the green panel, click on [script npm init]
In the green panel , click on [script install soundcloud-api-client]
Open the Max patch sc.maxpat
open the max.console window so you can see the API data
click [script start]
click the speaker icon to start audio
type something into the search box and press <enter> or click the button to the left to search for what is already in the box.
select a track from the result menu, wait for it to download and start playing
How to run the server side (base station) of the remote shortwave radio system.
(Under construction) The patches have not been uploaded to github yet.
Assuming that the radio and antenna system are operating. We are using an internet connected MacBook Pro running OSx 10.9.5, with a MOTU 828 MK3 audio interface.
Install and set up LogMein Hamachi. It is free, for a limited number of computers. Set up a Hamachi server on both the server and client. It should look something like this:
We are using Soundjack VOIP. It is also free. Use the following parameters on the server side.
mic: audio interface channel that is connected to radio audio output
headphone: doesn’t matter
audio block samples: 512
network packet samples 512
UDP/IP: enter hamachi IP of client.
When Soundjack is set up on the client. Press the green start button on the right side of the user list window on the server.
If all goes well, you should hear the radio on the client. Note: The input meter under local settings should be registering audio from your radio. If not, there is a problem with the audio interface.
The Max/MSP server exchanges CAT commands via the server serial port to the radio. The command data is exchanged with a Max patch on the client using OSC (over UDP).
select the radio serial port from the menu (for example: usbmodem 14531)
initialize port settings
set toggle to poll the serial port
At this point you should be able to try the example commands, for instance to get the version or set frequency. If the commands are not working, it indicates a problem with the serial connection to the radio.
Next, check the IP address of the udpsend object. It should be the hamachi IP of the client.
“Commissioned for the BBC’s make it digital event, the brief was ‘to get children into code’. My installation downloaded the event’s twitter feed in real time and displayed the page’s body text inside the bodies of passing people. Moving their hands around allowed people to scroll through the html/js/CSS.”