Homework 4: ADC input, Efx, Patterns

due on 7-Nov in the Homework Factory


Homework 4 should be a quick study to work with some remaining essentials. Its components might help you imagine more final project possibilities.

Set up a microphone for real-time input to chuck. This can be the one you built earlier or whatever is convenient to plug into the soundcard you're using.


Test each of the examples listed in this collection using miniAudicle. They introduce several new concepts in turn:

  • adc input
  • UGen's for effects processing
    resonator, pitch shifter
  • custom pattern generating functions
    chaos, periodic, random
  • real-time control mechanisms
    computer keyboard
  • FFT-based tracking
    spectral centroid, RMS amplitude

Specifically, the files and concepts in the collection include:

  • inOut.ck
    hook a mic to speaker through chuck
    (see also "adc" in chuck examples or examples/basic/adc.ck in chuck source distribution)
  • inEfx.ck
    resonance filter affecting mic signal with slow, rectified sine pattern changing the resonance
    (see also examples/filter/resonz.ck in chuck source distribution)
  • chaotic.ck / plotChaotic.ck
    print or plot values from the logistic map chaotic function
    in the second file, its plot data goes to a "hardwired" filename, change as needed
    the program examples run independent of time
    x is chaos state
    r is chaos "heat"
  • plotPeriodic.ck
    plot low frequency periodic signal
    example depends on time
    f is wave frequency
    a is wave amplitude
  • plotRandom.ck
    plot a random walk
    the example runs independent of time
    l is low bound
    h is hi bound
  • FFT.ck
    mic or instrument input through trackers from analysis/centroid.ck and analysis/rms
    SinOsc sonifies tracker outputs
    c is instantaneous centroid of input signal
    r is RMS amplitude of input signal
    (see also examples/analysis/fft.ck in chuck source distribution)
    (see also examples/analysis/features/centroid.ck in chuck source distribution)
    (see also examples/analysis/features/rms.ck in chuck source distribution)
  • combineEfxRandom.ck
    mic or instrument input through pitch shifter with random variation
    PitShift effect, Random class from above
    (see also Chapter6/Listing6.14.ck in chuck book examples)
  • combineClarinetChaotic.ck
    combine clarinet physical model with chaotic variation
    Clarinet UGen, Logistic class from above
  • kbdControlChaotic.ck
    combine computer keyboard control with clarinet and chaotic variation
    Hid Class, Clarinet UGen, Logistic class
    (see also examples/hid/kb.ck in chuck source distribution)


Homework 4's assignment is to use adc input in combination with effects processing and pattern generation.

Those are the essentials, but don't consider the assignment to be limited only to them. Feel free to (optionally) incorporate real-time control and/or FFT-based tracking. Or any aspect of earlier assignment work. For further examples of effects processing, control mechanisms, and FFT-based analysis and tracking see other examples in the three chuck repositories we've been referencing:
chuck examples
chuck source distribution
chuck book examples

The three final scripts above are combinations (adc + efx, physical model + patterns, kbd + patterns). Don't just recycle these examples. Customize and if you have time, layer multiple musical "voices" so there's more than one thing going on simultaneously. That can either be done in the same chuck script or by post-processing e.g., layering .wav files using audacity.

Turning In

Record a demo "performance" on some original code using the components specified above. Turn in a recorded (stereo) .wav file and your final chuck code. (Record with audacity or write it real time with WvOut2 -- in which case don't forget to close the output file appropriately.) As before, an explanatory web page (hw4.html) should land in the expected place (Library/Web/220a/) which includes links to the .wav and .ck files (living in a parallel hw4/ subdirectory).