Module stereoFx
Use this module to create a stereo effect.
Example at classic-filter.lua.
This module acts as a layer that conceals the plugin.processBlock function, manages stereo channels, and exposes the stereoFx.Channel prototype for you define per-channel audio processing. Initialize it by calling stereoFx.init .
The stereoFx global is available to every protoplug script after including the main protoplug header :
require "include/protoplug"
Functions
stereoFx.init () | Set up channels. |
Class stereoFx.Channel
stereoFx.Channel:processBlock (samples, smax) | Override to process a channel's audio block. |
stereoFx.Channel:init () | Override to handle initialisation. |
Functions
- stereoFx.init ()
- Set up channels. This function must be called by any script that wishes to use this module.
Class stereoFx.Channel
This class represents a channel (ie. left or right).- stereoFx.Channel:processBlock (samples, smax)
-
Override to process a channel's audio block.
Define the audio processing of a single channel in this function.
Parameters:
- samples a C float* serving as input and output
- smax the maximum sample index (nSamples - 1)
- stereoFx.Channel:init ()
- Override to handle initialisation. Override this method to perform initialisation tasks on each channel, for example to create any per-channel fields.