k y m a • t w e a k y — the kyma collective || view the current website || February 2015 Archive

/ WebHome / SoundDeconstructed / Learn.ShepardContinuousSpectrum

Search


Learn Section


Home 
Topics 
More... 

All Sections


Products
Order
Company
Community
Share
Learn

Login / Register 
Change password
Forgot password?

Symbolic Sound


Home
Kyma Forum
Eighth Nerve

TWiki Links


twiki.org

ShepardContinuousSpectrum

Found in the SpectralSources category of the Prototypes, ShepardContinuousSpectrum generates a spectrum that you can use to control an OscillatorBank, CloudBank, FilterBank, or FormantBank in order to create a continuous Shepard tone glissando.

Invented by cognitive scientist [[http://en.wikipedia.org/wiki/Roger_Shepard][Roger Shepard], a Shepard tone has a spectrum whose partials are equally spaced in pitch (not in frequency) and whose spectral envelope is shaped like a bell curve: low amplitudes for low and high frequencies, high amplitudes for the midrange frequencies.

In this prototype, the waveshaper defines the spectral envelope. Frequency is used as an index into a Hann wavetable and the output is amplitude. Since the Hann table starts at zero, goes high in the middle, and goes back to zero, /\ it defines the spectral envelope of a Shepard Tone. Low frequencies (small index numbers) read low amplitudes, midrange frequencies are associated with high amplitude, and high frequencies have low amplitude. (The frequency input passes through a ScaleAndOffset? in order to changes it range from 0,1 to -1,1: the range of indexes expected by the Waveshaper).

In a Shepard Tone spectrum, the frequencies increase linearly with the partial number in log space. To put it another way, the partials are evenly spaced in pitch (not evenly spaced in hz). To create this spectrum without glissando, you would feed the SyntheticSpectrumFromSounds a repeating linear function that starts at 0 and goes up to the number of partials (in this case 128) and repeats once per frame (in this case, it repeats once every 128 samples). If you were using a Sample to create this repeating Ramp, the frequency would be the inverse of the period or (1.0 / 128 samp s).

This SyntheticSpectrumFromSounds could be fed into an OscillatorBank with 128 oscillators in it (let's call them oscil_0 through oscil_127). When we feed it the repeating ramp function, each oscillator in the bank is assigned a higher pitch than the oscillator preceding it. The result is a static pitch with a spectrum whose partials are equally spaced in pitch. oscil_0 gets pitch 0 and oscil_127 gets pitch_127 (these are not MIDI notenumbers).

Now imagine slightly increasing the repetition rate of the repeating Ramp so that it reaches the top of the ramp slightly faster than it did before. So oscil_0 and all the other oscils are assigned slightly higher pitches than they were before, oscil_126 gets the highest pitch, and oscil_127 actually gets the lowest pitch because the ramp has wrapped around (you have started the next cycle of the ramp before finishing the frame).

Since the OscillatorBank smoothly interpolates frequency values from frame to frame, what you hear is a small change upward in pitch in each of the oscillators. The next time through the ramp, the oscil numbers and the pitches have slipped a little further out of phase, so you will hear another small change upward in pitch, and so on.

But what about the highest numbered oscillator? Why don't you hear that one jumping from the maximum pitch down to the minimum pitch in one frame? Because the Hann spectral envelope returns zero amplitudes for the highest and lowest pitches. So at any particular time, your ear is perceiving the "mid-range" oscillators only. As they gradually get higher in pitch, they are also becoming softer, so you never actually hear the "wrap-around" or modulo point. When an oscillator is at the lowest pitch its amplitude is zero and, as it increases in pitch, it gradually increases in amplitude also.

By feeding the ShepardContinuousSpectrum into a FilterBank or CloudBank you can create new variations on this famous auditory illusion: subtle endlessly rising filter banks, endlessly rising grain clouds, etc.

-- CarlaScaletti - 20 Dec 2006

 
 
© 2003-2014 by the contributing authors. / You are TWikiGuest