|On this page|
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.
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.
The two methods of calculating the envelope:
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.
Determines which values are used to compute the envelope: magnitude, power, maximum or minimum values.
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.
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.
If on, the envelope is resampled down to the rate listed in the next parameter. This is very useful for audio.
The sample rate used to resample the envelope after it is calculated.
Some of these parameters may not be available on all CHOP nodes.
To determine the channels that are affected, some CHOPs have a scope string. Patterns can be used in Scope, for example
* (match all), and
? (match single character).
The following are examples of possible channel name matching options:
Matches a single channel name.
chan3 tx ty tz
Matches four channel names, separated by spaces.
Matches each channel that starts with
Matches each channel that has
foot in it.
? matches a single character.
t? matches two-character channels starting with t.
Matches number ranges, giving
[xyz]matches three characters, giving channels
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 the rate of the first input to resample the others.
Resample At Maximum Rate
Resample to the highest sample rate.
Resample At Minimum Rate
Resample to the lowest sample rate.
Error if Rates Differ
Does not accept conflicting sample rates.
The units of the time parameters.
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).
When you change the Units parameter, the existing parameters are not converted to the new units.
Time slicing is a feature that boosts cooking performance and reduces memory usage. Traditionally, CHOPs calculate the channel over its entire frame range. If the channel needs 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 the Time Slice.
Causes the memory consumed by a CHOP to be released after it is cooked, and the data passed to the next CHOP.
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
You can leave the Export Prefix blank, but then your CHOP track names need to be absolute paths, such as
Every CHOP has this option. Each CHOP gets a default color assigned to it for display in the graph, but you can override the color with the 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.
Current channel index.
Total number of channels.
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.