Navigation
API > API/Plugins > API/Plugins/AudioWidgets > API/Plugins/AudioWidgets/FAudioSpectrogramViewport
Stores one frame of spectrogram data. Also generates the visual representation of this data as colored pixels, according to the given render params.
| Name | FHistoryFrameData |
| Type | class |
| Header File | /Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/AudioSpectrogramViewport.h |
| Include Path | #include "AudioSpectrogramViewport.h" |
Syntax
class FHistoryFrameData : public FNoncopyable
Inheritance Hierarchy
- FNoncopyable → FAudioSpectrogramViewport::FHistoryFrameData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FHistoryFrameData
(
FHistoryFrameData&& Other |
Include a move constructor due to being non-copyable. | AudioSpectrogramViewport.h | |
FHistoryFrameData
(
const FAudioSpectrogramFrameData& SpectrogramFrameData, |
Construct a history row to store the given spectrum data. Optionally also specify the pixel bucket mode to pre-allocate space for mips if required. | AudioSpectrogramViewport.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSpectrumDataHasLogSpacedFreqencies | const bool | AudioSpectrogramViewport.h | ||
| CachedPixels | TArray< FColor > | The most recently generated pixel data. | AudioSpectrogramViewport.h | |
| NumSoundLevels | const int32 | Immutable data describing this spectrogram frame: | AudioSpectrogramViewport.h | |
| SoundLevelsMipChain | TArray< float > | The first NumSoundLevels values are the full resolution spectrogram data for this frame, and considered immutable. Following that may also be lower resolution mips generated for the given current pixel bucket mode. | AudioSpectrogramViewport.h | |
| SoundLevelsMipChainPixelBucketMode | EAudioSpectrogramFrequencyAxisPixelBucketMode | AudioSpectrogramViewport.h | ||
| SpectrumDataMaxFrequency | const float | AudioSpectrogramViewport.h | ||
| SpectrumDataMinFrequency | const float | AudioSpectrogramViewport.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConstArrayView< FColor > GetCachedPixels() |
Read the last generated pixel data. | AudioSpectrogramViewport.h | |
void UpdateCachedPixels
(
const FAudioSpectrogramViewportRenderParams& InRenderParams |
Generate pixel data for this frame according to the given render params. | AudioSpectrogramViewport.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ArrayMagnitudeToDecibel
(
TConstArrayView< float > InValues, |
Convert magnitude values to decibel values. db = 20 * log10(val) | AudioSpectrogramViewport.h | |
static void ArrayPowerToDecibel
(
TConstArrayView< float > InValues, |
Convert power values to decibel values. db = 10 * log10(val) | AudioSpectrogramViewport.h | |
static float GetInterpolatedSoundLevel
(
const TConstArrayView< float > MipData, |
Helper function for sampling from the given mip data at the given normalized read position. Data is linearly interpolated. | AudioSpectrogramViewport.h |