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

Generate historical temperaments and target-tempered generator-stacks #466

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

frostburn
Copy link
Member

Move the other Rank-2 temperament modal further down the list.

ref #461

@frostburn
Copy link
Member Author

@000masa000 please review.

@frostburn frostburn linked an issue Nov 7, 2023 that may be closed by this pull request
@000masa000
Copy link
Contributor

Hi I am looking at the historical temperaments on https://scaleworkshop.lumipakkanen.com/
Instead of 1/11 comma meantone (rare) you might instead do 1/8 Pythagorean comma, which is used by musicians. Generator 3/2-1\8<531441/524288> 1/6 comma the generator should be 1/6 Pythagorean comma, so 3/2-1\6<531441/524288>..... the 81/80 is used for 1/5 comma 1/4 comma 2/7 comma and 1/3 comma,

@000masa000
Copy link
Contributor

Number of fourths (down) I would set for 2 flats for Meantone (so a default value of 3, getting us to C-F-Bb-Eb) instead of 4 .
For Pythagorean tuning I would go from Db-F#, so a default value of 5 so the ratios from C are simplest for each chromatic

@000masa000
Copy link
Contributor

in the "target" tab a few typos: "Stacking interval" ("c" missing) "Search range" ("r" missing)
The feature is really cool! Needs a moment to figure out that the list tells you how much tempering there is per fifth based on a target, but once I understood the results are very powerful

@frostburn
Copy link
Member Author

Fixed found issues. Redeployed to https://scaleworkshop.lumipakkanen.com/

@000masa000
Copy link
Contributor

000masa000 commented Nov 8, 2023

in the target mode of historical change default to 1 down, then C-Bb and F-Eb are 7/4s and the scale has a 7/4 and a 7/6 (nice)! looking good otherwise on a first glance...
in the presets 1/2 comma Meantone is not necessary.... the 1/2 comma tuning called "Henricus Grammateus" is actually an early modification of Pythagorean tuning, in which two of the fifths are each 1/2 Pythagorean comma smaller. If this is possible I can identify where the commas fall: a chain from F to B is tuned pure (as 3/2) , B-F# is narrowed by 1\2<531441/524288> and all the other fifths from F# to A# are again 3/2s, but each are 1/2 comma lower than in a Pythagorean chain. The result is cool.

2187/2048-1\2<531441/524288>
9/8
19683/16384-1\2<531441/524288>
81/64
4/3
729/512-1\2<531441/524288>
3/2
6561/4096-1\2<531441/524288>
27/16
59049/32768-1\2<531441/524288>
243/128
2/1

@frostburn
Copy link
Member Author

in the target mode of historical change default to 1 down, then C-Bb and F-Eb are 7/4s and the scale has a 7/4 and a 7/6 (nice)! looking good otherwise on a first glance

Updated the code but will redeploy only tomorrow. I will also prompt XA for comments if there are no more code changes by then.

@000masa000
Copy link
Contributor

can commas be added using the syntax + and -? in that case I can make all the main Well Temperaments as presets, even though algorithmic generation is tricky but possible: organise the chain of 16 central 3/2's with 6 down (from C, so including all 5 flats) and 10 up, the pitch range should run from Gb-Db-Ab-Eb-Bb-F-C-G-D-A-E-B-F#-C#-G#-D#-A# (as default) as a list of monzos with increasing powers of 3. Then a subset of 12 notes (11 ratios) will each be modified according to the following rule:

the total modification by the end of the chain (12th ratio, determined automatically) should be equal to one pythagorean comma 531441/524288. Along the way modifications are specified as fractions of either this comma or of a syntonic comma, or (in some cases) a sum of two commas (Pythagorean, Schisma). In the background, keep track of fractions of a schisma "left over".

If this sounds too confusing let me show a worst case example, the French Well-Temperament by Rameau (1726) tunes the following chain in 1/4 comma meantone : Bb through B, it leaves B-F#-C# as 3/2s, reduced C#-G# by 1/6 Pythagorean Comma, and then splits the difference. Thus, in the chain Bb-D# (2 down) we generate the following 12 ratios using the 1/4 syntonic method ---

here it would be nicer (for my way of understanding the shorthand) for the scale display to express (optionally) the Pythagorean ratios and their modification rather than the Dirac bra-ket prime- or generator-count notation.... I am slightly confused by it, actually : can you clarify, see below, generated as 1/4 comma 2 down: the last number I surmise is the fraction of 81/80 used to temper the notes, which are Pythagorean, thus powers of 2 and 3: why are the first two numbers of the 3/2 0 and 0 instead of some powers of 2 and 3, i.e. -1 and 1 for example. Sorry for the question, but I don't fully understand the implementation....

