Music 172: homework 1
The first assignment is to make a looping sequencer controlled by a "data"
window. A very simple kind of structure will do (athough you'll probably
find you want to add stuff.)
Here is the way a simple one might look:
The things you have to do to get this to work are:
- make a template window with a "struct" defining the data you want
to use and various drawing commands (such as "drawpolygon") so it is visible.
- You'll have to make the first datum using the "append" object. Perhaps you
should leave it around in a subwindow so we can see how you did that.
- The "struct" should contain at least an "x" and "y" element so the data
can figure out where to get drawn on the screen.
- Make a window named something revealing like "data", and put 8 or 12
(or 13 if you prefer) data in it.
- Now make a sequencer. There should be clear "start" and "stop" controls,
as well as volume, on the main window. THe sequencer itself should be neatly
tucked away in a subwindow. It should go through the data in sequence,
and detect automitically when it hits the end to loop back to the beginning.
- Better send a message to "sort" the data window each time the sequencer
loops. Sorting takes very little CPU time.
- get some parameters out of the data, such as pitch and loudness but
preferably at least three of them, and send "packed" lists to a separate
subwindow that is the synthesizer. This needn't be more complicated than the
one I showed in class for example.
- tune it so that something pleasant comes out...
For extra credit, try the much harder task of making probablistic jumps in
the sequence, perhaps as shown here:
Some tricks for making random decisions will be revealed April 5.