logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Enum MusicFadeCurve

    Shape of the volume fade applied to a looping track's tail as it releases to silence.

    Namespace: Serenity.MusicPlayer.Domain.Types
    Assembly: Serenity.MusicPlayer.Domain.dll
    Syntax
    public enum MusicFadeCurve
    Remarks

    Each preset maps to a gain function that returns 1 (full volume) at the start of the fade and 0 (silence) at the end. Custom instead evaluates an author-drawn curve sampled into a gain table.

    Fields

    Name Description
    Custom

    Uses a custom author-drawn curve sampled into a gain table.

    Exponential

    Fades quickly at first then eases into a gentle tail (quadratic ease-out).

    Linear

    Constant-rate fade: gain decreases linearly from 1 to 0.

    Logarithmic

    Holds the level early then drops off near the end (quadratic ease-in).

    SCurve

    Smooth ease in and out (smoothstep) for a soft start and end to the fade.

    In this article
    © 2026 Serenity. All Rights Reserved