Homework: Effects and Patterns

  • Out: Oct 24, 2023 Tuesday
  • Due: Oct 31, 2023 Tuesday

Objective and Overview

Homework 3 should be a quick study to work with some essentials in Chuck. The components might help you imagine some final project possibilities.

Provide a microphone to use with your laptop or device, as this homework will involve real-time input to chuck. Built-in laptop and mobile mics are ok for testing but they're noisier and often have automatic gain control which will affect quality. Better is an external mic and an audio interface or recorder that will connect to your computer. The DIY air mics we've made are great for this. CCRMA has a few loaner audio interfaces and some mics + stands this year (available to be checked out at the 2nd floor admin area -- self-serve). See the teaching team if any questions.

Key Steps

  1. Be up-to-date with HW1 and HW2. Absorbing operational hints from them and having some strategies from earlier debugging will help.
  2. Rather than downloading a starter code directory like in the previouse homeworks, we're starting with the IDE-based examples below. You'll probably want a "local working directory" to keep partial results that you export from the IDE.
  3. Homework 3's assignment is to use adc input in combination with effects processing and pattern generation.
  4. Experiment with your voice or instrument and record your work to .wav files.

Background

The following examples introduce several new concepts in turn:

  • ADC input (from microphone)
  • UGen's for effects processing (resonator, pitch shifter)
  • pattern generating functions (chaos, periodic, random)
  • FFT-based tracking (spectral centroid, RMS amplitude)

Examples

(some of the examples use ADC input which requires pushing the purple mic button in the IDE after pushing Start WebChuck)

  • inOut.ck
    • Send mic to speaker through chuck as if a straight wire.
  • inEfx.ck
    • Resonance filter affecting mic signal
    • Time-varying with slow, rectified sine pattern
  • chaotic.ck
    • Print 100 values from the logistic map chaotic function to the console.
    • Copy the values printed in the console to a plotting program.
    • x is chaos state variable.
    • r is chaos "heat".
      the y axis shows changing values of chaos state variable 'x'
      r = 3.1
      r = 3.9
  • plotPeriodic.ck
    • Print changing values from a low frequency periodic signal.
    • f is wave frequency.
    • a is wave amplitude.
    • update every 100ms.
  • plotRandom.ck
    • Print changing values from a random walk.
    • l is low bound.
    • h is high bound.
    • update every 100ms.
  • FFT.ck
    • Pass your input signal to spectral centroid and RMS amplitude trackers.
    • Print their changing values.
    • Apply changing values to a SinOsc simultaneously.
    • Trackers are borrowed from Chuck's feature extractors exmaples centroid.ck and rms.ck.

Also play around with the following examples of combinations:

The combineEfxRandom and combineClarinetChaotic examples above present combinations of respectively, adc + efx, physical model + patterns.

Composition

Homework 3's assignment is to use adc input in combination with effects processing and pattern generation. You'll need a way to capture the output of your real-time performances as .wav files.
This depends on the system you have. When you run code in the IDE it is sending its audio signal to the system's audio output (headphones or loudspeakers). On some systems the same signal can be routed internally to another application, for example, Audacity, for direct capture and then export as a .wav file. On some browsers, there is the possibility of adding an "audio capture" extension. Or you can paste your chuck code into the 220a record webapp and record its audio from there.

Don't be constrained by what's in the examples. The composition should (sometimes) have more than one layer going on at a time and should include at least one big change in the music. Musically, think "polyphony" and think "section change." Combine the recordings and layer them in an audio editor, for example, Audacity. Another way to get polyphony and section changes is by sporking big processes -- overlapping them and sequencing them.

Please don't just recycle the above examples. Customize them, explore their possibilities. Feel free to explore other FFT-based trackers, efx and combine some synthesis from earlier homework.

Upload your work

scp hw3.wav USERNAME@ccrma-gate.stanford.edu:Library/Web/220a/

The final result should be a single .wav file named hw3.wav in your main homework factory directory 220a. The file should not lie under a subdirectory (i.e., there's no need for the server to have a 220a/hw3 subdirectory).