Homework 2: Subtractive Synthesis and Filters

due on 10/15 (Thu) 11:30am in the Homework Factory.

Overview

In class, we've been discussing an important suite of tools for sculpting and shaping sound: subtractive synthesis and filters. In this lab, you will answer some questions about subtractive synthesis and filters, as well as be asked to create some "sound bytes" using filters and input sound files, both common and incredibly useful techniques in computer music.

As in Homework 1, your deliverables will be a .txt file with your answers to the lab questions, as well as .wav files of your sound bytes along with your code. Place these files in your /Library/220a/hw2/ directory.

The composition portion of the homework is to compose a short musical statement (1-2 min) using some form of filter. You're also welcome to use anything learned in prior homeworks. "Submission" entails placing an HTML file hw2.html in your /Library/Web/220a/ subdirectory that links to your code and .wav file. Make sure that your submission is timestamped on the Homework Factory.

Lab - Part 1 (30 points)

  1. Which of the following are good potential source sounds for subtractive synthesis? Select any that apply.
    1. A click.
    2. A sine wave.
    3. White noise.
    4. An impulse.
    5. A snare drum.
    6. Bird song.
    7. Rain.

  2. Can a filter both boost and attenuate regions in a frequency spectrum? Or can it only attenuate?
    1. Boost and attenuate.
    2. Attenuate only.

  3. "Cutoff frequency" refers to which frequency of a lowpass or highpass filter?
    1. The frequency at which amplitude begins to roll off.
    2. The frequency at which the signal is ~ 6 dB lower than its full dB level.
    3. The frequency at which the signal is ~ 3 dB lower than its full dB level.
    4. The frequency at which the signal has reached 0 dB.

  4. What does filter "Q" refer to?
    1. It is another term for the cutoff frequency of a lowpass or highpass.
    2. It represents the "degree of resonance" of a bandpass filter.
    3. It refers to the number of resonances in a bandpass filter.
    4. It refers to the gain of the resonant frequency in a bandpass filter.

  5. Cochlear implants helps restore hearing for those who are deaf and hearing impaired. To do this, it analyzes incoming sounds into multiple overlapping frequency bands, and the amplitude information in each band is converted into electric signals that are then used to stimulate the auditory nerve. What is the digital audio technique called that passes subcomponents of a signal into an array of filters?
    1. Spectrum division.
    2. A filter array.
    3. A filter bank.
    4. A bandpass filter.

  6. What is an LFO? What are two ways you could use an LFO to achieve an audio effect?
  7. Explain, in your own words, the main difference between IIR and FIR filters.

Lab - Part 2 (30 points)

In this lab, we will go through how to use a couple kinds of filters in ChucK, as well as how to load sound files for further use. In the process, we will simulate ocean waves, and write a patch that works as the building blocks for writing chiptunes. (e.g. a very long example of chiptunes)

The lab is written up here: hw2-ChucKFilters.pdf

There are three parts to the lab:
1. Ocean wave simulation (via bandpass filters).
2. Sweeping a lowpass filter over sound files.
3. Chiptune creation using lowpass for effects.

Your deliverables are the three .wav files from the three parts of the lab.

Composition - Sculpting Sound (✓-,✓,✓+)

Compose a brief 1-2 minute statement in which at least one sound you use was sculpted using a filter.

  • The recommended filters that you should use or experiment with are: the lowpass LPF, highpass HPF, and bandpass with resonance ResonZ.
  • Your input sound to the filters should be something with a rich spectrum - a sound file with a lot of noise, Noise itself, pitched sounds with very rich spectra, or something like an impulse or a click.
  • Consider using envelopes to shape notes as in the lab, and as discussed in previous classes and Homework 1.

As in last time, think about layering the sounds to create interesting texture and interactions between kinds of sounds. The template from the last homework has been modified to show another example of a filtered sound, clip_filt.ck. Feel free to use this as a launching point, though your sound/code should be sufficiently dissimilar from this such that you feel like you've had creative input to the composition!

Submit to the Homework Factory an HTML file titled hw2.html that includes the following:

  • Links to all chuck files you used and wrote in your composition.
  • A link to a .wav file.
  • A short description of how your piece and your thoughts behind your composition.

Extra Credit (10 points)

Recreate the second or third examples from the lab or your composition using the Web Audio API.

Check out this tutorial for learning Web Audio! Ocean waves in the Web Audio API. (Note: best used in Chrome.)