User:Arseniiv/Timbres: Difference between revisions
→News 2021-10: a timbre for 17edo |
m →Preserving the initial A: small fixes |
||
(6 intermediate revisions by the same user not shown) | |||
Line 154: | Line 154: | ||
Partials are, in [[17edo|\17]] steps, | Partials are, in [[17edo|\17]] steps, | ||
<pre># 1 | <pre># 1 2 3 4 5 6 7 8 | ||
0, 17, 27, 34, 40, 44, 48, 51, | |||
# 9 10 11 12 13 14 15 16 | # 9 10 11 12 13 14 15 16 | ||
54, 57, 59, 61, 63, 65, 67, 68, | |||
#17 18 19 20 21 22 23 24 25 | # 17 18 19 20 21 22 23 24 25 | ||
69, 71, 72, 74, 75, 76, 77, 78, 79,</pre> | |||
where 5, 10, 15, 20, but not 25, are 1\17 higher than “the best” (as 5 is represented so-so). | where 5, 10, 15, 20, but not 25, are 1\17 higher than “the best” (as 5 is represented so-so). | ||
This tweak is an idea from XA Discord. When I originally tried the same idea but with 5, 10, 15, 20 tuned a step lower, the timbre sounded pretty disastrous by itself, disregarding any harmonic possibilities, but I didn’t think to try to salvage that. | This tweak is an idea from XA Discord. When I originally tried the same idea but with 5, 10, 15, 20 tuned a step lower, the timbre sounded pretty disastrous by itself, disregarding any harmonic possibilities, but I didn’t think to try to salvage that. | ||
== A general algorithm to make timbres like these == | |||
Now let’s make some constrants fixed and look at a solution that came to me 2022-11-13 by night after meddling with golden and silver timbres again. | |||
We’d like to construct an increasing sequence ''s'' of real numbers such that: | |||
# ''s''<sub>0</sub> = 1; | |||
# a set of its values is mapped into itself under multiplication by a given α ≥ 1; | |||
# its differences ''s''<sub>''n'' + 1</sub> − ''s''<sub>''n''</sub> are finitely many. | |||
We’ll work with those differences. Pick a finite alphabet {''A'', …} and for each letter ''L'' define its ''value'' [''L''], a positive real number so that: | |||
* [''A''] = 1; | |||
* for each letter ''L'', there is a word ''L''<sub>1</sub>⋯''L''<sub>''n''</sub> such that its total value [''L''<sub>1</sub>] + … + [''L''<sub>''n''</sub>] = α ⋅ [''L'']. | |||
So there is a way to scale each difference α times and break it into unscaled ones, and there is a way to start (''A''). We’re going to build a sequence of differences iteratively. | |||
Let’s make a context-free [[Wikipedia:L-system]] over this alphabet. Its start word will be ''A'' and each of its production rules ''L'' ⟶ ''w'' should “scale by α”—satisfy [''w''] = α [''L''] (above, we guaranteed there are such ''w'' for each letter ''L''). We also want to observe this L-system has a “left limit” in the sense that for each integer ''N'', there is an iteration of the system sharing a prefix of length ''N'' with every further iteration. Having that, we can construct a limiting word of the system as the unique word which shares prefixes of unbounded non-decreasing lengths with each iteration of the system. | |||
This limit ''ℓ'' is what we’re after. Take <math>s_n = \sum_{i=0}^n [\ell_n]</math>, that is, differences of ''s'' are the values of ℓ’s letters. By construction we see conditions (2) and (3) satisfied, and if (1) is not, we just divide all of ''s'' by ''s''<sub>0</sub>. | |||
A perhaps better way to guarantee (1) is to pick production rule(s) for ''A'' so that its successor(s) always starts with ''A'' itself. Moreover, if there’s only one production rule for each letter, and ''A''’s successor is more than ''A'' itself, then we have a limit automatically: ''A'' is a prefix of its immediate derivation, which is a larger prefix of ''its'' immediate derivation, and so on. | |||
In simple words, we constructed a way for each difference we’re allowed to use, when stretched by α, to be subdivided using just those same differences. This makes quite a regular structure. I conjecture for a deterministic L-system it’s always the case that <math>s_n = C n + \mathcal O(1)</math>. | |||
=== Generalizations === | |||
One can use different production rulesets (for example one on even iterations and another on odd iterations) given that the limit exists and they all do scale by α. One can also apply rulesets ''to'' the limit word (possibly another ω times (and more) which is probably pointless). If you find differences of ''s'' too small, you can apply another rules to the limit word picked in such a way that letters with small values disappear. One also can apply rules only in some places. The last two kinds of tweaks may invalidate conditions (1) and (2), though there ''is'' a sense to speak about partial satisfaction of (2), in a statistical sense, which can then remain. | |||
=== Examples === | |||
==== Harmonic timbre ==== | |||
Don’t add any letters, use any rule of form ''A'' ⟶ ''A''<sup>''α''</sup> where ''α'' > 1 is an integer. | |||
The limit is ''AAAAAAAAA''… and so ''s'' is 1, 2, 3, 4, … | |||
==== Golden timbres ==== | |||
The scale factor α is the golden ratio φ. | |||
Add a letter ''B'' with [''B''] = φ − 1, and the rules are ''A'' ⟶ ''AB'' and ''B'' ⟶ ''A''. (Note that φ [''A''] = φ = 1 + φ − 1 = [''AB''], and that φ [''B''] = φ<sup>2</sup> − φ = 1 = [''A''].) | |||
The limit is ''G'' ≡ ''ABAABABAABAABABAABABA''…, and so ''s'' is 1, φ, φ + 1, φ + 2, 2 φ + 1, 2 φ + 2, 3 φ + 1, 3 φ + 2, 3 φ + 3, 4 φ + 2, … | |||
If we find φ − 1 too small a difference, we can add a letter ''C'' with value [''C''] = φ, and apply to ''G'' once rules ''A'' ⟶ ''BA'', ''B'' ⟶ ''A'', and then, again once, ''A'' ⟶ ''C'', ''B'' ⟶ ''A'', and end up with ''ACCACACCACCACACCACACC''… This word doesn’t give us a set which is mapped into itself when multiplied by φ, but is close to that in a sense. | |||
One can also apply a stochastic ruleset ''A'' ⟶ (''AB'' or ''BA''), ''B'' ⟶ ''A'' to ''G'', except the first ''A'' which goes to ''AB'' to be sure the result starts with ''A''. <s>We end up with a set of timbres which is, I believe, every possible one satisfying (1)…(3) for scaling by φ.</s> | |||
We ''don’t'' end with a set of timbres which satisfy (2), but we will if we use this ruleset in a special way while generating the limit (not after). Namely, as is already typical, we replace the first ''A'' with ''AB'', then each iteration we’ll get a word which has a previous word as its prefix; and we need to pick a rule for each ''A'' in that prefix which was used beforehand. So we always apply ''A'' ⟶ ''AB'' to the first ''A'' in the word, we always apply a rule to the second ''A'' which we applied after we got a word where the second ''A'' appeared, and so on, and we only have freedom to pick which alternate rules to apply in the newly-generated suffix. That still allows for a countable set of variations of the limit word. Now, all these ''do'' satisfy (2) though it might be not as obvious as with the fully deterministic process. | |||
===== Preserving the initial A ===== | |||
We can preserve the initial A in the string and also rarefy the timbre at the last step by two neat tricks. First, make our iterated ruleset be ''Å'' ⟶ ''ÅB'', ''A'' ⟶ (''AB'' or ''BA''), ''B'' ⟶ ''A''. ''Å'' is a pun for ''A''₀ and is preserved and marks the start, but all other ''A''s that get generated are normal. Then after generation we apply ''another'' “rarefying” ruleset ''Å'' ⟶ ''ÅB'', ''A'' ⟶ ''C'', ''B'' ⟶ ''A'' just once. No matter were rules stochastic or not, this approach gets us starting with ÅB which means partials 1, φ. | |||
==== Silver timbres ==== | |||
Our α is √2 + 1. | |||
Add a letter ''B'' with value [''B''] = √2 − 1, and the rules are ''A'' ⟶ ''AAB'', ''B'' ⟶ ''A''. | |||
The limit of that is ''AABAABAAABAABAAAB''… but [''B''] ≈ 0.4 might seem to small, so… | |||
Apply to it once ''A'' ⟶ ''AC'', ''B'' ⟶ ''A'' where [''C''] = √2. ''Now'' we get a nice and proper timbre because we had space to consolidate differences ''and'' not shatter (2)—because ''AC'' is a reformulation of an older ''AAB'' consequent. | |||
Our new word is ''ACACAACACAACACACAACACAA''… | |||
We can apply ''A'' ⟶ (''AC'' or ''CA'') stochastically too (ensuring the first ''A'' is fixed, as above). |