Struct Param
- Namespace
- Sigil.Sound
- Assembly
- Sigil.Sound.dll
A value that drives an operator: a constant, another Sigil.Sound.Sound (audio-rate modulation), or a function of time in seconds. Converts implicitly from all three, so one overload covers them.
public readonly struct ParamInherited Members
Properties
ConstantValue
The constant value; only meaningful when Sigil.Sound.Param.IsConstant is true.
public float ConstantValue { get; }Property Value
IsConstant
True when this parameter never changes.
public bool IsConstant { get; }Property Value
Methods
Compile(RenderContext)
Creates the per-render source that produces this parameter's values block by block.
public ParamSource Compile(RenderContext context)Parameters
contextRenderContext
Returns
ToString()
A short description of the parameter, used in the description of the sound it is part of.
public override string ToString()Returns
Operators
implicit operator Param(float)
A constant parameter.
public static implicit operator Param(float value)Parameters
valuefloat
Returns
implicit operator Param(double)
A constant parameter.
public static implicit operator Param(double value)Parameters
valuedouble
Returns
implicit operator Param(Sound)
A parameter whose value is a sound, rendered at the audio rate and averaged to mono: audio-rate modulation.
public static implicit operator Param(Sound sound)Parameters
soundSound
Returns
implicit operator Param(Func<double, float>)
A parameter that is a function of time in seconds, such as t => (float)(440 + 20 * Math.Sin(t)).
public static implicit operator Param(Func<double, float> function)