3
<indexterm id="IndexHrtfer"><primary>hrtfer</primary></indexterm>
4
<refentryinfo><title>Signal Modifiers:Panning and Spatialization</title></refentryinfo>
6
<refentrytitle>hrtfer</refentrytitle>
10
<refname>hrtfer</refname>
12
Creates 3D audio for two speakers.
17
<title>Description</title>
19
Output is binaural (headphone) 3D audio.
25
<synopsis>aleft, aright <command>hrtfer</command> asig, kaz, kelev, <quote>HRTFcompact</quote></synopsis>
29
<title>Initialization</title>
31
<emphasis>kAz</emphasis> -- azimuth value in degrees. Positive values represent position on the right, negative values are positions on the left.
35
<emphasis>kElev</emphasis> -- elevation value in degrees. Positive values represent position above horizontal, negative values are positions above horizontal.
39
At present, the only file which can be used with <emphasis>hrtfer</emphasis> is <ulink url="examples/HRTFcompact"><citetitle>HRTFcompact</citetitle></ulink>. It must be passed to the opcode as the last argument within quotes as shown above.
43
HRTFcompact may also be obtained via anonymous ftp from: <ulink url="ftp://ftp.cs.bath.ac.uk/pub/dream/utilities/Analysis/HRTFcompact"><citetitle>ftp://ftp.cs.bath.ac.uk/pub/dream/utilities/Analysis/HRTFcompact</citetitle></ulink>
48
<title>Performance</title>
50
These unit generators place a mono input signal in a virtual 3D space around the listener by convolving the input with the appropriate HRTF data specified by the opcode's azimuth and elevation values. <emphasis>hrtfer</emphasis> allows these values to be k-values, allowing for dynamic spatialization. <emphasis>hrtfer</emphasis> can only place the input at the requested 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.
56
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 would need to be re-sampled at the desired rate.
62
<title>Examples</title>
64
Here is an example of the hrtfer opcode. It uses the file <ulink url="examples/hrtfer.csd"><citetitle>hrtfer.csd</citetitle></ulink>, <ulink url="examples/HRTFcompact"><citetitle>HRTFcompact</citetitle></ulink>, and <ulink url="examples/beats.wav"><citetitle>beats.wav</citetitle></ulink>.
66
<title>Example of the hrtfer opcode.</title>
67
<para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
68
<xi:include href="examples-xml/hrtfer.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
74
<title>See Also</title>
76
<link linkend="hrtfmove"><citetitle>hrtfmove</citetitle></link>,
77
<link linkend="hrtfmove2"><citetitle>hrtfmove2</citetitle></link>,
78
<link linkend="hrtfstat"><citetitle>hrtfstat</citetitle></link>.
83
<title>Credits</title>
86
<member>Authors: Eli Breder and David MacIntyre</member>
87
<member>Montreal</member>
92
<para>Fixed the example thanks to a message from &nameistvan;.</para>
3
<indexterm id="IndexHrtfer"><primary>hrtfer</primary></indexterm>
4
<refentryinfo><title>Signal Modifiers:Panning and Spatialization</title></refentryinfo>
6
<refentrytitle>hrtfer</refentrytitle>
10
<refname>hrtfer</refname>
12
Creates 3D audio for two speakers.
17
<title>Description</title>
19
Output is binaural (headphone) 3D audio.
25
<synopsis>aleft, aright <command>hrtfer</command> asig, kaz, kelev, <quote>HRTFcompact</quote></synopsis>
29
<title>Initialization</title>
31
<emphasis>kAz</emphasis> -- azimuth value in degrees. Positive values represent position on the right, negative values are positions on the left.
35
<emphasis>kElev</emphasis> -- elevation value in degrees. Positive values represent position above horizontal, negative values are positions under horizontal.
39
At present, the only file which can be used with <emphasis>hrtfer</emphasis> is <ulink url="examples/HRTFcompact"><citetitle>HRTFcompact</citetitle></ulink>. It must be passed to the opcode as the last argument within quotes as shown above.
43
HRTFcompact may also be obtained via anonymous ftp from: <ulink url="ftp://ftp.cs.bath.ac.uk/pub/dream/utilities/Analysis/HRTFcompact"><citetitle>ftp://ftp.cs.bath.ac.uk/pub/dream/utilities/Analysis/HRTFcompact</citetitle></ulink>
48
<title>Performance</title>
50
These unit generators place a mono input signal in a virtual 3D space around the listener by convolving the input with the appropriate HRTF data specified by the opcode's azimuth and elevation values. <emphasis>hrtfer</emphasis> allows these values to be k-values, allowing for dynamic spatialization. <emphasis>hrtfer</emphasis> can only place the input at the requested 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 <link linkend="balance"><citetitle>balance</citetitle></link> or by multiplying the output by some scaling constant.
56
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 would need to be re-sampled at the desired rate.
62
<title>Examples</title>
64
Here is an example of the hrtfer opcode. It uses the file <ulink url="examples/hrtfer.csd"><citetitle>hrtfer.csd</citetitle></ulink>, <ulink url="examples/HRTFcompact"><citetitle>HRTFcompact</citetitle></ulink>, and <ulink url="examples/beats.wav"><citetitle>beats.wav</citetitle></ulink>.
66
<title>Example of the hrtfer opcode.</title>
67
<para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
68
<xi:include href="examples-xml/hrtfer.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
74
<title>See Also</title>
76
<link linkend="hrtfmove"><citetitle>hrtfmove</citetitle></link>,
77
<link linkend="hrtfmove2"><citetitle>hrtfmove2</citetitle></link>,
78
<link linkend="hrtfstat"><citetitle>hrtfstat</citetitle></link>.
83
<title>Credits</title>
86
<member>Authors: Eli Breder and David MacIntyre</member>
87
<member>Montreal</member>
92
<para>Fixed the example thanks to a message from &nameistvan;.</para>