Skip to content

feat: implement audio frequency bands and attenuation variables - #6

Open
VQToan wants to merge 1 commit into
devlup-labs:mainfrom
VQToan:feature/audio-variables
Open

feat: implement audio frequency bands and attenuation variables#6
VQToan wants to merge 1 commit into
devlup-labs:mainfrom
VQToan:feature/audio-variables

Conversation

@VQToan

@VQToan VQToan commented May 14, 2026

Copy link
Copy Markdown

Fixes #2

Description

Added support for extracting distinct frequency bands (Bass, Mid, Treble) and computing their attenuated versions (EMA smoothing) from the audio FFT data. This allows visualizations to react specifically to different frequency ranges.

Changes

  • Updated FFTProcessor.h and FFTProcessor.cpp to calculate raw energy values for Bass (20-250Hz), Mid (250-2000Hz), and Treble (2000-20000Hz) after computing the FFT magnitudes.
  • Implemented an Exponential Moving Average (EMA) smoothing function in calculateBands() to generate bassAtt, midAtt, and trebleAtt.
  • Updated Audio.h and Audio.cpp to expose these new values and modified the initialization to pass the sample rate down to the FFTProcessor.

This PR was created with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Audio Variables

1 participant