back to list

More about those wonderful wacky kicky Walsh functions

🔗xed@...

8/31/2001 9:15:51 PM

FROM: mclaren
TO: New Stalinist censorship group
SUBJECT: Walsh functions

Graham Breed mentioned that Walsh functions are square
waves, a claim which while conceptually in the ballpark, actually
slightly misstates the facts.
In reality, Walsh functions come in two flavors, Sal and Cal --
"sine Walsh" and "cosine Walsh." Walsh functions are classified
according to their sequency, not their frequency -- which is to say, the total number of zero crossing in a Walsh period.
If you study the Walsh sal and cal functions, however, you will quickly recognize that they aren't actually square waves. A square wave has an equal number of positive and negative going zero crossings during its period, and there is no "dead" space in the wave period -- for instance, a true square wave does not miss one period and stay at zero level for that amount of time.
Walsh functions are typicallyl asymmetrical, and have a peculiar look and sound. They zero-cross several times and then stop and zero-cross again during their wave period, depending on their sequency.
One of the elementary Fourier theorems tells us that even functions of N parity have odd overtones defined by every Nth. Since a square wave is an even function with parity of 2, its FOurier transform is a set of odd overtones which exclused every 2nd overtone.
As you can see from Walsh sal and cal functions, they are more complex functions than square waves (which have a "hollow, nasal, clarinet-like" sound). Wlash functions sound much more complex and have much more "noisy-sounding" spectra than square waves. The closest thing I can think of in descirbing the "sound" of Walsh sla and cal components is various kinds of pulse waves with various duty functions. Very buzzy, not mellow at all.
The excellent book Wlash Functions (can't recall the author) goes into all of this, and in fact shows how to generate a near-sine-wave using Wlash sal and cal functions. In fact, I built a logic circuit to do this in the electronics lab during my university education as a bit of fun. By heavens, it worked. Walsh sal and cal functions are very easy to generate by stacking logic gates. Just add some AND and OR and XOR gates on the outputs and you get any Walsh sal or cal you want. The sequency depends on the master clock rate and the amount by which the logic gates subdivide the master clock.
CCRMA and IRCAM have worked extensively with Walsh fucntions and gave 'em up. You have to sum a whole lot of Walsh sequency components to get smooth harmonic-series-sounding timbres.
In some ways the Walsh functions represent the inverse of Fourier analysis. Fourier nalysis works best on a maximally smooth function -- a sine wave, for instance. The less inharmonic grunge a timbre has, the better Fourier analysis works on it.
By contrast, the more inharmonic grunge a timbre has, the better Walsh analysis/resynthesis works on it. But the smoother the function is, the worse Walsh analysis/resynthesis proves.
This suggests that Walsh analysis/resynthesis proves ideal for the analysis and resynthesis of noisy and/or inharmonic sounds, like cymbals or bells.
Arguably a truly sophisticated analysis/resynthesis system would combine two differnt diametrically opposed methods like Fourier and Walsh analysis, and apply them depending on the statistical characteristics of the input sound. For instance, Walsh synthesis might be applied to the very start of a flute note when the timbre is mostly breathy noise, while Fourier analysis might be applied to later portion of the flute note when it settles down to a smoother and more harmonic-series-like function.
Xavier Sera did something like this in the mid-80s with his PhD project, a sophisticated spectral analysis package at CCRMA. Bill Schottstaedt, the 2nd greatest living computer music composer, has also played around with Walsh analysis/synthesis quite a bit.
--------------
--mclaren