Audio Editor: Nodes – Arma Reforger

From Bohemia Interactive Community
Revision as of 07:31, 26 July 2022 by Reyhard (talk | contribs) (→‎Mixer)
Jump to navigation Jump to search
🚧
TODO: Add images

Nodes are the fundamental building blocks that are used within the Audio Editor to create audio signal chains. There are a variety of different nodes, each with a specific purpose that modifies the sound or introduces some logic at its respective position in the chain.

Connecting a series of nodes together allows to create chains that produce sounds with varying degrees of complexity. This page serves as a reference for the usage of each type of node.

Note that there are certain fundamental nodes that must be present in a chain in order for a sound to be playable. These are namely:

  • a node that outputs an audio waveform: either a Bank or a Generator
  • a Sound node


Audio Editor Node Types

Nodes can be grouped into two main categories: resource and local. A node of the resource type is saved as a separate resource file and can be shared between multiple .acp files, while a node of the local type is stored in the .acp file itself and cannot be shared with other .acps.

Nodes of the resource type will appear on the design canvas with sharp corners, while nodes of the local type will appear with rounded corners.

Resource

Signal

Extension: .sig

Description: Takes one or more inputs and transforms them into one or more outputs that can be used to feed the inputs to other nodes. The internal logic that defines the input/output behavior can be edited inside the Signal Editor - BIKI by double-clicking on the node.

Input ports: Variable

Item detail:

Category Attribute Name Description
Inputs Name Input name (non-editable, defined inside the Signal Editor) *
Value Value of the input in case nothing is connected (otherwise this value is overridden by whatever is connected)
Min Minimum value of the signal input **
Max Maximum value of the signal output **
ValRT Slider that controls Value

* For connection with in-game signals, the name of the signal should correspond to the one defined in gamecode/script.

** This parameter has no effect on in-game signals or anything else connected to the signal input.

Mixer

Alias: OutputState, FinalMix

Extension: .afm

Description: This node serves as a way to group sounds based on type so that they can be processed as a unit before being sent to the final output(s). As with the Signal node, this node contains some internal logic that defines how each sound group is processed. This internal logic can be edited by double-clicking on the node.

Input ports: Variable depending on the value of the Inputs parameter

Local

BankLocal

Description: A collection of raw audio samples, of which one is selected to be played based on some selection method.

Input ports:

Name Type Description
Volume Signal Volume modifier [dB]
Pitch Signal Pitch modifier [semitones]
Replacer Special-purpose node Allows bank to be controlled by a Replacer. Hidden by default unless Enable replacer port attribute is checked.
Offset Signal Start position defined in milliseconds. Hidden by default unless Enable offset port attribute is checked.

Item detail:

Category Attribute Name Description Value Range
General Volume Volume [dB], applied to all samples in the bank [-60, +12] dB
Volume variance Volume randomization factor; maximum deviation from the value of Volume [0, +12] dB
Pitch Pitch shift in semitones applied to all samples in the bank [-12, +12] semitones
Pitch variance Pitch randomization factor; maximum deviation in semitones from the value of Pitch [0, 2] semitones
Loop count Number of times that the played sample is repeated [0, 255]
Loop begin The first sample of the region to be looped
  • Loop count defines the number of repetition
  • When Offset is used, then the value must be greater than Offset
Loop length Length of the loop region, in samples.
  • The value of Loop begin + Loop length must be greater than Offset
  • length
Infinite Loop If enabled, the played sample is repeated infinitely until the sound is stopped True/False
Selection Method for selecting a sample
  • RandomNoRepeat: Samples selected at random, with the exception that the same sample is not repeated twice in a row
  • Random: Samples selected at random
  • SequenceFromFirst: Samples played in sequence, starting with the first sample
  • FirstRandomAndSequence: Samples played in sequence, starting with a randomly-selected sample
  • RandomNoRepeatGlobal: Ensures that the RandomNoRepeat condition is fulfilled when multiple game entities can play the same sample
  • CustomSignalIndex: When this option is selected, a new input port is added to the bank that allows a sample to be selected based on the signal value
Resampler Resampling method, for converting between different sample rates [1]
  • Point: No interpolation (fastest, least accurate) [2]
  • Linear: Interpolation (slower, but more accurate than point) [2]
  • FIR (4/8/16): FIR filter that implements resampling (slowest but most accurate) [3]
