Homework 3: Physical Model and Sampler

First Milestone due on 10/28(SUN) 11:59pm | Final Submission due on 11/2(FRI) 11:59pm

Before You Start

This assignment involves algorithmic control from chaotic systems and other equations. Read the wikipedia article about Logistic Map and listen to Erocolino Ferretti's "Pipe and Drum" (1963)

Overview

Turn in a binaural-encoded version of a short (ca. 1-2 minute) duet study featuring algorithmic performance. It'll happen in two phases, first as musical sketch which the TAs can hear. Then for final work, as in homework 2, work on a "master" in live four-channel surround and when it's ready transform it for headphones.

Download starter code: hw3-starter.zip

Form

There will be two instruments making the music as in Ferretti's "Pipe and Drum," only for this study these should be a ChucK physical model paired with sample playback from a soundfile. Borrow the musical form from Ferretti's piece: solo intro, second instrument entrance and solo, duo to end containing moments of sync interspersed between lots of independent playing.

Instruments

Available physical models are (alpabetically): BandedWG, BlowBotl, BlowHole, Bowed, Brass, Clarinet, Flute, Mandolin, ModalBar, Saxofony, Shakers, Sitar, StifKarp. Some are more difficult to get a decent sound from than others! Experiment. Use more parameters than just pitch frequency.

Sample playback uses the SndBuf unit generator. Pull in a mono .wav file from anywhere or record a new one with your mic and Audacity. Play "notes" from it by triggering short clips played from different start positions and with different playback rates. Pass through an Envelope unit generator with long enough rise and decay times to avoid discontinuities that introduce clicks. Feel free to refer the following resoruces/references:

The physical models have pitch and loudness ability (frequency and various ways to control loudness e.g., Clarinet.startBlowing). They also have extra parameters for timbre change (e.g., Clarinet.reed). Two parameters are of interest in SndBuf: SndBuf.pos and SndBuf.rate which the position to read from in the input file and the rate at which to read it.

Algorithmic Performer

First off, see hw3-exampleScore.ck (included in the starter code). Make sure to read important notes and comments inside the code. The code will create intermediate files into the directory where the source code is. Put your own audio material into the source code's directory and name it sample.wav. Also you need to have sox on your machine to merge two products into one stereo file.

It has a function declared as:

algorithm(float state, string type, float r)

which can be called with arguments like algorithm(state, "logistic", 3.9);

The function creates a sequence of events. It can create a sequence using a dynamical system algorithm (logistic map) or a standard algorithm (random number generation or sinusoid). Your job will be to select the desired instrument and its parameters and control it with your choice of algorithm at a given time in your piece. Don't just use simple repeating durations, experiment with rhythms also controlled by the algorithms.

It should be possible to generate the entire piece from one .ck script. As in hw3-exampleScore.ck, the way to do this is a time-ordered sequence of spork operations. Study the functions named pLoop, sLoop and what they do when sporked.

1 => First Milestone

Deliverablesdue on 10/28(SUN) 11:59PM
  • Stereo audio file (.wav)
  • ChucK score file (.ck)
  • HTML page (hw3.html) - includes links to all the files above.
Walkthrough
  1. Select physical model instrument
  2. Select your own audio file and rename it sample.wav file and put it into your working directory where your score file will be
  3. In your working directory, create a ChucK score file score based on hw3-exampleScore.ck
  4. Write out the two dry tracks, each instrument into a separate mono .wav file and merge into a stereo file for TA's to listent to
  5. Turn your "sketch" in Homework Factory
  6. Wait for TA's feedback

2 => Sound Stage

Delivarablesdue on 11/02(FRI) 11:59PM
  • Stereo audio file (.wav) - binaural-encoded stereo
  • ChucK source codes (.ck) - the codes you wrote
  • HTML page (hw3.html) - includes links to all the files above.
Walkthrough
  1. Edit your work according to TA suggestions, if any. Then generate final versions of the 2 dry mono .wav files
  2. In a new .ck file, use two instances SndBuf to read the 2 mono files and use two instances of DBAP4e class for panning and reverb, one for each of them. DBAP4e has 4 output channels that are pre-configured for Quad stations at CCRMA.
    • Note that DBAP4e class expects Binaural4 class.
    • The following diagrams show how DBAP4 and DBAP4e handle outputs internally. They manages virtual/physical output inside the class, so you don't have to deal with them. Read this Piazza thread for more information.
  3. Once you have a desired sound stage with moving sound sources, transform as in homework 2 to binaural by using Binaural4 class. Use the following methods to change the output mode of DBAP4e to binaural or plain 4 channel:
    // p4 is an instance of DBAP4e
                        
    // for binuaral mix down
    p4.setMode("binaural");
    
    // for plain 4 channel output
    p4.setMode("plain");
    Refer this instruction and this Piazza thread as needed.
  4. Link final delivarables in your Homework Factory with an HTML file.