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

Auto-Detection of Sample frequences #49

Open
RobDavenport opened this issue Sep 5, 2022 · 2 comments
Open

Auto-Detection of Sample frequences #49

RobDavenport opened this issue Sep 5, 2022 · 2 comments
Labels
Audio Related to the Audio or Sound Engine crates. Editor Related to the Editor crate. enhancement New feature or request

Comments

@RobDavenport
Copy link
Member

When loading a sample in the editor, users have to either select None for the frequency, or know the frequency of the sample file itself. There are algorithms which can be used to give a best guess of the frequency.

This should be exposed as a button that the user can click, so if for some reason the algorithm results in a wrong value, they can use another method to get it.

@RobDavenport RobDavenport added enhancement New feature or request Audio Related to the Audio or Sound Engine crates. Editor Related to the Editor crate. labels Sep 5, 2022
@VegaDeftwing
Copy link

This will need to be aware of the .wav (or whatever format) sample rate clearly. I would caution against using a basic FFT and looking for the first peak, as some instruments will have an octave below what is supposed to be the fundamental. At the most basic and avoiding DSP a UI with draggable bars to let the user select one period of a wave would work.

@RobDavenport
Copy link
Member Author

We are already able to gather information about the .wav's sample rate (and playback correctly related to systems sample rate). I'm also quite familiar with the fact that frequency detection is still a difficult problem. Even if we provide a method which is close enough, the user can still manually enter the correct frequency as an escape hatch should the algorithm be wrong (such as in the instrument you mentioned).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Audio Related to the Audio or Sound Engine crates. Editor Related to the Editor crate. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants