stock market music

Zebra.jpg

stock market music


The music is generated by an application written in php, mysql, javascript, and max/msp. The program gathers stock quotes from the internet, over a period of time, and formats the data into midi messages which drive a synthesizer.

Quotes are logged once per minute. The conversion follows two general rules:

case study


Google April 16, 2010

audio examples


These excerpts were taken from March 30 and March 31, 2009 - using the following stocks

play
description
time

quotes spanning 4 hours using random instrument sounds
9:03

an example using piano-like sounds
3:53

an example featuring bell sounds
1:06

an example using random instrument sounds
1:49
(to download music: right-click the song name and select save)



is this program available for investors?


No. The current of version of the program requires a linux server and another computer running Max. The next version will work as a standalone web application.

even more details...


Here's a screen shot of the web based control program. It has two functions: tracking and playing. When tracking, it gathers stock quotes from Yahoo and calls a PHP program which saves the stock data in a MYSQL database. When playing, it calls another PHP program which retrieves quotes and formats MIDI note messages based on analysis of the data which takes into account the ranges of price, volume, and time. The formatted MIDI data is then sent via UDP to a server running Max. Data is formatted using the Open Sound Control (OSC) protocol.

stock_web_control.jpg

Here's a screen shot of the Max server program. It listens on a UDP port for incoming data. When the data transmission is complete It sends a message back to the web server letting it know the data was received. Then it unpacks the data and sends it to a MIDI synthesizer.

max_server.jpg