belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.28k stars 130 forks source link

Elevation Range for HRTF? #215

Closed jsl303 closed 3 years ago

jsl303 commented 3 years ago

According to the documentation, elevation can go up to 90, but it can only go down to -40 for HRTF. hrtf = HRTF(PinkNoise(mul=0.2), azimuth=-45, elevation=Sine(0.1).range(-40, 90)).out() If you listen to this, it doesn't go down as far as it goes up. Is this limitation of the particular HRTF algorithm? It would be amazing if the elevation parameter for HRTF to be able to go down all the way. hrtf = HRTF(PinkNoise(mul=0.2), azimuth=-45, elevation=Sine(0.1).range(-90, 90)).out() Thanks!

belangeo commented 3 years ago

Pyo's HRTF object uses impulse response from:

http://alumni.media.mit.edu/~kdm/hrtfdoc/hrtfdoc.html

In this set, positions were sampled at elevations from -40 to 90 degrees... Simple as that!

By the way, if your intention is to change the source position with LFO or other audio signals), I recommend the Binaural object, instead of the HRTF one. HRTF can produce weird phasing effects when cross-fading from one set of filters to another...

http://ajaxsoundstudio.com/pyodoc/api/classes/pan.html?highlight=binaural#pyo.Binaural

jsl303 commented 3 years ago

Thanks for the clarification!