PopcornFX v2.8

Generic selectors
Exact matches only
Search in title
Search in content
  1. Home
  2. Docs
  3. PopcornFX v2.8
  4. Scripting reference
  5. Samplers
  6. Audio sampler

Audio sampler

Audio sampler

Sampling functions

Return typeDescription
intspectrumFilter enumeration

  1. spectrumFilter.Point: No interpolation (nearest sample)
  2. spectrumFilter.Linear: Linear interpolation between the 2 nearest samples
  3. spectrumFilter.Cubic: Cubic interpolation between the 4 nearest samples
floatSamplerName.sample(float cursor, int sampleFilter)
Samples the audio data at coordinate cursor on the horizontal axis, normalized in the [0, 1] range.sampleFilter can be one of the spectrumFilter values, and defines how the sampler will interpolate between adjacent samples.
The return type is a float value.
If the audio sampler is setup as sampling the spectrum, cursor will be a bass->treble cursor.
If the audio sampler is setup as sampling the waveform, cursor will be a time cursor into the current audio stream waveform window.
floatSamplerName.sample(float cursor, float convolution, int sampleFilter, int convolutionFilter)
Samples the audio data at coordinate cursor on the horizontal axis, normalized in the [0, 1] range.convolution is in the [0, 1] range, and controls the convolution level (blur) of the sampled data.
sampleFilter can be one of the spectrumFilter values, and defines how the sampler will interpolate between adjacent samples.
convolutionFilter can be one of the spectrumFilter values, and defines how the sampler will interpolate between adjacent convolution mipmaps.
The return type is a float value.
If the audio sampler is setup as sampling the spectrum, cursor will be a bass->treble cursor.
If the audio sampler is setup as sampling the waveform, cursor will be a time cursor into the current audio stream waveform window.

 

Disclaimer: These are describing the reference implementation. When using attribute samplers, the behavior of these functions can vary depending on the implementation in the game-engine where the effect is loaded.

Was this article helpful to you? Yes No

How can we help?