Assigned Date: Friday, Mar. 22
Due Date: Friday, Mar. 29
Due Time: 30 mins before class
Assignment
This assignment synthesizes several things we have seen already in class, namely the boids algorithm, sonification, AudioSample, and the MIDI library.
Write a Jython program that creates a simple chaos synthesizer.
- Use the AKAI Mini MIDI controller to control different aspects of the boids movement (this is similar to the previous assignment, except you are using the MIDI controller – not a GUI display).
- Then, map boids movement to control the frequency (or other parameters) in different voices of an AudioSample (as demonstrated in class).
Notes
You should be able to play individual notes (via the AudioSample) by using the MIDI keyboard. One note at a time is fine.
Then you should be able to control the sound of the note, by modifying knobs on the MIDI controller (which modify the movement of boids, which is mapped to the frequency of AudioSample voices).
Keeping the display of boids visible is fine, as it helps us visualize how the sound is affected.
Starting with a sine WAV is best. Once you get it working, feel free to experiment with other sounds.
Remember
Your code should be modularized, i.e., within the same file, keep the boids code as separate as possible, from the MIDI controller code, and from the AudioSample code. Provide good documentation to be able to find the different sections, and what they do.
Design, design, design.
“20 hours of coding can save you two hours of design”
So, start on paper, and return to it often.
Documentation
Your code should explicitly identify the changes you made to the original boids.py code. Your grade depends heavily on this. To facilitate grading, using the following commenting convention to mark all the points in your program where you modified the original.
### <BEGIN CHANGE> ******************************************************* ... <changed code> ... ### <END CHANGE> *********************************************************
For example, and notice how any original code is kept and commented out, to facilitate comparison:
### <BEGIN CHANGE> ******************************************************* class Boid: #def __init__(self, x, y, radius, color, # initVelocityX=1, initVelocityY=1 ): # """Initialize boid's position, size, and initial # velocity (x, y). # """ def __init__(self, x, y, radius, color, initVelocityX=1, initVelocityY=1, voice=0): """Initialize boid's position, size, initial velocity (x, y), and corresponding synth voice. """ ### <END CHANGE> *********************************************************
In general, follow the documentation instructions from Homework 2. Also, follow the textbook examples on how to write comments.
Submissions
1. Bring to class the following:
- A printout of your Python program (including the above documentation markings). Make sure I can read your whole code in the printout.
- Be ready to demonstrate your program in class.
2. Also, submit your Python (.py) file on OAKS, so I can run it on my computer – with all the necessary audio files.
Grading
Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.
Reference
- Cooper, D. and Clancy, M. (1985) “Oh! Pascal”, 2nd ed., W.W. Norton & Company, New York, p. 42.
