Python web server

Simple command line web server for Mac OS

Run this command, in a terminal window, from any directory:

python -m SimpleHTTPServer 8000

Then you can access web pages in that directory tree. For example, to load a page called index.html (in the same directory) type the following URL into a browser:

http://127.0.0.1:8000/index.html

More information here: http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450

 

ep-413 DSP – week 11

Filters

fil5

Analog

fil12

Digital

Other

We usually think of filters in terms of frequency. Any process that removes information is a filter. Curation or abstraction, for example.

Reversability

examples

 

MBTA bus data in Max

Sonification of Mass Ave buses, from Harvard to Dudley.

Screen Shot 2014-11-11 at 3.26.16 PM

This patch sends requests to the MBTA developer portal 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.

MBTA developer portal: https://reactivemusic.net/?p=17511

Here is the get request URL used in the patch:

http://realtime.mbta.com/developer/api/v2/vehiclesbyroute?api_key=wX9NwuHnZU2ToO7GmGR9uw&route=01&format=json
download

https://github.com/tkzic/internet-sensors

folder: mbta

patches:

  • mbta.maxpat
  • mbta.js
  • poly-oscillator.maxpat
authentication

You will not need authentication to run run this patch. It uses the default developer API-key for testing. Please read the terms of service at the MBTA developer portal. Data should not be polled more often than 10 seconds. You can also request your own developer API key from MBTA.

instructions
  • Open mbta.maxpat
  • Toggle the metro (at the top of the patch) to start polling
  • Turn on the audio (at the bottom of the patch) 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.

 

data-stream-switch.maxpat

 

ep-413 DSP week 10

Music from data

seagulls

We looked at Vine API Examples from Eli and Steve H.

OSC (Open Sound Control)
  • Max udpsend, udpreceive, touchOsc, aka.speech
  • using a wifi router for performance projects

Using an Osc server to handle Internet API’s

Searchtweet (rate limited): https://reactivemusic.net/?p=17425

Max oggz streaming example: https://reactivemusic.net/?p=17504

We talked about cartoons: https://reactivemusic.net/?p=10091

Sonification
  • parameter mapping
  • modeling
  • earcons

We didn’t talk about alarm fatigue…

MBTA bus example in Max:

(parameter mapping sonification)

https://reactivemusic.net/?p=17524

  • documentation
  • API keys
  • JSON
  • Max example
Unsolved problems

Is it possible to generate music from data?