Click here to open the tutorial patch: 05fParallelFilters.maxpat
In this tutorial, we'll look at creating networks of filters to make complex, time-varying timbres using an oscillator input.
Look at the tutorial patch. It contains a few sound-producing objects connected to a network of filter objects: three reson~ objects in parallel and a lores~ object in series with their outputs. The audio input for the filter network comes from a receive~ object named
filterin, allowing us to generate signals for our filters remotely.
1, click the button attached to the click~ object. As per its name, you should hear a click!
The click~ object generates a constant signal of
0. When you sent it a
bang message, it outputs a single sample of value
1, then returns to sending
0's. This is called an impulse, and in an idea world generates an eve. spread of energy across all frequencies; we could think of it as the shortest possible burst of white noise we can create in our digital system. Sending a click through a filter returns a sound that has the exact frequency characteristics of that filter. We call this taking the impulse response of a signal chain.
2. You should hear a sawtooth wave fade in and out with a smooth envelope.
The saw~ object in our patcher is in a signal chain where it has an envelope (controlled by a function, a line~, and a *~ object). If we adjust the function object, we can change the shape of the note that gets fired each time we click on a key in the kslider object.
3, click in the number box labeled 'Vowel'. Enter
0in the number box and hit return. The <link type="refpage" name="number">number box</link> objects connected to the line~ objects below should read
270., 2290., and 3010.. Click on the kslider to play some notes. Click in the 'Vowel' number box and enter different values between
9and listen to the results. Double-click the coll object named
formantsand look at the contents.
The coll object in our patcher contains ten lists of frequency values which correspond to the average formats for vowels in the English language ("ooo", "eee", "ah", etc.). In human speech, our lungs project air through our vocal chords, which modulate the air pressure into a regular waveform. Our mouth shapes this waveform, filtering the signal based on the shape of our mouth. These vocalizations can be modeled as sets of three bandpass filters tuned to different frequencies, creating a simalcrum of the sound our voice makes. The shaping of a sound in this manner is called formant filtering, and can be created in MSP using the circuit in our tutorial patcher.
30.. Click the toggle box attached to the metro object above labeled
Random?. Play some notes on the kslider.
Tightening the Q on our format filters makes the sound more obviously 'vocal', as the resonation of the filters cuts out any extraneous energy from our sawtooth waveform.
4, adjust the number box labeled 'Cutoff frequency' to
5000. Play some notes. Adjust it down to something low, like
The output of our formant filters feed into a lowpass filter controlled by a lores~ object. This cuts the treble from out sawtooth after it passes through the bandpass network of the reson~ objects. Changing this value also changes the quality of the vocal model.
The filter objects in MSP can be connected into networks of filters that can be used in all manner of interesting ways. Bandpass filters (such as reson~) can be used in parallel to simulate the 'formants' of instruments or human speech. The click~ object allows you to test the impulse response of a filter network by sending a single positive sample through it, generating a pure impression of the frequency response of the filter.
click~ - Create an impulse