Fade Fade-in/out function Defines the "shape" of the volume change during fade-in/out
  • Linear: TODO: link to visual plot
  • SCurve: TODO: link to visual plot
Fade-in/out time Time that it takes for the fade to complete (0: no fade in/out) [0, 10000] ms
Flags Disable streaming When the size of the file is >256kB, then the sample is streamed in 16kB blocks. This flag suppresses streaming and the sample is loaded into memory (a single block of data).

The flag is ignored when the size of the file is >16MB.

True/False
Disable updating Disables updating of bank inputs (Volume and Pitch) during playback if true. Recommended if:
  • The Volume & Pitch inputs are not connected to anything
  • The Volume & Pitch ports have signal inputs that are static
True/False
Preload Loads all samples into memory before any of them are played for the first time True/False
Enable replacer port If enabled, creates a new input port for a Replacer node True/False
Samples Samples List of audio samples n/a
Samples/Filename Link to the sample (.wav format) n/a
Samples/Probability In case of a randomized selection method, this parameter defines the probability that the sample will be selected.* [0, 100]
Samples/Index Custom signal index [0, inf+]
Samples/Metadata

* Note that this value does not indicate the probability as a percentage. The probability in % can be obtained by dividing this value by the sum of the probabilities of all samples in the bank, then multiplying by 100.

Bus

Description: Mixes down all audio streams fed to the "In" port to a single output

Input ports:

Name Type Description
In Audio Accepts one or more audio streams
Volume Signal Volume modifier [dB]
DSP Special-purpose node Accepts a Filter or FilterChain

Item detail:

Category Attribute Name Description Value Range
Limitation Source Limit Max number of inputs playing at a time. Quietest ones muted if limit exceeded. [0, 255]
Source Limit Type Specifies when the Source Limit is evaluated
  • Static: Limit is evaluated once at the beginning of playback
  • Dynamic: Limit is evaluated continuously during playback
Unsorted Channels Number of output channels [1, 8]
Sample Rate Sample rate [Hz] {8000, 11025, 16000, 32000, 44100, 48000, 64000, 96000, 192000} Hz
Volume Volume modifier [dB] [-60, 12] dB
Resampler Resampling method, for converting between different sample rates [1]
  • Point: No interpolation (fastest, least accurate) [2]
  • Linear: Interpolation (slower, but more accurate than point) [2]
  • FIR (4/8/16): FIR filter that implements resampling (slowest but most accurate) [3]

Sound

Description: The root node of a signal chain. Must be present in every chain in order for sound to be playable.

Input ports:

Name Type Description
In Audio Accepts the audio output from one or more branches
Volume Signal Volume modifier [dB]
Trigger Signal Accepts a signal whose value can be used to trigger playback of the sound
DSP Special-purpose node Accepts a Filter or FilterChain
Master Sound node Accepts a Sound node that controls the start/stop behavior of this node

Item detail:

Category Attribute Name Description Value Range
General Volume Volume modifier [dB] [-60, 12] dB
Priority Factor that is taken into account when determining which sources to keep or destroy in case the limit of playing sources is exceeded. Sounds with lower priority are more likely to be destroyed than sounds with higher priority. [0, 100]
Delay Time Delay time [ms] before sound is played [0, 10000] ms
No-Repeat Time Time [ms] below which sound events with the same name will be ignored [0, 1000] ms
Flags Skip Inaudible If enabled, sounds below the threshold of audibility are not played True/False
Bypass Volume Test If enabled, volume is not considered when determining which sources to destroy in case the limit of playing sources is exceeded True/False
Speed of Sound Simulates delayed playback due to the speed of sound

Warning: only the playback start time is delayed - other sound-related parameters (i.e. signals and transformation) are not delayed which may cause a mismatch between audio and visuals.

True/False
Updating disabled Performance optimization: only Shader node is updated during playback; any other nodes in the chain remain in their "initialization" states. True/False
Early Reflections Simulates early reflections from this sound True/False
Transformation Transformation Specifies the position from which this sound is played Entity: Sound is played from the position of the entity which the .acp file is attached to

Bone: Sound is played from the bone specified in Bone Name on the entity which the .acp file is attached to

Bone Name Name of the bone on the entity on which sound is played (hidden if Transformation Bone) String
Static If enabled, transformation is not updated during playback True/False
Trigger Type Trigger type Continuous: Sound is triggered and continues to repeat if the value of the signal connected to the Trigger port 0.

