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

Alternate tuning systems #2

Open
daveyarwood opened this issue Oct 27, 2015 · 2 comments
Open

Alternate tuning systems #2

daveyarwood opened this issue Oct 27, 2015 · 2 comments

Comments

@daveyarwood
Copy link
Owner

For equal-temperament tuning with a reference pitch other than A440, we can just bind *reference-pitch* to the frequency of A4. We can provide a tune! function that will use alter-var-root to change the *reference-pitch*, and a with-reference-pitch function/macro that executes the body, binding *reference-pitch* to a particular value. (EDIT 10/28: done)

Will have to think a little more about how to handle other kinds of tunings (just, well, Pythagorean, etc.) It would be nice to have them built-in, so you can do something like (with-tuning :pythagorean (note->hz "A4")), but currently all the formulas are for equal-temperament tuning. Maybe we could add a *tuning-system* var that the *->hz functions will consider, and add logic to the functions so that they use the right formula for the current tuning.

@daveyarwood daveyarwood changed the title Alternate tunings Alternate tuning systems Oct 29, 2015
@daveyarwood
Copy link
Owner Author

daveyarwood commented Jan 9, 2016

with-tuning-system, *tuning-system* etc. are all set up so that we can add other tunings with relative ease. For each tuning, we just need to add its formula to the case statements in hz->midi and midi->hz.

TODO:

  • Werckmeister III
  • just (a.k.a. harmonic tuning, Helmholtz's scale)
  • La Monte Young's tuning from The Well-Tuned Piano
  • mean-tone (seems like there are a lot of variations on this -- quarter-comma meantone, etc.)
  • Pythagorean
  • schismatic
  • implement reverse function for ratio-based tunings

@daveyarwood
Copy link
Owner Author

Hmm... so, at least for well-tempered tunings (and possibly for others), the tuning happens relative to what key you're in. So when using these tuning systems, the key will need to be set, and an error should be thrown if there is not at least a *tonic* set in the environment (we can assume major is the type of scale, when not specified otherwise).

Will first add the mechanism for setting the key, then can proceed with implementing the tuning systems that need to know what key you're in.

EDIT: done

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

No branches or pull requests

1 participant