My misadventures in audio dsp programming continues with what I’m calling a Hadamard Function Filter.
A Hadamard Matrix provides rows of +1 and -1 values. These rows are called “Functions” and the number of times the value of these +1 and -1 “Elements” cross zero is referred to as the “Sequency” number of the Function.
Here is a Hadamard Matrix with the length of 8
+1 +1 +1 +1 +1 +1 +1 +1
+1 -1 +1 -1 +1 -1 +1 -1
+1 +1 -1 -1 +1 +1 -1 -1
+1 -1 -1 +1 +1 -1 -1 +1
+1 +1 +1 +1 -1 -1 -1 -1
+1 -1 +1 -1 -1 +1 -1 +1
+1 +1 -1 -1 -1 -1 +1 +1
+1 -1 -1 +1 -1 +1 +1 -1
The Hadamard Function Filter repeatedly cycles through the “Elements” of a “Function” row at audio sample rate, and when the value of the current “Element” is -1, the amplitude of the incoming signal is reduces by a selected amount. For example, If the amplitude is set to 1, then the current audio sample would be completely masked.
sine wave input
0.0 0.5 1.0 0.5 0.0 -0.5 -1.0 -0.5
selected Hadamard Function
+1 -1 +1 -1 -1 +1 -1 +1
output, applying 0.5 amplitude to Element masking
0.0 0.25 1.0 0.25 0.0 -0.5. -0.5 -0.5
What does it sound like?
A triangle wave arpeggio is fed into the Hadamard Function Filter, where the current “Sequency” is being modulated every 4 counts, and the the number of “Samples” is being swept by an external LFO. The results are something like a ring modulator with some formant filter qualities.
These vignettes are short tracks that feature whatever audio thing I’ve been working on, and are a chance to embrace a more minimal and experimental approach to composition. This one however is full on 1970’s Krautrock inspired!

Want to try it out yourself?
Here’s a link to the c++ code for the Hadamard Function Filter class.
https://github.com/craigcorvin/hadamardfunctionfilter
…and the code to run this on the Electrosmith Patch.