forked from s-e-a-m/faust-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hrtf.lib
21 lines (12 loc) · 797 Bytes
/
hrtf.lib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// https://en.wikipedia.org/wiki/Sound_localization#Lateral_information_.28left.2C_ahead.2C_right.29
eardistance = 0.18; // metri
headradius = 0.09; // metri
iid(f,rad) = 1.0+pow((f/1000),0.8)*sin(rad);
itd(rad) = headradius*((rad+sin(rad)))/speedofsound;
//https://en.wikipedia.org/wiki/Group_delay_and_phase_delay
//In physics, and in particular in optics, the term group delay has the following meanings:
//The rate of change of the total phase shift with respect to angular frequency,
tph(d,rad,f) = -(d*rad/2*ma.PI*f);
//through a device or transmission medium, where \phi \ is the total phase shift in radians, and
// \omega \ is the angular frequency in radians per unit time, equal to 2πf
// 2\pi f\ , where f \ is the frequency (hertz if group delay is measured in seconds).