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

UI for config: global 'note 0' reference #23

Open
j5v opened this issue Jun 18, 2023 · 0 comments
Open

UI for config: global 'note 0' reference #23

j5v opened this issue Jun 18, 2023 · 0 comments
Labels
enhancement New feature or request should-do

Comments

@j5v
Copy link
Owner

j5v commented Jun 18, 2023

As a user, I want to specify the Global reference frequency for note 0 of all tunings. After specifying the reference frequency, I want note values to reflect this change, and to be able to re-edit the Global reference frequency in the same way I specified it.

This is a 'should-do' issue, because performance scenarios are often not based on 440Hz, and analysis should reflect the performance scenario.

Approach

An explicit UI for configuration of the base frequency, e.g. toolbar icon -> dialog.
Currently, we define this as an offset from 440Hz (A)

const config = {
  ...
  noteRefHz: 440 * (Math.pow(2, -9/12)), // C, around 261 Hz // TODO: split to be configurable
  ...
}

It might be helpful to provide a friendly interface to specify a reference frequency (Hz) and offsets in other units.

The UI currently shows the global reference frequency config.noteRefHz at the appropriate point above the tuning rows. So many (nearly all) UI elements depend on config.noteRefHz, so a call to renderApp() will refresh these*.

*An event-subscription pattern would also work, but that would be significant effort and change, hard to maintain, and likely less efficient in practice.

Background

In production workflows, a tuning configuration doesn't specify the base frequency of a tuning (Hz of note 0). Rather that's the responsibility of the virtual instrument, tuning controller, or controller that uses a .kbm (keyboard map file, where reference frequency is embedded).

However, a reference frequency is useful:

  • if XeTune develops audio previews.
  • if absolute frequency is important to the analysis experience, e.g. to quantify beat frequency for two playing notes.

The caveat is that XeTune is not responsible for transmitting the reference frequency, because conventional workflows assign this responsibility elsewhere, and the tuning file (in the case of .scl) cannot ordinarily carry this data. Users need to synchronize the two independent sources of reference frequency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request should-do
Projects
None yet
Development

No branches or pull requests

1 participant