Class ModulatorType
Modulator source enumerator — the controller that drives a Modulator. Decodes the 16-bit "Sf2 modulator source" bit-field (SoundFont 2.04 §8.2): bits 0-6 are the controller index, bit 7 selects a MIDI continuous controller, bit 8 is the direction, bit 9 is the polarity, and bits 10-15 are the transform/source type.
public class ModulatorType
- Inheritance
-
ModulatorType
- Inherited Members
Constructors
ModulatorType(ushort)
Decodes a 16-bit SoundFont modulator source enumeration. Public so the synthesiser can build the implicit default modulators (SoundFont 2.04 §8.4) and so callers can construct modulator routings programmatically.
public ModulatorType(ushort raw)
Parameters
rawushort
Properties
ControllerSource
The general controller source, valid when IsMidiContinuousController is false.
public ControllerSourceEnum ControllerSource { get; }
Property Value
Direction
Direction: false = min-to-max (increasing), true = max-to-min (decreasing).
public bool Direction { get; }
Property Value
IsMidiContinuousController
Whether the source is a MIDI continuous controller (true) or one of the general controllers in ControllerSource (false).
public bool IsMidiContinuousController { get; }
Property Value
MidiContinuousControllerNumber
The MIDI continuous controller number, valid when IsMidiContinuousController is true.
public ushort MidiContinuousControllerNumber { get; }
Property Value
Polarity
Polarity: false = unipolar (0..1), true = bipolar (-1..1).
public bool Polarity { get; }
Property Value
RawValue
The raw 16-bit source enumeration this type was decoded from. Used to test two modulators for identity (SoundFont 2.04 §9.5).
public ushort RawValue { get; }
Property Value
SourceType
The transform/source curve applied to the controller value.
public SourceTypeEnum SourceType { get; }
Property Value
Methods
ToString()
public override string ToString()