Near-Field Effect (NFE):
Filter:
atk-sc3/Guides (extension) | Libraries > Ambisonic Toolkit > Guides & Tutorials

Near-Field Effect (NFE)
ExtensionExtension

Higher Order Ambisonic (HOA) near-field effect examples
 

This document provides a very short overview of the near-field effect (NFE). A variety of simple HOA example implementations follow.

The Near-Field Effect

We'll by briefly reviewing the near-field effect (NFE) in the context of FOA and HOA.

FOA

The near-field effect (NFE) has been formally included within the Ambisonic framework since its initial design. In the classic days of Ambisonic hardware, users usually only directly interfaced this aspect of Ambisonics through the use of:

The ATK's FOA toolset includes NFE radial filters in their classic Ambisonic form. In the FOA context a travelling wave encoded with all real, aka basic, coefficients represents a planewave. The ATK also names this travelling wave as a basic wave, because of the use of basic, real coefficient encoding. SuperCollider's PanB is a basic, planewave encoder.

An Ambisonic system's reference radius is the radius at which a basic wave is encoded. So the reference radius locates the radius at which the system's encoding uses real numbers only.

For FOA, the reference radius is infinity. A wave arriving from infinity is a planewave, which is why FOA's basic wave is a planewave.

On receiving a basic wave, the FOA proximity filter add curvature to the wavefront, converting it from a planewave to a spherical wave1 at a defined radius.2

The FOA near-field compensation filter returns the inverse of the FOA proximity filter, and given the same radial argument undoes the curvature to the wavefront that had been applied. In the context of loudspeaker decoding, the near-field compensation filter is intended to remove the wavefront add by the nearness of the loudspeakers. I.e., near-field compensation filter removes the curve added by the physical nearness of real monitors in the real world.

When FoaNFC and FoaProximity are used together, we can reach inside a soundfield and apply processing at a specified radius. The one possible network looks like this:


Source extraction

Parameters theta and phi supply the look direction. The angle argument continuously transforms the image between:

The term radial beamforming is used to describe this soundfield operation. With radial beamforming the soundfield can be decomposed and recomposed as spherical waves, at whatever radius we choose.

HOA

It could be argued that the greatest innovation in Daniel's reframing of Ambisonics in a higher order context is the translation of the basic wave to a radius other than infinity.

If we'd like to think in a real world way, this is equivalent to pre-filtering a soundfield with the near-field compensation filter in anticipation of decoding to loudspeakers located at a pre-determined radius. This radius is the reference radius. We can view this as the anticipated loudspeakers finishing off the synthesis of the curve of the encoded waves by physically adding the remaining curve.

This is all good, but the true genius is the inclusion of a the near-field effect control filter, which combines the near-field compensation and proximity filter into a single block. The arrangement is as illustrated above, but without the inclusion of focus. Also, instead of having a single distance argument, there are two, one for each filter. Doing so makes it very easy to translate the reference radius. In other words, we can move where basic waves are encoded, which easily facilitates radial beamforming.

If we prefer thinking in terms of virtual loudspeakers, changing the reference radius corresponds to moving the virtual loudspeakers. This then corresponds to moving the soundfield sampling radius when it comes to decomposition and recomposition.

________________

As part of the ATK's HOA toolset we have three principal filters tasked with the near-field effect.

Each of these has a distinct role:

Near-Field Effect Distance filter (NFE-D)
HoaNFDist transforms a basic wave into a planewave.

Signal: *hoaDist is the associated FIR kernel designer.

Near-Field Effect Proximity filter (NFE-P)
HoaNFProx transforms a planewave into a basic wave.

Note, an associated FIR kernel designer is not provided.3

Near-Field Effect Control filter (NFE-C)
HoaNFCtrl transforms a basic wave into a spherical wave at another radius.4

Signal: *hoaCtrl is the associated FIR kernel designer.

NOTE: In NFC-HOA encoding, planewaves and spherical waves are referenced to a real number valued reference radius.

E.g., a planewave in NFC-HOA is not a basic wave. Conversly, complex coefficients are required to encode and synthesize a planewave.

