Feedback Matrix Wizardry, Part 1

This is the first install­ment in a series to pro­vide more back­ground infor­ma­tion on AriesVerb. There already exists the man­u­al (see down­load page), but the man­u­al is intend­ed to be a ref­er­ence. It tells you where the con­trols are and how to oper­ate them, but does not go much into the «why» of things. That’s where this tuto­r­i­al starts off.

The first chap­ter is about maybe the most enig­mat­ic aspect of AriesVerb: The feed­back matrix and it’s con­trols. The chap­ter is split in two parts. This first part (this part) is the the­o­ry and the sec­ond part will be the practice.

Fig. 1: Schemat­ic of a Feed­back Delay Net­work. Delay lines at z1…z4; feed­back matrix at A.

AriesVerb oper­ates as an FDN (Feed­back Delay Net­work), a schemat­ic of which is shown in fig­ure 1. The con­cept should be easy to get: There are a num­ber of par­al­lel delay lines, four in case of AriesVerb (unless you enable mul­ti­tap-mode, then there are effec­tive­ly 16). Any delay line can feed back into any oth­er via the big feed­back matrix. Simple.

Or not so sim­ple. The entries in the matrix are tight­ly con­strained if the sys­tem is to be sta­ble. You can­not just put any old val­ues into the matrix (or, you can, but then in all like­li­hood the thing will diverge and the plu­g­in will be auto-mut­ed by the host faster than you can say ‹Oh, snap›).

There­fore the choice needs to be lim­it­ed to use­ful matri­ces which are con­trol­lable, and the way this is han­dled in AriesVerb—and has always been since the beginning—is to focus exclu­sive­ly on rota­tion matri­ces.

The matrix controls

Fig. 2: The matrix edi­tor page in AriesVerb.

The above screen­shot is tak­en straight out of the AriesVerb man­u­al. There is a rota­tion angle con­trol at position \large\textcircled{\normalsize{1}}‍. Then there is a con­trol that looks like a row with 8 num­bers, split into two groups of four num­bers each at posi­tion \large\textcircled{\normalsize{2}}—this is the rota­tion plane con­trol. Final­ly, there is an abstract dis­play of the result­ing matrix at position \large\textcircled{\normalsize{3}}‍. The matrix is layed out such that the route from delay line i\rightarrow j is found at col­umn i, row j‍:

\[\begin{array}{cccc} 1\rightarrow1 & 2\rightarrow1 & 3\rightarrow1 & 4\rightarrow1 \\ 1\rightarrow2 & 2\rightarrow2 & 3\rightarrow2 & 4\rightarrow2 \\ 1\rightarrow3 & 2\rightarrow3 & 3\rightarrow3 & 4\rightarrow3 \\ 1\rightarrow4 & 2\rightarrow4 & 3\rightarrow4 & 4\rightarrow4 \end{array} .\]

The amount of feed­back is col­or-cod­ed: White rep­re­sents pos­i­tive feed­back and red rep­re­sents neg­a­tive feedback.

Of Angles …

You may get the impres­sion that this tuto­r­i­al seems to become more a trea­tise on geom­e­try then about sound. And in some way, it is! In AriesVerb, geom­e­try and sound are fun­da­men­tal­ly linked. To quote a 19th cen­tu­ry mathematician:

… for geom­e­try, you know, is the gate of sci­ence, and the gate is so low and small that one can only enter it as a lit­tle child.

William K. Clifford

But I digress. As said ear­li­er, AriesVerb is built on rota­tion matri­ces, so we need some way to con­trol them. At the end of the day, the job of the matrix is to shuf­fle and mix the delay lines with one anoth­er. How do angles and planes relate to this?

In one sen­tence, the angles con­trol the amount of inter­mix­ing, while the plane decides which delay lines take part in the inter­mix­ing. The rest is details. You can stop here and, armed with this knowl­edge, go on exper­i­ment­ing. Or you can read on for more theory.

If the rota­tion angles are then the choice of rota­tion plane and the result­ing matrix is
both 0^\circ does not matter the iden­ti­ty matrix.
both 180^\circ does not matter the cen­tral inver­sion.
Oth­er­wise mat­ters one of the many var­i­ous spe­cial orthog­o­nal matri­ces.

Fig. 3: Dis­play of the iden­ti­ty matrix (left); dis­play of the cen­tral inver­sion (right).

In the table above I have list­ed the three fun­da­men­tal cas­es to con­sid­er. If both angles are at 0^\circ‍, there is no rota­tion, and no mix­ing. The matrix sim­ply sends each line to itself. In this con­fig­u­ra­tion, AriesVerb reduces to an array of par­al­lel comb fil­ters. On the oth­er hand, if both angles are at 180^\circ‍, the sit­u­a­tion is almost the same except that the feed­back is neg­a­tive. For any oth­er choice of rota­tion angles, the out­come depends on the par­tic­u­lar choice of rota­tion plane, so we need to explain that now.

… And Planes

It should be obvi­ous that we not only need a way to spec­i­fy how much rota­tion we want, but also, which way ‹round the rota­tion should go. In oth­er words, from which delay lines shall be tak­en and to which delay lines shall be giv­en. This is the pur­pose of the rota­tion plane control.

Fig. 4: Exam­ple of a sim­ple rota­tion of almost 90°.

The rota­tion plane is spanned by two vec­tors, let’s call them \vec{u} and \vec{v}‍. These are shown in the user inter­face on the left and on the right in the rota­tion plane con­trol. Each vec­tor has four ele­ments, rep­re­sent­ing the four delay lines. Any delay line can be select­ed into either \vec{u} or \vec{v}‍, but not into both at the same time. Also, the vec­tors must not be emp­ty. Then:

