florian-grond / SC-HOA

HOA wrapper classes for SuperCollider based on https://github.com/sekisushai/ambitools
GNU General Public License v3.0
32 stars 7 forks source link

Manual X fade mode in HOABeamDiracHoa appears to be broken #28

Open zacksettel opened 4 years ago

zacksettel commented 4 years ago

When trying to use HOABeamDirac2Hoa in the manual focus mode in order to continuously and manually crossfade between the filtered and non-filtered audio, de desired action does not occur, rather, a timed cross fade result.

The variables below referred to in he help file seem unreachable.

(timer_man) and (focus)

HOABeamDirac2Hoa.ar(order, in, beamDiracAziDeg pi / 180.0, // azimith for direction filter beamDiracEleDeg pi / 180.0, // elevation for direction filter 0, // 0db focus:n, timer_manual:1 // to cross fade from unfiltered to filtered signal );

TO remedy the situation (for third order), I modified the code to reach the variables in question, and obtained the desired result.

HOABeamDirac2Hoa{

*ar { |order, in, az, ele, level, on = 1, crossfade,  timer_manflag, focus|
    // az = az * -1; ele = ele * -1;  // the Faust Ugens seem to have those reversed

…..

          {order == 3}
                {var in1, // declare variables for the b-format array
                           in2,   in3,   in4,
                           in5,   in6,   in7,   in8,   in9,
                           in10, in11, in12, in13, in14, in15, in16;
                         #in1, // distribute the channels from the array
                            in2, in3, in4,
                            in5, in6, in7, in8, in9,
                            in10, in11, in12, in13, in14, in15, in16 = in;
                     ^HOABeamDirac2HOA3.ar(in1,  // return the Ugen with the b-format channels
                                                       in2, in3, in4,
                                                       in5, in6, in7, in8, in9,
                                                       in10, in11, in12, in13, in14, in15, in16,
                                                       azimuth: az, elevation: ele, gain:level, on: 0, timer_manual:1, focus:focus, crossfade:crossfade)} // and with the args from the *ar method
thibaudk commented 4 years ago

Yes, I saw that this was removed in 1a30ed9f61cff5ba4af0c944728743cd5932fa6d @florian-grond maybe there is a reason ? Should the class be reworked of the arguments reordered ?

thibaudk commented 4 years ago

Thanks @florian-grond for merging PR. @zacksettel you can pull, test and see if the issue can be closed.

Cheers !

patrickdupuis commented 4 years ago

@zacksettel please confirm if this issue has been resolved