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

Convert input array to audio rate when necessary #31

Closed patrickdupuis closed 4 years ago

patrickdupuis commented 4 years ago

This PR adds a call to .asAudioRateInput to the input array of HOABinaural.ar().

This helps avoid NaNs produced by Convolution2.ar() when it receives a number instead of an audio rate signal as input. This fix is particularly important when using HOASphericalHarmonics.coefN3D to multiply a multichannel signal and pass it to HOABinaural.

I've also fixed indentation issue in the code for HOABinaural.ar.