The matrix shall be a rota­tion matrix of such kind that it exact­ly rotates \vec{u} into \vec{v} when \alpha=90^\circ‍.

And that’s all there is to it. You can let that sink in for while. Of course, the dev­il is in the details. What hap­pens when more than one delay line is select­ed? What does the \beta angle do? Slow­ly! First let’s exam­ine the exam­ple shown above—which is the most sim­ple exam­ple possible—and see if the matrix does as adver­tised: rotate delay line 1 into delay line 2. One way of look­ing at this is to recall the matrix lay­out from above and fol­low the rout­ing plan. We have

\[\begin{array}{cccc} & \color{red} 2\rightarrow1 & &  \\ 1\rightarrow2 & & & \\ & & 3\rightarrow3 & \\ & & & 4\rightarrow4 \end{array} .\]

The sig­nal from line 1 goes to line 2, and the sig­nal from line 2 goes back to line 1, but with a sign flip along the way. Only after mak­ing anoth­er round does the sig­nal come back with the orig­i­nal phase. In total, four feed­back cycles are nec­es­sary to get back to square one, which cor­re­sponds to a rota­tion of 4 \times 90^\circ = 360^\circ‍.

You might have noticed that in the exam­ple above, \alpha is not exactly 90^\circ‍, but it is slight­ly off at 85^\circ‍. This intro­duces a lit­tle amount of scat­ter­ing, because the routes 1\rightarrow1 and 2\rightarrow2 are non-zero, if only very slight­ly so. This is an exam­ple of a delib­er­ate «imper­fect­ness». In this case, the com­bined result will be a low-fre­quen­cy beat­ing, and the time of the beat can be cal­cu­lat­ed. The error of 5^\circ needs 360^\circ / 5^\circ = 72 feed­back cycles to make one rev­o­lu­tion. Assum­ing that the time base is, say, 50 ms, then the beat would have a peri­od of 3.6 seconds.

Fully Dense Matrices

Still with me? Good. We will now go back to the con­fig­u­ra­tion as shown in the begin­ning in fig­ure 2. There we have a ful­ly dense matrix of the type typ­i­cal­ly used for plate reverb algo­rithms, except that mul­ti-tap has been dis­abled to empha­size the 4×4 struc­ture. In this exam­ple, the rota­tion angles are \alpha=90^\circ‍, \beta=-5^\circ‍, and all four delay lines are select­ed into the rota­tion plane, with two on each side.

The result­ing matrix is not only ful­ly dense, it would also be per­fect­ly homo­ge­neous (all ele­ments at the same lev­el at \sfrac{1}{2}‍) if not for anoth­er small imper­fect­ness that is intro­duced by a non-zero \beta angle. This imper­fect­ness is vis­i­ble as slight­ly dif­fer­ent lev­els of bright­ness in some squares. But I digress. Remem­ber the gospel?

The matrix shall be a rota­tion matrix of such kind that it exact­ly rotates \vec{u} into \vec{v} when \alpha=90^\circ‍.

And below is the proof that this is real­ly true.

\[\begin{array}{cc} \vec{v} \, \begin{array}{|c|} -1 \\ 0 \\ 0 \\ -1 \end{array} \leftarrow & \begin{array}{|cccc|} \hline \sfrac{1}{2} & -\sfrac{1}{2} & -\sfrac{1}{2} & -\sfrac{1}{2} \\ \sfrac{1}{2} & \sfrac{1}{2} & -\sfrac{1}{2} & \sfrac{1}{2} \\ \sfrac{1}{2} & -\sfrac{1}{2} & \sfrac{1}{2} & \sfrac{1}{2} \\ -\sfrac{1}{2} & -\sfrac{1}{2}  & -\sfrac{1}{2} & \sfrac{1}{2} \\ \hline \end{array} \\[12pt] & \uparrow \\ & \begin{array}{cccc} \hline 0 & 1 & 1 & 0 \\ \hline \multicolumn{4}{c}{\vec{u}} \end{array} \end{array}\]

As was said ear­li­er, the columns of the matrix cor­re­spond to the input lines and the rows cor­re­spond to the out­put lines. So, if the input equals \vec{u}‍, the out­put should be \vec{v}‍. To check that this is true, mul­ti­ply each col­umn with the cor­re­spond­ing ele­ment of \vec{u} (which, in the above exam­ple, effec­tive­ly sin­gles out the mid­dle columns), then add up every­thing hor­i­zon­tal­ly. The result is indeed \vec{v}‍.

The next install­ment is going to present some con­crete exam­ples. It will show the required set­tings to make some typ­i­cal FDN matri­ces: the House­hold­er matrix, the Staut­ner & Puck­ette matrix, some matri­ces equiv­a­lent to fig­ure-eight topol­o­gy, per­mu­ta­tion matri­ces, and oth­ers. Since com­ments are dis­abled on this blog, you are invit­ed to take any ques­tions or dis­cus­sions over to the Ari­esCode forum on KvR.

FQA (frequently questioned answers)

What is the action on any oth­er vec­tors besides the select­ed ones?
That is a con­se­quence of the fact that the matrix must be a rota­tion. The matrix is always unam­bigu­ous­ly deter­mined by rota­tion angle and plane.
What hap­pens when \alpha is negative?
The same as if \vec{u} and \vec{v} were swapped and \alpha was pos­i­tive. Specif­i­cal­ly, if \alpha=-90^\circ‍, then the result­ing matrix will rotate \vec{v} into \vec{u}‍.
What does \beta do?
See the next installment.