🔧 Experimental Feature - Available with AudioNodes HD
The Log Node computes the natural logarithm of its input. The natural logarithm is the most fundamental or “basic” logarithm in math. To compute the logarithm of a value with another base, such as base-2, you can take the natural logarithm of that value, and divide it by the natural logarithm of the base, such as:
log(X)/log(2)
Inputs
Audio/Control Input
The input audio or control signal to compute the natural logarithm from.
The signal must only contain positive samples. The logarithm of non-positive values is not defined. See the technical details section for more.
The logarithm is computed for each sample in the input signal; it it has more than 1 channel, the logarithm is computed for each channel independently.
Settings
This Node has no settings.
Outputs
Audio/Control Output
An audio or control signal containing the natural logarithm of the Audio/Control Input. The output is only correct for positive input values. See the technical details section for more.
This output supports constant folding if the input is also constant folded, and always has the same channel count.
Technical Details
The logarithm operation in mathematics only makes sense for positive numbers. By extension, the Log Node only supports a positive input (or to be more precise, positive samples in its input signal). Otherwise, the Log Node outputs:
- The lowest 32-bit floating point value for 0
- A fallback value of 0 for negative values
In each case, a warning indicator is shown in the Log Node’s header.