Sign in

    1zhouhaoran1/moonmel/src/features/onset does not have a README file

    OnsetConfig

    pub(all) struct OnsetConfig {
    mode : OnsetMethod
    normalize : Bool
    } derive(Eq,
    Debug
    )

    Configuration for onset strength envelope extraction.

    OnsetConfig::default

    fn OnsetConfig::default() -> OnsetConfig

    Default configuration: Spectral flux with normalization.

    OnsetConfig::equal

    fn OnsetConfig::equal(OnsetConfig, OnsetConfig) -> Bool

    OnsetConfig::not_equal

    fn OnsetConfig::not_equal(x : OnsetConfig, y : OnsetConfig) -> Bool

    OnsetMethod

    pub(all) enum OnsetMethod {
    SpectralFlux
    SuperFlux(Int)
    Energy
    } derive(Eq,
    Debug
    )

    Onset strength computation method.

    OnsetMethod::equal

    fn OnsetMethod::equal(OnsetMethod, OnsetMethod) -> Bool

    OnsetMethod::not_equal

    fn OnsetMethod::not_equal(x : OnsetMethod, y : OnsetMethod) -> Bool

    onset_detect_audio

    Detect onset event frame indices directly from AudioBuffer.

    onset_strength

    Compute onset strength envelope from spectrogram.

    onset_strength_audio

    Extract onset strength envelope directly from AudioBuffer.

    peak_pick

    fn peak_pick(envelope : Array[Double], pre_max? : Int, post_max? : Int, pre_avg? : Int, post_avg? : Int, delta? : Double, wait? : Int) -> Array[Int]

    Adaptive local threshold peak picking for onset detection (librosa.util.peak_pick aligned).

    spectral_flux

    Standard spectral flux: half-wave rectified difference across successive frames.

    super_flux

    fn super_flux(spec :
    FeatureMatrix
    , filter_size : Int) -> Array[Double]

    SuperFlux: spectral difference relative to maximum-filtered previous frame (Boeck & Widmer 2013). Filter sizes <= 1 disable frequency spreading and use ordinary spectral flux.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io