xenharmonic-devs / scale-workshop

Design and visualize microtonal scales and play them in your web browser. Export your scales for use with VST instruments. Convert Scala files to various tuning formats.
MIT License
82 stars 12 forks source link

Historical Temperament Menu Option for Meantone etc. #461

Closed 000masa000 closed 9 months ago

000masa000 commented 11 months ago

Meantone Temperament: Generator is 3/2 less a fraction of a comma, which is generally one of Syntonic (quintal) : 81/80 Pythagorean (tertial): 531441/524288 Schisma (tertial - quintal): 32805/32768 but could also be a custom value, possibly a difference of two commas, i.e. Septimal Comma: 64/63 septimal + tertial: 59049/57344 .....

Result generally is 12 note scale, although "extended" meantone with split keys is possible

Default from C is 3 downward fifths (to Eb) and 8 upward (to G#).

frostburn commented 11 months ago

This sounds more like a preset than a genuine parametrizized scale generator. Could you describe the algorithm how historical temperaments are built up so that we can generalize? Once the general modal has been implemented it can have some preset buttons for easy access to classic scales.

000masa000 commented 11 months ago

The general model is based on tuning 3/2 and 4/3, 5/4 and 5/3 in the middle register, and adjusting the intervals so they "beat similarly". The resulting scales are described as narrowing the fifths by fractions of a comma, which is almost always Syntonic or Pythagorean. However, since the original tunings were achieved by ear, establishing beating rates is more likely to be a criterion than exact logarithmic equality of deviation.

I could imagine for a musician familiar with this approach that it would be useful to specify the narrowing of the 3/2's in fractions of a comma. Optimising the tuning could be calculated by comparing beating rates between partial unisons of near 3/2, 4/3, 5/4 and 5/3 relationships, and optimisation choices could be made. For example, in 1/5 Syntonic Comma meantone, the fifths are narrowed by 1/5 Syntonic Comma, so four fifths approximates 5/4 1/5 comma too big. Then the triad 4:5:6 could be tuned so the beating rates of the 5/4, 6/5 and 3/2 are correlated. For example with a temperament of 1/4.598701962 syntonic comma, the triads 4:5:6 have a beating ratio of 1:1 between the perfect fifth and major third....

frostburn commented 11 months ago

Tuning stuff by ear doesn't sound like something that lends itself to a well-defined scale generator. Do you have a mathematical definition for "beating similarly". The last time I looked into it there were multiple valid ways to define it from plain frequency differences to effective envelopes which unfortunately depend on the timbre.

It's already possible to specify 1/5 syntonic comma meantone using interval addition namely using 3/2 - 1\5<81/80> as the generator. The most I can do based on the information you've given me is to add another radio-button tab to the Rank-2 modal with couple of buttons that set the modal's parameters to historical ones (well as close as you can get while remaining rank 2. I think well-temperaments are out of the question.)

The main impression I'm getting here is that there's a lack of user documentation and tutorials. The syntax for "generators adjusted by a comma" isn't obvious but it's there. Fine-tuning rank-2 scales by eyeballing is already possible using the "Circle" radio-button tab if you know how to display the ratios you care about as anchor points.

I'm self-taught so I have zero idea what background knowledgy music students already posses. @000masa000 , would you be interested in making some tutorials? I can help you figure things out and you can share the information in an understandable format.

On the other hand, if there is something here, I think you're the one who need to make a pull request about generating these scales. In that case, I'd be happy to assist as well.

000masa000 commented 11 months ago

Hi, in terms of the beating, here is what I did to figure it out. If you apply a generator, say 3/2, divided by (comma^1/n), where comma is a specified ratio, i.e. 81/80, and n could be any positive real number (primarily > 1.0) - for example n = 4 would be classical quarter-comma, and then you generate the notes (say 12, or 53, or whatever), then specify which of the "fifths" in the series would represent any of partials 5°, 7°, 11°, 9°, 13° (ratios 5/4, 7/4, etc.) then by calculating the frequencies of each of those notes in the scale, it is possible to determine the beating rates in a chord. Then, what is interesting is to see if the ratio between beating rates reaches near integer values for all or some of the target identities as n varies. For example, as n varies between 4 (1/4 comma) and 5 (1/5 comma), at approximately 4.6 there is a point where all the notes in a 4:5:6 chord generate beatings in a very simple proportion, so the triad is especially harmonious (as are its inversions). The 7/4 is nearly in an integer proportion as well. I did this more or less by trial and error in a spreadsheet but I imagine the calculation would not be so difficult to generalise.

Re: videos, happy to get into this with you, let's discuss!

In terms of the shorthand 3/2 - 1\5<81/80> I am a little confused about the minus (which is, mathematically speaking, division, right?)

000masa000 commented 11 months ago

can one write 1\4.67676<81/80> ?

frostburn commented 11 months ago

In terms of the shorthand 3/2 - 1\5<81/80> I am a little confused about the minus (which is, mathematically speaking, division, right?)

Correct. It is division in frequency/ratio space. Most of the data types of Scale Workshop live in pitch space so addition and subtraction were the natural choice for this operation.

frostburn commented 11 months ago

can one write 1\4.67676<81/80> ?

There you run into limitations of the syntax. You have to write the offset in cents so something akin to 3/2 - 1.23456789 or straight up cents like 700.12345.

frostburn commented 11 months ago

We had a good call about this and decided to make a new modal dialog for creating historical and (historically inspired) scales. I have to think about this a bit now, but the way we're moving forward is that I'll implement the new modal and @000masa000 will review.

frostburn commented 11 months ago

Starting work on this now. Rank-2 temperaments like 1/4-comma Meantone are easy to implement and straightforward to customize. I'm thinking about adding all generators listed here as presets: https://en.wikipedia.org/wiki/Meantone_temperament

What about Werckmeister? The constructions are rather specific so I would add these as fixed scales (without customization): https://en.wikipedia.org/wiki/Werckmeister_temperament

Is there anything else historical that should be accessible at the click of a button?

Any thoughts on the scales marked traditional in presets.json? Are they even valid? Should there be more? Should they be moved under this new modal dialog?

frostburn commented 11 months ago

In terms of intuitive scale construction I'm thinking about adding a field for a target interval like 7/4 and doing a limited-range-search for a power of 3/2 closest to the target interval modulo octaves. In the case of 7/4 it would find the exponent -2 implying that the comma 64/63 is tempered out resulting in the generator 1\2<16/7>. (The default period of 2/1 is implied and not customizable.)

000masa000 commented 11 months ago

I think the search should yield results within a wider range. For example, for 7/4, it should yield both 3^-2 (resulting in a substantially wider 3/2) and 3^+10 (resulting in 3/2's similar to 1/4 comma Meantone, and quite concordant). 3^-14 is very close to 7/4, and would have nearly pure fifths, also worth considering! As a rule of thumb, the temperament of the 3/2 should ideally remain within 1/3 Syntonic Comma to sound identifiable and concordant, unless someone is especially interested in a distorted 3/2. For example, to find 11/8 or 13/8 in a chain of 3/2's, it is useful to consider the nearest option that produces a good fifth, as well as other more extreme variations (like tempering 3^-1 to get 11/8, which means the "fifth" would be 16/11. A better option might be to temper 3^-6, but even better to go 3^-18 or 3^23 .... I would perhaps search +/- 26 powers of 3 (the 53- 3/2's tuning) and offer the best options in terms of the damage done to the 3/2.

000masa000 commented 11 months ago

Hello, a small request in the preset menu for older eyes :) The fractional glyphs are all different sizes and rather small, while the one written with normal numbers (2/7-comma) is easy and nice to read. Could all the fractions be input in this way? Many thanks!

000masa000 commented 11 months ago

Enjoying the now working Well Temperament generator: noting that when I change the comma the number of notes resets to 12, even if I had already chosen 31 and 15 down, would be nicer if this persists. Also, after I made a tuning and changed the name, when I went back to keep editing in the Historical Temperaments menu, the options had reset to default instead of keeping my custom settings; yesterday when I was working it seemed the settings persisted, but I did not try a name change. Would also be nicer to be able to go back to the settings and continue where one left off...

frostburn commented 11 months ago

The number of notes should only reset when changing the preset. I'll look into it.

Unfortunately it's random if Vue will persist a closed modal. We will move to Pinia for version 3 and be more careful about this ( see #367).

000masa000 commented 11 months ago

Is there any way for the fractions between notes to retain their position even when changing the down value? that would be cool, so the commas stay around C as entered even if one makes more notes or changes the position in the fifths....

frostburn commented 11 months ago

Is there any way for the fractions between notes to retain their position even when changing the down value? that would be cool, so the commas stay around C as entered even if one makes more notes or changes the position in the fifths....

I guess I could associate them with the spine gaps to keep them in their place. This would allow the user to edit the hidden enharmonic gap too... I'll make it visible but grayed out then.