midix_synth 0.0.4

SoundFont compatible MIDI synthesizer for midix
Documentation
mod modulation;
pub(super) use modulation::*;

mod volume;
pub(super) use volume::*;

mod common;
//use common::*;

#[derive(Ord, PartialEq, PartialOrd, Eq, Clone, Copy, Debug)]
pub enum EnvelopeStage {
    Delay,
    Attack,
    Hold,
    Decay,
    Release,
}

impl EnvelopeStage {
    pub fn next(self) -> EnvelopeStage {
        use EnvelopeStage::*;
        match self {
            Delay => Attack,
            Attack => Hold,
            Hold => Decay,
            Decay => Release,
            Release => Release,
        }
    }
}