Unlike their FOA equivalents, HoaNFDist and HoaNFProx do not have an exposed distance argument. By default, the distance argument is set internally to the ATK's reference radius for HOA, 1.5 meters.5 Doing so enforces the ATK's NFE encoding convention.

HoaNFCtrl has two arguments, encoding radius and decoding radius, which allows comprehensive control of the near-field effect in HOA.

We'll review some examples, below.

Encoding & decoding

Two examples intended to offer insight into what encoded spherical waves look like with respect to signal phase and gain.

Encode a spherical wave

For this first example we'll encode a travelling wave. The three example radii all return spherical waves. One of these, encoded at 1.5 meters, is a basic wave.

NOTE: A decoder hasn't been provided, the intention of this example is to inspect the returned HOA encoded signals for a collection of spherical waves. You'll see that for an encoding at the reference radius, when all coefficients are real, all harmonics are aligned in phase.

Observe this in the scope.

Sample a spherical wave

By sampling a soundfield at the radius a spherical wave was originally encoded, we can recover the original source.

This is called radial soundfield sampling. We look into the soundfield at a specific radius.

The look direction of the beamformer, HoaDecodeDirection, is slowly moving back and forth. This movement is what is responsible for the varing gain of the returned beam.

NOTE: The three beamshape choice offer different shaped spatial sampling windows.

Beaming & nulling

Beaming and nulling transforms are spatial bandpass and bandreject filters. Instead of operating in the frequency domain, we're operating in the spatial domain.

Given the same beamshape, the beam summed with a corresponding null will return the original soundfield.

Used in this way, these two transforms allow us to easily process different parts of the soundfield in different ways. E.g., the null could be lowpass filtered and then remixed with the beam.

NOTE: As with the soundfield sampler HoaDecodeDirection example above, the beam is formed at a sampling radius.

Beamform with HoaBeam

Encode six sinusoids on the axes, then sample the soundfield with a single beam.

The beam is reencoded, so we're auditioning a virtual speaker at the beam sampling radius, which can be varied. We'll need a decoder to audition.

This is like spatially bandpass filtering the soundfield.

Beamform with HoaXformMatrix

Similar to Beamform with HoaBeam, but this time beaming with a static matrix.

NOTE: Because the beaming transform matrix is a real number matrix, the beam is formed at the reference radius.

To beam at another radius, we'd have to use the technique illustrated below.

Nullform with HoaNull

Same test as above, but we form a null, instead. We are spatially rejecting part of the soundfield.

Techniques

The Near-Field Effect Control filter (NFE-C), HoaNFCtrl has a wide number of uses in HOA. Here are a few important examples.

Decode to a 2D array

Radial encoding followed by decoding with loudspeaker near-field compensation.

When the real loudspeaker radius doesn't match the reference radius, we need to use HoaNFCtrl to reset the radial encoding.

We can view this as HoaNFCtrl finishing the radial part of the panning law, to match our actual loudspeaker array.

NOTE: This is required if we would like the NFE to properly resolve.

Synthesize a diffuse field

Here we synthesize a soundfield that is diffuse at a specified encoding radius.6

Translate to a new radius

Translate from source radius to target radius. A very useful trick!

Modulate at radius

The use of two HoaNFCtrl transformers offers the possibility of modulation at a given radius.

The soundfield is decomposed into a collection of samples at a certain radius. These are then modulated. The soundfield is re-encoded, and samples are returned to their original radius.

If we wish to granulate at a radius other than the reference radius, for instance, this example illustrates how to do so.

Format Exchange

If you haven't already, do review Format-Exchange.

Encode from FOA

The example using HoaNFDist is equivalent to the one found here.

Decode to FOA

The example using HoaNFProx is equivalent to the one found here.

[1] - Many users will refer to this as an encoded point source.
[2] - FoaProximity argument distance.
[3] - Too many big numbers!
[4] - A spherical wave with complex coefficients.
[5] - If desired, the system reference radius may be changed: AtkHoa: *setRefRadius.
[6] - Arguably, one might consider a soundfield to be considered diffuse only if it is composed of planewaves. If that is your preference, then HoaNFDist is the tool for the job.