Skip to content

Commit

Permalink
Modified a subfunction name in circularScaledVBAP
Browse files Browse the repository at this point in the history
  • Loading branch information
alainbonardi committed Jan 29, 2024
1 parent f5ba39b commit 2501ae3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faustCodes/library/hoa2.lib
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ with {
mod360(ang) = ma.modulo(ang+360, 360);
//
//computation of the scaled VBAP gain of a pair
scaledVBAPGain(t1, t2, t) = ((diffSin(t2, t) <:(_, _, _)), (ma.signum(diffSin(t2, t1)) <: (_, _)), (diffSin(t, t1) <:(_, _, _))) : (*, *, *, *) : p1 : (_, _, (+ : sqrt : avoidZero <: (_, _))) : p2 : (/, /)
normalizedVBAPGain(t1, t2, t) = ((diffSin(t2, t) <:(_, _, _)), (ma.signum(diffSin(t2, t1)) <: (_, _)), (diffSin(t, t1) <:(_, _, _))) : (*, *, *, *) : p1 : (_, _, (+ : sqrt : avoidZero <: (_, _))) : p2 : (/, /)
with {
//function to compute the sinus of the difference between angles expressed in degrees
diffSin(u, v) = sin((v - u) * ma.PI / 180.);
//permutations to be used to compute scaledVBAPGain
//permutations to be used to compute normalizedVBAPGain
p1(a, b, c, d) = (b, c, d, a);
p2(a, b, c, d) = (a, c, b, d);
//
Expand Down Expand Up @@ -366,7 +366,7 @@ with {
angle2 = sum(i, p, ba.take(i+1, angleList2) * ba.take(i+1, pairCondition));
//
//amplitudes of the p loudspeakers: the value is computed thanks to scaledVBAPGain function for the two loudspeakers of the active pair, and set to 0 for the other ones
amps = (angle1, angle2, t) : scaledVBAPGain : ((_ <: par(i, p, *(i == thisPairInd1))), (_ <: par(i, p, *(i == thisPairInd2)))) : ro.interleave(p, 2) : par(i, p, +);
amps = (angle1, angle2, t) : normalizedVBAPGain : ((_ <: par(i, p, *(i == thisPairInd1))), (_ <: par(i, p, *(i == thisPairInd2)))) : ro.interleave(p, 2) : par(i, p, +);
//
//the set of p amplitudes is applied to the virtual source input
thisCircularVbap = (amps, (_<:si.bus(p))) : ro.interleave(p, 2) : par(i, p, *);
Expand Down

0 comments on commit 2501ae3

Please sign in to comment.