Generates decoding kernels required by the Ambisonic Toolkit's first order decoder, FoaDecode.
Ambisonic UHJ stereo decoder.1
kernelSize |
256, 512, 1024, 2048, 4096, 8192 |
server |
Server on which to load kernel. |
sampleRate |
The sample rate defaults to |
score |
Default is |
For production work targeting stereo output, the authors advise using UHJ, as Ambisonic UHJ stereo is the native Ambisonic stereo format.
Synthetic spherical head model HRTF2 decoder, equalised for the diffuse field.
subjectID |
0 to 9 |
server |
Server on which to load kernel. |
sampleRate |
The sample rate defaults to |
score |
Default is |
-newSpherical models a sphere only, and is equivalent to placing a pair of spaced, sphere baffled microphones in the soundfield. With no pinnae and no body, elevation cues are not present.
The subjectID argument varies to suit listener head width, with 0 the smallest and 9 the largest head. The user is advised to audition to find a suitable choice.
Measured HRTF decoder, with measurements from IRCAM's Listen HRTF database3 equalised for the diffuse field.
subjectID |
1002 to 1059 (51 in total) WARNING: subjectIDs are not entirely contiguous. |
server |
Server on which to load kernel. |
sampleRate |
The sample rate defaults to |
score |
Default is |
The user is advised to audition subjectIDs to find a suitable choice. If an invalid subjectID is chosen, valid choices are returned.
// Boot desired server first... // ... choose an invalid subject ~encoder = FoaDecoderKernel.newListen(0) // make sure you scroll up to see the resulting valid subjects!
Measured HRTF decoder, with measurements from the University of California Davis' CIPIC HRTF database4 equalised for the diffuse field.
subjectID |
3 to 165 (45 in total) WARNING: subjectIDs are not entirely contiguous. |
server |
Server on which to load kernel. |
sampleRate |
The sample rate defaults to |
score |
Default is |
The CIPIC HRTF database provides two KEMAR dummy measurements. subjectID = 21 is the large pinnae dummy and subjectID = 165 is the small pinnae dummy.
The user is advised to audition subjectIDs to find a suitable choice. If an invalid subjectID is chosen, valid choices are returned.
// Boot desired server first... // ... choose an invalid subject ~encoder = FoaDecoderKernel.newCIPIC(0) // make sure you scroll up to see the resulting valid subjects!
Describes both the signal set and the tool set, encompassing the Ambisonic order, as well as channel ordering and normalisation.
Answers 'FOA'
, aka traditional B-format:
Ambisonic Order | Channel Ordering | Channel Normalisation |
1st | Gerzon (aka Furse-Malham) | MaxN |
'decoder'
Answers 'kernel'
, i.e. the type of operation used to compute the resulting signals.
Answers the kind of decoder
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.kind // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.kind // don't forget to free!! ~decoder.free
Answers the subjectID of the decoder
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.subjectID // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.subjectID // don't forget to free!! ~decoder.free
Answers the number of decoder dimensions: 2D or 3D.
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newSpherical // inspect ~decoder.dim // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.dim // don't forget to free!! ~decoder.free
Answers the number of loudspeaker (or headphone) feeds (output channels).
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.numChannels // don't forget to free!! ~decoder.free
Answers the direction of loudspeaker (or headphone) feeds, with angles in radians.
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.dirChannels.raddeg // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.dirChannels.raddeg // don't forget to free!! ~decoder.free
Answers the decoder kernel.
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.kernel // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.kernel // don't forget to free!! ~decoder.free
Answers the kernelSize.
Use of FoaDecoderKernel introduces a delay to the decoded B-format signal.
The total delay, in samples, can be calculated as (kernelSize-1)/2 + kernelSize - blockSize
, where blockSize is the number of samples in one control period of the Server in use.
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newUHJ // inspect ~decoder.kernelSize // calculate delay in samples (~decoder.kernelSize-1)/2 + ~decoder.kernelSize - s.options.blockSize // calculate delay in seconds ((~decoder.kernelSize-1)/2 + ~decoder.kernelSize - s.options.blockSize) / s.sampleRate // don't forget to free!! ~decoder.free
// decoder - make sure you boot the server first!! ~decoder = FoaDecoderKernel.newCIPIC // inspect ~decoder.kernelSize // calculate delay in samples (~decoder.kernelSize-1)/2 + ~decoder.kernelSize - s.options.blockSize // calculate delay in seconds ((~decoder.kernelSize-1)/2 + ~decoder.kernelSize - s.options.blockSize) / s.sampleRate // don't forget to free!! ~decoder.free
Free the kernel.
Release the kernel buffer's memory on the server and return the bufferID back to the server's buffer number allocator for future reuse.
A synonym for -numChannels
A synonym for -dirChannels
Answers the number of inputs for the decoder. 3 for 2D and 4 for 3D.
A convenience method providing polymorphism with FoaEncoderKernel: -dirInputs.
[ inf, inf, inf ]
[ inf, inf, inf , inf ]
Please see FoaDecode: Examples.