Envelope channel node

Outputs the maximum amplitude in the vicinity of each sample of the input.

All Parameters Example files

See also: Math

The Envelope CHOP outputs the maximum amplitude in the vicinity of each sample of the input. It takes the absolute value of the input, and uses a sliding window of a number of samples to find the maximum amplitude near each sample.

Tip

The loudness levels of an audio track can be kept roughly constant by computing an envelope of the audio with a wide window, and then passing the original audio and the envelope to a Math CHOP and selecting Combine CHOP > Divide. This will make the amplitude approximately 1.

Parameters

Envelope

Type

The two methods of calculating the envelope:

Exponential Decay

For each sample, the value is compared to the previous sample. If it is greater than the previous, the value of the envelope is equal to the value of that sample, and that sample is stored as the current peak. If it is less than, the value of the envelope decays exponentially from the last peak to the current value (as more samples pass that are smaller than the peak, the envelope decays toward the waveform).

Pros of this method: envelope always encloses the data. Cons: slope can be discontinuous, making the output look bumpy.

Local Maximum Window

The channel is separated into windows of N samples determined by the Envelope Width. In each window, the maximum amplitude is found. The maximum value of the window is used as the envelope value.

Pros of this method: Good shape. Cons: signal sometimes jumps outside the envelope. The signal is quantized, so pulses can be off by as much as N/2.

Envelope Bounds

Determines which values are used to compute the envelope: magnitude, power, maximum or minimum values.

Envelope Width

The width of the window to use in the envelope calculation. Adjust this width to capture as many features of the input as needed. Lower values capture more detail, while higher values create a smoother envelope. It is expressed in Units.

Interpolate

In Local Maximum window mode, this provides interpolation options for the windowed values.

Normalize Power Envelope

Keeps the total power in the signal constant when adjusting the Envelope Width.

Resample Envelope

If on, the envelope is resampled down to the rate listed in the next parameter. This is very useful for audio.

Sample Rate

The sample rate used to resample the envelope after it is calculated.

Common

Some of these parameters may not be avaiable on all CHOP nodes.

Scope

To determine which channels get affected, some CHOPs have a scope string. Patterns can be used in the scope, for example * (match all), and ? (match single character).

The following are examples of possible channel name matching options:

chan2

Matches a single channel name.

chan3 tx ty tz

Matches four channel names, separated by spaces.

chan*

Matches each channel that starts with chan.

*foot*

Matches each channel that has foot in it.

t?

The ? matches a single character. t? matches two-character channels starting with t.

r[xyz]

Matches channels rx, ry and rz.

blend[3-7:2]

Matches number ranges giving blend3, blend5, and blend7.

blend[2-3,5,13]

Matches channels blend2, blend3, blend5, blend13.

t[xyz]

[xyz]matches three characters, giving channels tx, ty and tz.

Sample Rate Match

The Sample Rate Match Options handle cases where multiple input CHOPs’ sample rates are different.

Resample At First Input’s Rate

Use rate of first input to resample others.

Resample At Maximum Rate

Resample to highest sample rate.

Resample At Minimum Rate

Resample to the lowest sample rate.

Error if Rates Differ

Does not accept conflicting sample rates.

Units

The units for which time parameters are specified.

For example, you can specify the amount of time a lag should last for in seconds (default), frames (at the Houdini FPS), or samples (in the CHOP’s sample rate).

Note

When you change the Units parameter, it does not convert the existing parameters to the new units.

Time Slice

Time Slicing is a feature which boosts cooking performance and reduces memory usage. Traditionally, CHOPs calculate the channel over its entire frame range. If the channel does need to be evaluated every frame, then cooking the entire range of the channel is unnecessary. It is more efficient to calculate only the fraction of the channel that is needed. This fraction is known as a Time Slice.

Unload

Causes the memory consumed by a CHOP to be released after it is cooked and the data passed to the next CHOP.

Export Prefix

The Export prefix is prepended to CHOP channel names to determine where to export to.

For example, if the CHOP channel was named geo1:tx, and the prefix was /obj, the channel would be exported to /obj/geo1/tx.

Note

You can leave the Export Prefix blank, but then your CHOP track names need to be absolute paths, such as obj:geo1:tx.

Graph Color

Every CHOP has this option. Each CHOP gets a default color assigned for display in the Graph port, but you can override the color in the Common page under Graph Color. There are 36 RGB color combinations in the Palette.

Graph Color Step

When the graph displays the animation curves and a CHOP has two or more channels, this defines the difference in color from one channel to the next, giving a rainbow spectrum of colors.

Example files

Envelope

$HFS/houdini/help/examples/nodes/chop/envelope/Envelope.cmd

Load | Launch

This example illustrates how the Envelope CHOP outputs the maximum amplitude of a channel in the vicinity of each sample of the input. Here, envelope1 and envelope2 try to follow the maximum amplitude of the noisy curve they use as input.

To visualize the channels in this demonstration, please enter the CHOP network and use the default CHOPs desktop.

Usages in other examples

Example name Example for