MAS.110 | Fall 2008 | Undergraduate

Fundamentals of Computational Media Design

Assignments

Exercises

Exercise 1

Use type/letters to convey some concept or message such that the arrangement of the letterforms visually represents/interprets/reinforces the message.

  • As an example for inspiration, see Chapter 6 in Carter, R., B. Day, and P. Meggs. Typographic Design: Form and Communication. 4th ed. New York, NY: John Wiley & Sons, 2006. ISBN: 9780471783909.

Exercise 2

Play with Python/Pygame on the XO Laptop. Take one of the example programs provided and modify it to be more “interesting.”

  • Pygame examples, by Henry Holtzman (TAR)

Exercise 3

Play with CsoundXO and MusicPainter on the XO Laptop.

CsoundXO package, by Barry Vercoe:

MusicPainter for XO, by Wu-Hsi Li:

Exercise 4

Use any technological method or apparatus to create a visual image in the style of one of the art movements discussed in Britt, David, ed. Modern Art: Impressionism to Post-Modernism. New York, NY: Thames & Hudson, 2008. ISBN: 9780500238417.

Exercise 5

gtk + csound exercise (in-class during Lec #24)

Essays

Essay 1

Write 6-8 double-spaced pages describing a technological artifact with which you have a “relationship” (with or without quotation marks).

Essay 2

Write 6-8 double-spaced pages describing a painting at the Boston Museum of Fine Arts in one of the styles discussed in Britt. Look up an image of the painting on the MFA Web site and discuss the difference in its appearance from that of the actual painting. Discuss also the difference in your personal experience of viewing the painting at the MFA with that of looking at a picture on the computer screen.

Essay 3

Write a 6-8 page essay on your experience with Exercise 4: what you were trying to do, and the process by which you did it (and how you discovered/developed the process).

Final Project

Using a technology/medium of your choice, and building on the broad range of readings, experiences, and projects throughout the term, explore in depth the intersection of technology, perception, and human expression. Project proposals will be critiqued/debugged in class discussion, and your final project should take into account the comments of your classmates.

These instructions are provided by Wu-Hsi Li. (Courtesy of Wu-Hsi Li. Used with permission.)

Description

CsoundXO server, CsoundXO Python API, sample sounds, sample Python programs.

Software Download

CsoundXO software package, by Barry Vercoe: (TAR - 37.2 MB)

I wouldn’t suggest you to download the file through Browse activity since the file management in XO is kind of tricky, but if you’re interested, see http://wiki.laptop.org/go/Journal_Activity. Please download csoundxo.tar and Musicpainter.tar from your own computer, and copy to a flash disc.

Installation

  1. plug your flash disc on XO, then open a terminal activity on XO
  2. “su” - become root
  3. “mount” - check the id of your flash disc
  4. “mount /dev/sda1 /mnt” - the device name varies, replace the device name with the actual one
  5. “exit” - exit root mode
  6. “cp /mnt/csoundxo.tar /home/olpc/csoundxo.tar”
  7. “cp /mnt/Musicpainter.tar /home/olpc/Activities/Musicpainter.tar”
  8. “tar -xvf csoundxo.tar”
  9. “su” - become root again
  10. “umount /mnt” - unmount
  11. “exit”

Music Demo 1

A Whitney Houston piece:

  1. Python csndxogui.py
  2. press “launch server”
  3. press “connect” to localhost
  4. press “play 10whit”
  5. press “stop”, and “disconnect”, and “shutdown”

Music Demo 2

Make two XOs play together on remote machine

  1. get a remote machine
  2. make sure both XOs connect to Internet or to the same mesh
  3. check the IP from the remote machine by “ifconfig” in the terminal
  4. go to the csoundxo folder, run csoundxo (./csoundxo)

On main machine

  1. Python csndxogui.py, press “launch server”
  2. enter the remote IP, press enter
  3. connect to both csound servers, make sure you see green lights on both sides
  4. press “duo performance”
  5. to stop, press “stop”, “disconnect”, “shutdown”

This material is by Wu-Hsi Li. (Courtesy of Wu-Hsi Li. Used with permission.)

Download the MusicPainter TAR file and expand archive to get Musicpainter.activity folder

Try the following steps, and start imagining possible design of musical games over one or multiple laptops.

# change directory to Musicpainter.activity folder
# (cd /home/olpc/Activities/Musicpainter.activity)
# run example python file (python exercise.py)

# hack the exercise.py program (use text editor like vi to edit your py file)
# or use command line programming to try the following program line by line
# (execute “python” and type in the program by lines)

from CsoundXOAgent2 import CsoundXOAgent     # import csoundxo

# I re-wrote the CsoundXOAgent2 so no callback is needed now

csound1 = CsoundXOAgent(“localhost”, 7000)

# if you want to connect to a remote server, you need a csoundxo server 
# running and listening - “cd /home/olpc/csoundxo”, and “./csoundxo”

# sometimes, you leave the program and the network port hasn’t been released
# you might see “Server: socket failed to bind”
# normally, the port will be released after 1 minute, so keep trying
# in some cases, you will need to restart the machine

csound1.sendLinevt(“i8 0 2 1 0”)  
csound1.sendLinevt(“i1 0 1 1 7.00”)     # format information see below
csound1.sendLinevt(“i1 0 1 1 7.02”)
csound1.sendLinevt(“i1 0 1 1 7.04”)
csound1.sendLinevt(“i1 0 1 2 7.04”)
csound1.sendLinevt(“i1 0 5 2 7.04”)

csound1.close()   # shutdown the server

# line event format

# field 1: instrument, 1: piano, 2: accordion, 3: string, 4: pizz, 5: clarinet, 6: guitar, 7: bass, 8: percussion
# field 2: start time (sec)
# field 3: duration (sec)
# field 4: volume, 1.0 = normal
# field 5: for percussion instrument, assign 0 ~ 17 for different sounds
#             for pitch instrument, assign a.bb;
#             for example 8.00 is a C5, 8.01 is C#5, 8.02 is D5, 7.00 is a C4
# you can also send events to multiple csound servers,
# assign different IP and have the csoundxo listening in remote machine

This material is by Wu-Hsi Li. (Courtesy of Wu-Hsi Li. Used with permission.)

# Start by downloading gtkexercise.py (PY)
# “cd /home/olpc/Activities/Musicpainter.activity”
# We’re going to borrow the csound orchestra, sound samples and
#     other python programs from Musicpainter, so please put gtkexercise.py
#     under the same folder with Musicpainter.activity. 
# “fget http://www.media.mit.edu/~wuhsi/csoundxo/gtkexercise.py"

# If fget doesn’t work, make sure your green machine is connected to the Internet.
# When the machine is connected, the browser should allow you to browse any webpage.
# Also, if you open a terminal, you can get your IP by the command “ifconfig”.
# If you don’t have a Internet IP, your machine is not connected (yet).

# You can use text editor like vi to edit your py file (“vi gtkexercise.py”)
# Please try to read the python program

# To run the program, do “python gtkexercise.py”
# This program will display the keyboard and mouse events it captures on the screen
# Press “Escape” key to leave the program

# In key_press_event(), you can find the following line 
        # self.sendCsoundEvt(“write your own csound line event”)

# You can try to rewrite the event string

csound1.sendLinevt(“i8 0 2 1 0”)  
csound1.sendLinevt(“i1 0 1 1 7.00”)         # format information see below
csound1.sendLinevt(“i1 0 1 1 7.02”)         # these are a note event with finite duration
csound1.sendLinevt(“i1 0 1 1 7.04”)
csound1.sendLinevt(“i1 0 1 2 7.04”)
csound1.sendLinevt(“i1 0 5 2 7.04”)

# line event format

# field 1: instrument, 1: piano, 2: accordion, 3: string, 4: pizz, 5: clarinet, 6: guitar, 7: bass, 8: percussion
# field 2: start time (sec)
# field 3: duration (sec)
# field 4: volume, 1.0 = normal
# field 5: for percussion instrument, assign 0 ~ 17 for different sounds
#         for pitch instrument, assign a.bb,
#         for example 8.00 is a C5, 8.01 is C#5, 8.02 is D5, 7.00 is a C4

# If you rewrite both event strings in key_press_event and key_release_event
# the duration of note_on event should be assigned -1 (infinite)
# and the duration of note_off event should be assigned 0

This material is provided by Wu-Hsi Li. (Courtesy of Wu-Hsi Li. Used with permission.)

Description

MusicPainter is a networked graphical composing environment which aims to encourage sharing and collaboration between users. It has an easy-to-use composing interface, which turns music score into colorful painting. It guides the users to begin composing by creating mini-composition such as a melody or rhythm pattern, which we called musical brick. These bricks are collected and organized as a shared composing resource, which becomes a dynamic source of inspiration. The users can also browse and hack music pieces composed by others through the music browser. MusicPainter is not only a composing interface, it provides an environment where users can gather and learn how to compose from each other. It creates a place where different musical perspectives collide.

For more background, see this MusicPainter introduction page.

Software Download

MusicPainter for XO software package: musicpainter.tar (TAR)

Installation

  1. see the installation steps from csoundxo download page
  2. cd /home/olpc/Activities
  3. tar -xvf Musicpainter.tar

Execution

  1. cd ./Musicpainter.activity
  2. Python Musicpainter.py (it takes a while to launch the program)

Course Info

Learning Resource Types
Problem Sets
Programming Assignments
Presentation Assignments
Written Assignments