SPKitMult
User's Guide
SPKitSum multiplies two input signals with each other.
The first input is connected to a SPKitSum instance
with the standard setInput(SPKitProcessor*) function.
A second (multiplier) intput is connected with the
setMultInput(SPKitProcessor*) function.
SPKitMult may be used e.g. as a time-varying amplifier
where a multiplier signal controls the gain of an input signal.
Programmer's Reference
Defined in <spkit/mult.h>
Inherits from SPKitProcessor
SPKitSum
defines an setMultInput() function
for connecting the multiplier input
and overrides
getSample().
Public Members
- SPKitError setInput(SPKitProcessor* newInput)
- connect an input to the object and initialize it.
Calls
SPKitProcessor::setInput().
- void setMultInput(SPKitProcessor* mip)
- connect an additional input to the object.
Sets multInput to mip.
- int getSample(SPKitSample& outputSample)
- retrieve a multiplied audio sample
getSample() requests a sample from its input and
multiplies the sample with a sample retrieved
from multInput.
The result is strored in outputSample.
The function returns 0 when input or multInput
runs out of samples, 1 otherwise.
Protected Members
- SPKitProcessor* multInput
- multplier input