One shot: Sound is triggered once based on the values of Threshold and Reset.

Threshold Value that the signal connected to the Trigger port needs to exceed before sound is triggered Threshold >= Reset
Reset Value below which the signal needs to be before a new sound can be triggered Reset <= Threshold
Slave Event Type If this sound is a slave (i.e. if the Master port is connected to another sound), this parameter defines its start/stop behavior in response to the master. Start-Stop: Slave starts/stops when Master starts/stops

OnStart-Start: Slave starts when Master starts

OnStart-Stop: Slave stops when Master starts

Selector

Description: This node gives the user the ability to split the signal chain into multiple branches. On playback, the Selector will select one branch to connect to the chain, and leave the others disconnected based on the value of the control signal.

Input ports:

Name Type Description
Signal Signal Control signal whose value decides which of the following ports will be selected
(Varying number of user-defined ports) Audio The branch connected to this port becomes the output if the control signal falls within the Min/Max range defined for this port

Item detail:

Category Attribute Name Description Value Range
Ports Min Lower bound of this port's range (Unlimited)
Max Upper bound of this port's range (Unlimited)
Volume Volume modifier [dB] applied to the branch connected to this port [-60, 12] dB
Default If enabled, this port will be selected if the control signal does not fall within the range of any of the ports True/False

Generator

Description: Outputs a variety of different waveforms as audio. Used primarily for testing/prototyping purposes.

Input ports:

Name Type Description
Time Signal Controls the Time parameter

Item detail:

Category Attribute Name Description Value Range
Default Function Specifies the function/shape of the waveform that is output
  • Sine
  • Square
  • Sawtooth
  • Triangle
  • White noise
  • Pink noise
  • Brownian noise
  • Silence
Channels Number of output channels (Unlimited)
Sample Rate Sample rate [Hz] {8000, 11025, 16000, 32000, 44100, 48000, 64000, 96000, 192000} Hz
Time Length of time [ms] that the sound lasts [0, 10000] ms
Volume Volume modifier [dB] [-60, 12] dB
Loop Count Number of times that the sound is repeated [0, 255]
Frequency Frequency of the tone (hidden if not applicable to the Type) [1, 20000]
Envelope Attack Curve Defines the curvature/shape of the attack (fade in).
  • Linear
  • SCurve
Attack Time Length of the attack to reach the desired volume. [0, 10000] ms
Release Curve Defines the curvature/shape of the release (fade out).
  • Linear
  • SCurve
Release Time Length of the release to "fade out" after the generator time. [0, 10000] ms

Constants

Description: A set of constant signal values

Shader

Description: Applies panning and attenuation based on the spatial relation between the in-game listener and emitter

Input ports:

Name Type Description
In Audio Accepts the audio output from one or more branches
Spatial factor Special-purpose node Accepts a Spatiality node that defines how spatiality is applied based on the distance/spatial relation between the listener and emitter
Amplitude Special-purpose node Accepts an Amplitude node that defines how amplitude attenuation is applied based on the distance/spatial relation between the listener and emitter
Frequency Special-purpose node Accepts a Frequency node that defines how frequency attenuation is applied based on the distance/spatial relation between the listener and emitter
Incident angle (azimuth) Signal This port can be used to define the direction that the sound is perceived to be coming from. Utilizing this feature overrides the default panning calculated from the positions of the listener and emitter.

The value of the input is assumed to be in radians with a counter-clockwise rotation convention. This port is hidden unless Override Panning is enabled.

Item detail:

Category Attribute Name Description Value Range
Unsorted Spatial Factor Blending factor between how "positional" the sound is; set to 0 no spatial processing is applied, while set to 1 the sound is processed with panning and attenuation to sound fully positional. [0, 1]
Attenuate Ambient If enabled, non-positional sounds (Spatial Factor = 0) are still attenuated with distance. True/False
Override Panning If enabled, a new input port is added that allows the user to override the default panning calculated from the positions of the listener and emitter. True/False

Amplitude

Description: Special-purpose node designed for use with Shader. Contains the parameters that control the degree of amplitude attenuation that is applied by the Shader.

Item detail:

Category Attribute Name Description Value Range
Unsorted Curve Defines how the attenuation changes with distance - that is, the function that the attenuation vs. distance curve adheres to
  • Linear
  • SCurve
  • Logarithm
  • 1/r

Frequency