1/4 comma with down 2:

[-4, 0, 7/4>
[-1, 0, 1/2> this note is D
[-5, 0, 9/4>
[-2, 0, 1>
[1, 0, -1/4> this note is F
[-3, 0, 3/2>
[0, 0, 1/4> this note is G 3/2-1\4<81/80> (should not the prime count be "1")?
[-4, 0, 2>
[-1, 0, 3/4> this note is A
[2, 0, -1/2>
[-2, 0, 5/4>
2/1 this note is C

ANYWAY I would do it from fractions like this:

start with Pythagorean 2 down:

2187/2048 - 5\4<81/80> ! (same deviation as B)
9/8 - 2\4<81/80>
19683/16384
81/64 - 4\4<81/80> !( i.e. 5/4)
4/3 + 1\4<81/80>
729/512 - 5\4<81/80> ! (same deviation as B)
3/2 - 1\4<81/80>
6561/4096 - 5\4<81/80> - 1\6<531441/524288> ! additional 1/6 Pythagorean comma
27/16 - 3\4<81/80>
16/9 + 2\4<81{80>
243/128 - 5\4<81/80> !end of 1/4 chain
2/1

at this stage there is one note to tune, D#, producing two fifths: G#-D# and D#-Bb. We have temepered by a total of 7/4 Syntonic + 1/6 Pythagorean. Measured in terms of the Pythagorean Comma, which is what we really want to temper out, we can rewrite this as 7/4(Pythagorean - Schisma) + 1/6(Pythagorean) = 23/12 Pythagorean - 7/4 Schisma. So the amount of comma we need to recouperate is 11/12 Pythagorean - 7/4 Schisma. If we divide the two remaining fifths equally, the amount of tempering applied to D# should be the same value as G# (producing a pure fifth) PLUS 1/2 of the remaining amount, (11/24 of a Pythagorean less 7/8 schisma) Calculating this by hand is mind bending, but the machine can do it easily with a button (divide remaining difference from 1 Pythagorean comma equally amongst the remaining fifths). In fact, this could be a cool way of expressing 12edo: it begins as a user specified Pythagorean tuning, modified by 1\12 Pythagorean. Then, as commas are modified manually, there could be an option to divide remaining commas in the chain equally. So if you set one fifth pure, the reamining ones can be adjusted accordingly. THis could of course be done in either direction (up the fifths or down the fourths)

@000masa000
Copy link
Contributor

one final thought: when pressing a preset button, it would be nice in the front end to see the selection has been made active (color change or radio button) thanks!

@frostburn
Copy link
Member Author

one final thought: when pressing a preset button, it would be nice in the front end to see the selection has been made active (color change or radio button) thanks!

I was actually thinking of changing it to a <select> element. Takes less space that way which is required anyway if we add any more presets here.

@frostburn
Copy link
Member Author

[0, 0, 1/4> this note is G 3/2-1\4<81/80> (should not the prime count be "1")?

The monzo of 81/80 is [-4, 4, -1> if you scale that by -1\4 you get [1, -1, 1/4>.
Now add that to 3/2 i.e. [-1, 1, 0> and you get your G. I hope this clarifies why the monzos are like that.

@frostburn
Copy link
Member Author

That well-tempering explanation makes my head spin. Could you write out the algorithm in code instead of English? Does that algorithm generalize to generators other than 3/2? If not, I would just add a fixed copy of every notable historical scale that doesn't have a rank-2 structure under Load preset scale.

@000masa000
Copy link
Contributor

thanks for the clear monzo explanation.

@000masa000
Copy link
Contributor

Well Temperament maybe best I hack together some presets and as we work on it the procedure / algorithm will clarify itself. Explaining is a bit complicated. Basically a chain of 12 fifths needs to have a Pythagorean comma taken away, equally or unequally, across the set of pitches. The usual method involves fractions of a Pythagorean or Syntonic Comma. If using fractions of a Syntonic, then one needs to keep track of the difference Pythagorean - Syntonic = Schisma. Each of these can be expressed as a monzo so it is not hard to notate the tempering. What might be useful is, once the desired commas are positioned, to be able to divide the remaining portion of the tempering across the remaining fifths, since this is kind of the way it was done historically.

@000masa000
Copy link
Contributor

for example: temper 8 fifths by 1/4 Syntonic, have several pure fifths, one tempered by 1/6 Pythagorean comma, then figure out the remainder and divide equally.

@frostburn
Copy link
Member Author

If there is an algorithm for well-tempering, it should go to core first.
If there isn't, it should go to presets,
Either way I think well-tempering is out of scope for this PR. It can go in this modal, but later.

@frostburn
Copy link
Member Author

Migth need to tweak the beating equalizer a bit so that it focuses on the multigen when the generator itself is discordant. That way you could create equally beating scales with neutral thirds for example.
Also I'd like to at least see the MOS sizes somewhere even if we keep things simpler than the proper Rank-2 modal.

@frostburn frostburn force-pushed the generate-historical branch 2 times, most recently from 0046452 to 96c3912 Compare November 9, 2023 09:29
@frostburn
Copy link
Member Author

Tweaked the beating equalizer to be aware of multigenerators and displayed MOS sizes.
(For testing multigens remember that e.g. the neutral third is spelled 1\2<3/2> in our syntax.)
Latest version deployed at: https://scaleworkshop.lumipakkanen.com/

@frostburn
Copy link
Member Author

@000masa000 Replaced the preset names with ASCII instead of fancy unicode vulgar fractions. Deployed the latest version to the beta server. Would you consider this a good first version of the historical modal dialog? We can always fine-tune things, implement non-western presets and add more radio-tabs in future pull requests.

@000masa000
Copy link
Contributor

I would remove 1/2 comma since it isn't particularly useful nor historically important. I am happy to suggest some more presets, one might be the tuning Helmholtz used (tempering the 3/2s so that -8 fifths = 5/4) with 24 pitches. I need to check how many fifths down his organ used. It would be nice to have a well-temperament section, but maybe I will try to explain it is a clearer way and we can see how it might work.

@frostburn
Copy link
Member Author

Removed 1/2 from rank-2 historicals. Added Helmholtz aka Schismatic with down of 11.
Added a radio tab for Well Temperaments. Added the ones you provided images for as presets.
In my implementation the circle doesn't always close (that happens only if one whole pythagorean comma is being distributed) but I try to provide information about the enharmonics to compensate.
Deployed to the beta server for testing.

@frostburn
Copy link
Member Author

I just noticed that there's some 🐵 business with the name when changing radio tabs. Will fix later...

@frostburn
Copy link
Member Author

I have made two rational well temperaments, which would like rationalisations-by-hand of vallotti and a 1/3 comma kirnberger variant.... here they are as potential presets, similar sound, different structure, maybe could be included if there was either a way to indicate the deviation between fifths in cents, or as ratios, or if there was an option to approximate by ratios in the menu... ? what do you think?

I feel like it complicates the process too much. All of the historical examples follow the recipe of distributing a single comma along the spine. We should stick to that for now.

There could be a power-user version in the future that supports generators other than 3/2, arbitrary periods and custom offsets per generation.

@000masa000
Copy link
Contributor

image
alternating -1/6 and -1/3, with two -1/6ths around C.... should be similar to 1/4 comma meantone extended to 31 notes..... hm

@000masa000
Copy link
Contributor

IMG_9925 11899

@frostburn
Copy link
Member Author

OK, the scale I am getting seems to produce a wrong cents value on the 30th note, for some reason it starts with 0. which it shouldn't.... and 1241 is one diesis over the octave....

Not an easy issue to debug as it's related to how the generated intervals are calculated and reduced. Needs a battery of unit tests. I'm inclined to moving this issue to the core and freezing development on this PR until we have a well-tested scale generator for well temperaments.

@000masa000
Copy link
Contributor

000masa000 commented Nov 16, 2023 via email

@frostburn
Copy link
Member Author

Please try to reply directly in GitHub. That email boilerplate is horrific.

@000masa000
Copy link
Contributor

000masa000 commented Nov 16, 2023

I seem to have found the bug. If you choose more than 12 fifths, and set down to 0, then B# is higher than C by a Pythagorean comma. If you set C G to -2 syntonics, B# should be less than C, but instead it generates the scale degree 0 with monzo <0]. Probably needs to wrap around somehow....

@frostburn
Copy link
Member Author

Hopefully fixed the bug with your scale. (I made a 19 note scale while testing.)
Protip: You can specify generator offsets in cents by entering 1.0 as the comma for well tempering. The offset syntax still needs to be fractional so 1/10 instead of 0.1. This is just a hack. I'll make a separate issue for the power-user version.

@frostburn
Copy link
Member Author

Fixed the size reseting issue. Associated the comma fractions with the spine.

@000masa000
Copy link
Contributor

Would it be possible in the menu for designing the scale to have a reset to 0 button for the 3/2 chain deviations, and a field for the scale name?

@000masa000
Copy link
Contributor

suggestion for triple flats, to use the glyph ♭ three times, because the double-flat and single flat combo looks awkward. In fact I prefer ♭♭♭ , ♭♭, ♭ and ♯, ♯♯, ♯♯♯ rather than the cryptic and confusing "double sharp" sign that no one can really read :)

@frostburn
Copy link
Member Author

Would it be possible in the menu for designing the scale to have a reset to 0 button for the 3/2 chain deviations, and a field for the scale name?

Yes to the first one.

No to the second one. None of the other generation models have this kind of clutter and you can easily edit the name after you're done with the well tempering phase.

@frostburn
Copy link
Member Author

suggestion for triple flats, to use the glyph ♭ three times, because the double-flat and single flat combo looks awkward. In fact I prefer ♭♭♭ , ♭♭, ♭ and ♯, ♯♯, ♯♯♯ rather than the cryptic and confusing "double sharp" sign that no one can really read :)

I'm of the opposite preference. I'll turn this into a user preference with options to use doubles, singles or even ASCII.

@frostburn
Copy link
Member Author

Fixed issues I agree with. Redeployed to https://scaleworkshop.lumipakkanen.com/

@000masa000
Copy link
Contributor

000masa000 commented Nov 18, 2023

Working with the well temperament generator. If I mistype comma to an invalid value by mistake and leave the dialogue, when I return the entry field for comma (which has become an invalid /red value) disappears.... couldn't the comma be any value, positive or negative? Thanks for the accidentals option it is really nice to have the extended chain with various display alternatives!

@000masa000
Copy link
Contributor

A thought about the reset deviations button, maybe (since it can be at the end of a long scroll list with hidden deviations), it would be nice to have up top; is there some unobtrusive way to show if there ARE non zero deviations in the list?

@frostburn
Copy link
Member Author

A thought about the reset deviations button, maybe (since it can be at the end of a long scroll list with hidden deviations), it would be nice to have up top; is there some unobtrusive way to show if there ARE non zero deviations in the list?

It probably should be at both ends then. I can make it disabled if everything is zero already.

@frostburn
Copy link
Member Author

Working with the well temperament generator. If I mistype comma to an invalid value by mistake and leave the dialogue, when I return the entry field for comma (which has become an invalid /red value) disappears.... couldn't the comma be any value, positive or negative? Thanks for the accidentals option it is really nice to have the extended chain with various display alternatives!

Well that's a new one! And not unique to this PR. You can do that 🪄 trick to any entry field that accepts intervals.

@000masa000
Copy link
Contributor

Hi! I am wondering if it is possible to not only have note names but an enumeration of the interval? It is useful for exploring where in a chain to set a target modification. I am experimenting with tweaking 53 3/2's towards rational targets, for example taking the "nearest 11/8" and seeing ways of hitting it nicely from the center pitch. This kind of stuff could be useful power tools, checking for fractional unequal distributions of a comma to smoothly approach multiple targets (like a move towards higher rank temperament....)

@frostburn
Copy link
Member Author

Hi! I am wondering if it is possible to not only have note names but an enumeration of the interval? It is useful for exploring where in a chain to set a target modification. I am experimenting with tweaking 53 3/2's towards rational targets, for example taking the "nearest 11/8" and seeing ways of hitting it nicely from the center pitch. This kind of stuff could be useful power tools, checking for fractional unequal distributions of a comma to smoothly approach multiple targets (like a move towards higher rank temperament....)

That's a bit too much for a simple modal. Maybe we can have power tools in SW3 that take up the whole screen and display useful widgets while creating such complex scales with multiple optimization criteria.

Could you write the specs for the power-user version in a new issue? Feel free to include e.g. hand-drawn pictures to sketch out the UI.

@frostburn
Copy link
Member Author

Ready for review again.
Deployed to https://scaleworkshop.lumipakkanen.com/ .

…d well temperaments

Make the look of accidentals attached to the "spine" of fifths customizable.

ref #461, #477
@frostburn
Copy link
Member Author

Self-reviewing: Good enough. We can iterate on the design later.

@frostburn frostburn merged commit b3b1daf into main Dec 21, 2023
1 check passed
@frostburn frostburn deleted the generate-historical branch December 21, 2023 06:22
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.

Well Temperaments Historical Temperament Menu Option for Meantone etc.
2 participants