Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Normalize sample" feature part 2: Normalization and UI #1089

Closed
wants to merge 22 commits into from

Conversation

Jengamon
Copy link
Contributor

@Jengamon Jengamon commented Aug 12, 2024

Resolves #971
Part of #973

  • Add function to zone.h that uses these to sets the volume appropriately
    • Create field to store normalization factor (and make it streamable)
    • add pitchOffset and amplitude fields (and make them streamable)
    • Create function that uses said field to normalize a given sample
  • Add UI gesture to trigger the zone functionality
  • Add UI gesture to clear normalization factor
  • Add UI to display the normalization factor (when nonzero)
  • Factor in normalization factor (and per-sample pitch/amplitude) when reading/using sample

My back of the envelope calculations have generally arrived at $1/M$ for being the factor where $M$ is
the metric that is being normalized (either peak or RMS is supported in this PR) (Open question: Do we want to leave it open to future metrics being added, for example, K-weighted RMS or even LUFS?)

To convert to dB, we store 10.0f32 * (1/M).log10() as the normalization factor.

This field is not *directly* user-editable, and is where
normalization stores the dB factor to multiply the sample by to get
normalized audio
@baconpaul
Copy link
Contributor

oooh some real conflicts here. Let me see if i can get them sorted

@baconpaul
Copy link
Contributor

Ugh so many conflicts.

@baconpaul
Copy link
Contributor

Oh I de-conflicted and merged this in d760e90 but just forgot to close this PR.

@baconpaul baconpaul closed this Sep 20, 2024
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.

"Normalize sample" feature
2 participants