QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

hrtfer

        aLeft, aRight   hrtfer  asig, kAz, kElev, "HRTFcompact"

DESCRIPTION

Output is binaural (headphone) 3D audio.

INITIALIZATION

kAz - azimuth value in degrees. Positive values represent position on the right, negative values are positions on the left.

kElev - elevation value in degrees. Positive values represent position on the right, negative values are positions on the left.

At present, the only file which can be used with hrtfer is HRTFcompact. It must be passed to the u.g. as the last argument within qoutes as shown above.

PERFORMANCE

These unit generators place a mono input signal in a virtual 3D space around the listner by convolving the input with the appropriate HRTF data specified by the opcode's azimuth and elevation values. hrtfer allows these values to be k-values, allowing for dynamic spatialization. hrtfer can only place the input at the reqeusted position because the HRTF is loaded in at i-time (remember that currently, csound has a limit of 20 files it can hold in memory, otherwise it causes a segmentation fault). The output will need to be scaled either by using balance or by multiplying the output by some scaling constant.

Note - the sampling rate of the orchestra must be 44.1kHz. This is because 44.1kHz is the sampling rate at which the HRTFs were measured. In order to be used at a different rate, the HRTFs need to be resampled at the desired rate.

EXAMPLE:

kaz             linseg  0, p3, -360  ; move the sound in circle
kel             linseg  -40, p3, 45  ; around the listener, changing
                                     ; elevation as its turning
asrc            soundin "soundin.1"
aleft,aright    hrtfer  asrc, kaz, kel, "HRTFcompact"
aleftscale      =       aleft * 200
arightscale     =       aright * 200
                outs    aleftscale, arightscale

AUTHORS:

Eli Breder & David MacIntyre
Montreal
1996
 

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97