Vixen
02b45cc4
csharp
public sealed class DelayEffect

An echo, with the repeats getting darker the way a real one does.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The second environmental effect after reverb, and the one that does the jobs reverb cannot: a canyon, a stairwell, a public-address system, the quarter-note repeat under a piece of music. Reverb is a smear with no discernible repeats; a delay is repeats you can count, and the ear treats them as completely different things.

The feedback path is filtered, and that is what makes it sound like a place. An unfiltered delay repeats the same bright signal until it fades, which is what a digital delay does and what nothing in the world does — every real reflection loses its top end to the surface it bounced off. One low-pass in the loop, and the repeats darken as they die.

Feedback is clamped below one. At one it never decays; above it the level doubles every repeat until the master limiter is the only thing between the player and a very loud noise. 0.95 is the ceiling, which is around forty audible repeats.

Fields and properties (9)

  • public float MaxDelaySeconds

    The longest delay this effect can be set to.

  • public float DelaySeconds

    How long until the first repeat.

  • public float Feedback

    How much of each repeat feeds the next. Clamped below one.

  • public float Wet

    How much of the delayed signal to add.

  • public float Dry

    How much of the untouched signal to keep.

  • public float DampingHz

    Where the low-pass in the feedback path sits, in hertz.

  • public bool PingPong

    Whether the repeats alternate between the speakers.

  • public bool Enabled

    Whether it does anything. A bypassed effect costs one branch a block.

  • public IReadOnlyList<string> Properties

    The knobs this effect will answer to, by name.

Methods (5)

  • public void Prepare(in AudioFormat format, int maxFrames)

    Sizes and clears every buffer the effect needs.

  • public void Process(Span<float> buffer, int frameCount, int channels)

    Processes a block in place.

  • public void Reset()

    Throws away everything the effect remembers about what came before.

  • public bool TrySetProperty(string name, float value)

    Sets one of the effect's knobs by name, for automation.

  • public bool TryGetProperty(string name, out float value)

    Reads one of the effect's knobs by name.

Used by (5)

  • AudioEffectTestsVixen.Audio.Tests
  • DelayEffectAssetVixen.Audio
  • MixControlTestsVixen.Audio.Tests
  • MixerAssetTestsVixen.Audio.Tests
  • MixerParameterTestsVixen.Audio.Tests