250a Graphics Lab
From CCRMA Wiki
Lab 6: Graphics
See this quarter's schedule for due dates.
In this lab we will explore different possibilities for computer graphics in musical interaction using the Beagleboard, Pd, and a custom graphics system called SimpleGraphics. You need your MaxKit, with Satellite CCRMA.
Setting Up Software
- Use the usual procedure (see described before) to power up Satellite CCRMA and login as the user ccrma with the password temppwd.
- Download the lab files to your laptop.
- Copy the lab files to your home directory ~ using CyberDuck.
- Unzip the files directly on your board: change into your ~ directory and unzip the archive by running the following two commands:
- Remove the archive file by typing
- Change to the ~/graphicslab2012 directory by typing
- Install the graphics software by running a script (this will take a while and require entering the password temppwd):
- If the installation was successful, then remove the graphics software archive:
SimpleGraphics is a small program that can receive information about graphics primitives and then render these using OpenGLES. The result is a quick and easy visualization tool for environments that otherwise might have difficult rendering hardware accelerated graphics, such as Pd on the Beagleboard.
To get started with SimpleGraphics, connect your Beagleboard to a monitor and run the SimpleGraphics program on the Beagleboard:
cd SimpleGraphics/ ./SimpleGraphics &
At this point you should just see a blank screen, because we have not given SimpleGraphics anything to draw yet.
Open up "simplegfx-primitives.pd" in pd:
pd simplegfx-primitives.pd &
Follow the instructions in the patch.
You can see that each drawing "command" consists of
send /sg/somecommand object-name a-bunch-of-numbers
The command either creates or modifies an object that has that name, according to the parameters in the remainder of the command. For the ellipse command, these numbers correspond to
x-position y-position width height color-red color-green color-blue color-alpha
send /sg/rect myrect 0 0 0.1 0.1 1 0 0 1
will create a rectangle a position (0, 0) with size (0.1, 0.1), with a color of (1, 0, 0, 1), e.g. pure red.
Make A Musical Interaction
As the final main deliverable of the lab, you should cause your Satellite CCRMA kit make some sound that depends on how you manipulate the sensors. For example, you could make a musical instrument, a music controller, a mock-up sound art installation, or some other sonic interaction. Now that you have had some experience synthesizing sound, your sound synthesis patch should involve more than just a few osc~s. Think about what you want to design before you get started.