FOnsetStrengthAnalyzer

[FOnsetStrengthAnalyzer](API\Plugins\AudioSynesthesiaCore\FOnsetStrengthAnalyzer)

Windows
MacOS
Linux

References

Module

AudioSynesthesiaCore

Header

/Engine/Plugins/Runtime/AudioSynesthesia/Source/AudioSynesthesiaCore/Public/OnsetAnalyzer.h

Include

#include "OnsetAnalyzer.h"

Syntax

class FOnsetStrengthAnalyzer

Remarks

FOnsetStrengthAnalyzer

FOnsetStrengthAnalyzer calculates the onset strength from audio.

Onset strength is calculated as the half wave rectificed difference between two spectral frames. This onset strength onset analyzer uses the following approach.

[audio]->[fft]->[mel spectrum]->[diff]->[half wave rectify]->[mean]->[onset strength] | | >-[lag]--|

Constructors

Name Description

Public function

FOnsetStrengthAnalyzer

(
    const FOnsetStrengthSettings& InSe...,
    float InSampleRate
)

Functions

Name Description

Public function

void

 

CalculateOnsetStrengths

(
    TArrayView< const float > InSamples,
    TArray< float >& OutOnsetStrengths
)

Calculates onset strengths from audio and fills OutOnsetStrengths with generated onset strengths

Public function

void

 

FlushAudio

(
    TArray< float >& OutEnvelopeStreng...
)

Call when done processing audio for an audio analyzer

Public function Static

float

 

GetTimestampForIndex

(
    const FOnsetStrengthSettings& InSe...,
    float InSampleRate,
    int32 InIndex
)

Converts an onset strength index into a timestamp.

Public function

void

 

Reset()

Call to reset internal counters and lag spectra.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss