Table of Contents

Class EnvelopeGenerator

Namespace
NAudio.Dsp
Assembly
NAudio.Core.dll

Envelope generator (ADSR)

public class EnvelopeGenerator
Inheritance
EnvelopeGenerator
Inherited Members

Constructors

EnvelopeGenerator()

Creates and Initializes an Envelope Generator

public EnvelopeGenerator()

Properties

AttackRate

Attack Rate (seconds * SamplesPerSecond)

public float AttackRate { get; set; }

Property Value

float

DecayRate

Decay Rate (seconds * SamplesPerSecond)

public float DecayRate { get; set; }

Property Value

float

ReleaseRate

Release Rate (seconds * SamplesPerSecond)

public float ReleaseRate { get; set; }

Property Value

float

State

Current envelope state

public EnvelopeGenerator.EnvelopeState State { get; }

Property Value

EnvelopeGenerator.EnvelopeState

SustainLevel

Sustain Level (1 = 100%)

public float SustainLevel { get; set; }

Property Value

float

Methods

Gate(bool)

Trigger the gate

public void Gate(bool gate)

Parameters

gate bool

If true, enter attack phase, if false enter release phase (unless already idle)

GetOutput()

Get the current output level

public float GetOutput()

Returns

float

Process()

Read the next volume multiplier from the envelope generator

public float Process()

Returns

float

A volume multiplier

Reset()

Reset to idle state

public void Reset()