algorithmic riffs: hw4 (due 29-Oct 10am)
Run the example 220a/hw4/hw4.ck (which was demo'ed in class) with its repeating phrase structure and the gradual “warming” of their dynamical system melodies from one phrase to the next. From order to chaos.
Change the system
Substitute the logistic map polynomial for the polynomial used in 220a/hw4/hw4.ck and call the new file something like log.ck. Edits to the entire function definition of poly, to its argument list, to a couple of the arguments in the function call to interp are required to make this work. Also good if you change the string that prints as the program runs. What follows are the new forms for these items, but not necessarily in the order mentioned. Play match-that-code with the proper placement in the new program. The last of these says [delete] and that really means to delete those statements, not to write the word delete into the program... just to be clear about that.
r * x * (1.0 - x)
float x, float r
[delete] -0.7 => float a1; 2.0 => float a2;
Set the program to play 5 phrases of 40 notes each. It will evolve from order chaos. Consider this entire program to be `A' and keep it around. Next, create a variation `B' which also evolves from order to chaos but sounds different (in some way, for example, your pitch choices, pitch range, instrument choice, and / or tempo are possible mods to experiment with). Each variation should be 5 phrases long. Create a third variation `C' that contrasts with `A' but in a different musical direction than `B'.
New Soundfile output method
Use the chuck soundfile writing method rather than audacity. Add this at the beginning of time:
// to write soundfile
dac => WvOut o => blackhole;
"/zap/dyn.wav" => o.wavFilename;
and after the sounds are played, at the end of your program:
// close soundfile
// in miniAudicle, after it plays, you need to manually stop "virtual machine" to complete file output.Where the code specifies the filename, make sure that is a valid directory path on the machine you are using. At CCRMA, you'll be fine because all machines have the /zap directory. You can change the filename, just be sure it's into a directory that exists and you have permission to write. If you strip out the directory, e.g., just dyn.wav then it will write into your home directory.
A variation study that has the form A-B-C-A, file name: