soundchip 0.4.61

Software sinth with configurable channels for authentic sounding virtual sound chips.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::Normal;

/// Defines the envelope's looping behavior, if any.
#[derive(Debug, Clone, Copy, Default, PartialEq)]
pub enum LoopKind {
    #[default]
    /// No loop. The last knot's value will be maintained.
    None,
    /// Repeats entire envelope, from the beginning.
    Repeat,
    /// Allows "sustaining" the envelope while it's not released. The sustain happens
    /// by looping between loop points, which are knot indices.
    LoopPoints{ loop_in:u8, loop_out:u8 },
    /// Similar to LoopPoints, but repeats entire envelope as an "echo" after its release,
    /// multiplying the amplitude by "decay" on each cycle.
    Echo{ loop_in:u8, loop_out:u8, decay:Normal },
}