Description: Special-purpose node designed for use with Shader. Contains the parameters that control the degree of frequency attenuation that is applied by the Shader.

From a physical standpoint, this node models the attenuation of high frequencies due to:

  1. Distance between the listener and emitter
  2. Directivity of the emitter: the degree to which the "clarity" of the sound produced by the emitter changes based on the direction it's facing with respect to the listener; sound is most clear when the emitter is facing the listener and least clear when the emitter is facing away from the listener.

Input ports:

Name Type Description
Directivity factor Signal Controls the Directivity Factor parameter

Item detail:

Category Attribute Name Description Value Range
General Dynamic Update If enabled, the filter is updated during playback
  • Linear
  • SCurve
  • Logarithm
  • 1/r
Distance Attenuation Enable If enabled, low-pass filtering due to distance attenuation is applied True/Flase
Type Type of filter applied
  • AirAbsorption: Applies a custom filter that models the physical effect of distance on the frequency content of sound propagating through air
  • Lowpass: Applies a generic lowpass filter with tweakable parameters that allows for greater flexibility, but is physically less accurate
Filter Strength (AirAbsorption only) Scaling factor for AirAbsorption filter [0, 2]
Inner Range (Lowpass only) Distance [m] at which the filter's cutoff frequency is at the maximum value specified by Cutoff Max [0, 100] m
Outer Range (Lowpass only) Distance at which the filter's cutoff frequency is at the minimum value specified by Cutoff Min [0, 10000] m
Slope Factor (Lowpass only) Controls the slope of the filter; analogous to the "Q factor" of the filter [0.01, 100]
Cutoff Max (Lowpass only) Maximum cutoff frequency of the filter when distance <= Inner Range [100, 16000] Hz
Cutoff Min (Lowpass only) Minimum cutoff frequency of the filter when distance >= Outer Range [100, 16000] Hz
Directivity Enable If enabled, low-pass filtering due to source directivity is applied True/False
Cutoff Frequency Cutoff frequency of the directivity filter [100, 250] Hz
Directivity Factor The degree to which sound is affected by the filter (0 = no filtering) [0, 1]

Filter

Description: Special-purpose node that applies a specified DSP effect to the node (Sound or Bus) that it is connected to

Input ports:

Name Type Description
Wet/Dry Signal Controls the Wet/Dry parameter
Volume Audio The branch connected to this port becomes the output if the control signal falls within the Min/Max range defined for this port

Item detail:

Category Attribute Name Description Value Range
Unsorted Wet/Dry Blend of the dry (unprocessed) and wet (processed) versions of the input sound [0, 1]
Volume Volume modifier [dB] [-60, 12]
DSP Effect Stores the parameters of one of the DSP Effects listed in the DSP Effects table (See: DSP Effects)

DSP Effects:

DSP Type Description Attribute Name Description Value Range
Base Abstract type that all DSP effects inherit from n/a n/a n/a
Biquad Biquad filter [4] Biquad Type Type of filter
  • LowPass
  • HighPass
  • BandPass
  • Notch
  • PeakingEQ
  • LowShelf
  • HighShelf
  • AllPass
Fc Cutoff/center frequency of the filter [20, 16000]
Q Factor that controls the slope of the filter shape [0.1, 20]
Gain (PeakingEQ, LowShelf, HighShelf, and AllPass only) Gain [dB] of the filter [-18, 18]
BitCrusher Introduces distortion by reducing the bit depth of the audio input to 8-bit [5] Bit Mask An 8-digit string of '0's or '1's that specifies which of the 8 bits of the bit-crushed signal should be "enabled" (1) or "disabled" (0) String
Compressor Implements dynamic range compression; reduces the volume of the input signal if the specified threshold value is exceeded [6] Threshold Threshold value of the input level above which the gain begins to be reduced [-50, 0] dB
Ratio Specifies the value of n in the ratio n:1. This value controls the amount of gain reduction (e.g. a ratio of 2:1 tells us that if the input signal is 2 dB over the value of Threshold, the resulting output level is reduced to 1 dB). [1, 50]
Attack Specifies the amount of time [ms] that the output level takes to reach the value defined by Ratio [1, 1000] ms
Release Specifies the amount of time [ms] that the compressor takes to "undo" gain reduction in the case that the signal level has decreased [1, 1000] ms
Knee Width Controls the sharpness of the compressor's "knee" [0, 20]
Makeup Gain Additional gain applied to the output signal. Typically used to compensate for the reduction in gain by the compressor. [-24, 24]
Clip If enabled, the amplitude of the output signal is clipped to the range [-1, 1] True/False
Limiter Same as Compressor, but with Ratio set to ∞ (Same as Compressor)
Noise Gate Mutes the input signal if its level is below the specified Threshold Threshold Threshold value of the input level below which the signal is muted [-50, 0] dB

FilterChain

Description: Enables the grouping of multiple DSP nodes together in series. The individual DSP effects are applied in the order that they are connected to the FilterChain.

Input ports: Variable depending on the value of the Ports parameter

Replacer

Description: Special-purpose node designed to be used with Banks; enables the user to replace a string, if present, in the filepaths of all samples in the connected Bank.

Input ports:

Name Type Description
Control signal Signal Controls what the String to replace should be replaced with

Item detail:

Category Attribute Name Description Value Range
Strings String to replace The string, searched for in the filepaths of all samples in the connected Bank, that we wish to replace String
Replacement strings A list of candidate replacement strings and signal value pairs. A Replacement string from the list replaces String to replace in the filepaths of the connected bank's samples if its corresponding signal value matches that of the Control signal. n/a

Stream

Description: Abstract node used for connecting streaming audio (e.g. voice chat) to a signal chain created in the audio editor

Item detail:

Category Attribute Name Description Value Range
Unsorted ID ID string corresponding to the target stream ID defined in gamecode String

Spatiality

Description: Special-purpose node designed for use with Shader. Contains the parameters that control the degree of spatiality that is applied by the Shader.

Input ports:

Name Type Description
Spatial Factor Signal Controls the Spatial Factor parameter

Item detail:

Category Attribute Name Description Value Range
Spatiality Spatial Factor Constant that defines the spatial factor when no curve type or signal is connected [0, 1]
Spatial Curve Type Defines how the spatiality changes with distance - that is, the function that the spatiality vs. distance curve adheres to
  • Linear
  • S-Curve
  • Power of 1.41
  • Power of 2
  • Power of 3
  • Power of 1/1.41
  • Power of 1/2
  • Power of 1/3
Distance Begin Defines the distance [m] at which the spatial factor is at its minimal value specified by Interpol Begin [0, 10000] m
Distance End Defines the distance [m] at which the spatial factor is at its maximal value specified by Interpol End [0, 10000] m
Interpol Begin Defines the minimal value of the interpolation range [0, 1]
Interpol End Defines the maximal value of the interpolation range [0, 1]


Signal Editor Node Types

Convertor

Description: Converts input values into output values based on defined ranges for input values.

Category Attribute Description
Unsorted Input as default True: If input is not defined in any range, that output = input

False: If input is not defined in any range, that output = Default value

Default
Ranges Min
Max
Output Output value for defined range [Min, Max)

Note: Ranges have to be in order. So 1-2, 2-3, 3-4 will work, but 1-2, 3-4, 2-3 will not.

Smoother

Category Attribute Description
Unsorted Fade–in time Time of interpolation, when input is ascending
Fade-in type Interpolation curve type
Fade–out time Time of interpolation, when input is descending
Fade-out type Interpolation curve type
Input reset time Resets interpolation time, when lastInput != currentInput
Always interpolate Output is always interpolated, even when Input reset time = true.

Interpolate

Category Attribute Description
Unsorted X min
X max
Y min
Y max
Fade-in type Interpolation curve type, Used, when input is ascending.
Fade-out type Interpolation curve type, Used, when input is descending.

Envelope

Category Attribute Description Tips
Unsorted A
if (A == B && C = D)
{
	if (input >= A && input < C)
		output = 1;
	else
		output = 0;
}
B
C
D
Fade-in type Interpolation curve type. Between A and B
Fade-out type Interpolation curve type. Between C and D

Random

Category Attribute Description
Unsorted Min
Max
Update rate
  • Every get
  • Every frame


External References

  1. https://en.wikipedia.org/wiki/Sample-rate_conversion
  2. https://en.wikipedia.org/wiki/Interpolation
  3. https://ccrma.stanford.edu/~jos/resample/resample.pdf
  4. https://www.earlevel.com/main/2013/10/13/biquad-calculator-v2/
  5. https://en.wikipedia.org/wiki/Audio_bit_depth
  6. https://en.wikipedia.org/wiki/Dynamic_range_compression