User:2^67-1/Sandbox: Difference between revisions

Godtone (talk | contribs)
m add point that is very close to the JIP of p=1, q=2 -- but surprisingly fairly simple -- as a ratio, for further completeness
2^67-1 (talk | contribs)
mNo edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Testing=
A program to find increasingly better EDns in a given subgroup with a given equave ('increasingly better' is given by decreasing relative error)


The '''blackwood-dicot-semaphore''' equivalence continuum is a continuum of 7-limit rank-3 temperaments describing the set of all 7-limit rank-3 temperaments supported by [[10edo]]. Any rank-2 temperament supported by [[10edo]] can thus be represented by a line between two points in this continuum.
<syntaxhighlight lang="python">
import math


All temperaments in the continuum satisfy (25/24)<sup>''p''</sup>(49/48)<sup>''q''</sup> ~ 256/243, equating a stack of [[25/24|dicot commas (25/24)]] and [[49/48|semaphore commas (49/48)]] with the [[256/243|blackwood comma (256/243)]].
def fracmult(a,b):
    g = math.gcd(a[0]*b[0],a[1]*b[1])
    return [a[0]*b[0]//g,a[1]*b[1]//g]


The blackwood comma is the characteristic [[3-limit]] comma tempered out in 10edo.
def reciprocal(a):
    return [a[1],a[0]]


[[User:Godtone]] notes the following JIP's, each one corresponding to a 1D continua contained therein, for which increasingly efficient approximations generally represents increasingly efficient [[7-limit]] temperaments:
def equavereduce(a,b):
    while b[0]*a[1] > a[0]*b[1]:
        b = fracmult(b,reciprocal(a))
    while b[0] < b[1]:
        b = fracmult(b,a)
    return b


* log<sub>2</sub>(256/243) / log<sub>2</sub>(25/24) = 1.2766647429 ; this is the JIP of p=1, q=0 (equiv. to p=-1, q=0)
def tonalitydiamond(a,b,c):
* log<sub>2</sub>(256/243) / log<sub>2</sub>(49/48) = 2.5275365063 ; this is the JIP of p=0, q=1 (equiv. to p=0, q=-1)
    return [equavereduce(a,b),equavereduce(a,reciprocal(b)),equavereduce(a,c),equavereduce(a,reciprocal(c)),equavereduce(a,fracmult(b,reciprocal(c))),equavereduce(a,fracmult(c,reciprocal(b)))]
* log<sub>2</sub>(256/243) / log<sub>2</sub>(1225/1152) = 0.8482245109 ; this is the JIP of p=1, q=1 (equiv. to p=-1, q=-1)
* log<sub>2</sub>(256/243) / log<sub>2</sub>(50/49) = 2.5796543166 ; this is the JIP of p=1, q=-1 (equiv. to p=-1, q=1)
* log<sub>2</sub>(256/243) / log<sub>2</sub>(60025/55296) = 0.6350918818 ; this is the JIP of p=1, q=2 (equiv. to p=-1, q=-2)
* log<sub>2</sub>(256/243) / log<sub>2</sub>(2401/2400) = 125.1044589 ; this is the JIP of p=1, q=-2 (equiv. to p=-1, q=2)
* log<sub>2</sub>(256/243) / log<sub>2</sub>(30625/27648) = 0.5096257724 ; this is the JIP of p=2, q=1 (equiv. to p=-2, q=-1)
* log<sub>2</sub>(256/243) / log<sub>2</sub>(625/588) = 0.8540148427 ; this is the JIP of p=2, q=-1 (equiv. to p=-2, q=1)


Importantly, each JIP corresponds to a ''rational'', so that, for example, (''p'', ''q'') = (1, -2) is equivalent to (''p'', ''q'') = (2, -4) and to (''p'', ''q'') = (-1, 2) '''but not to (1, 2)'''. Note that all these JIPs lie on the JIL (just intonation line).
def cents(a):
    return 1200*math.log2(a[0]/a[1])


Also note that continua separated by 2401/2400 are meaningfully different, but due to the efficiency of 2401/2400, one may want to examine the continuum of all 7-limit temperaments supported by [[10edo]] for which [[2401/2400]] is tempered.
def centslist(a):
    c = []
    for i in a:
        c.append(cents(i))
    return c


{| class="wikitable center-1 center-2"
def ednerror(a,e,equave):
|+ Selected temperaments with integer ''p'' and ''q''
    step = cents(equave)/e
    approx = round(a/step,0)*step
    error = math.fabs(a-approx)
    return error


|-
def ednerrorlist(a,e,equave):
! rowspan="2" | ''p''
    error = []
! rowspan="2" | ''q''
    for i in a:
! rowspan="2" | Temperament
        error.append(ednerror(cents(i),e,equave))
! colspan="2" | Comma
    return error
! rowspan="2" | <sub>Added by<br/>someone else?</sub>
 
|-
def euc(a):
! Ratio
    total = 0
! Monzo
    for i in a:
|-
        total = total + i**2
| 0 || 0 || [[Blackwood]] || [[256/243]] || {{monzo| 8 -5 0 0 }} || n
    return total**(1/2)
|-
 
| 0 || 1 || [[Archytas]] (squared) || [[64/63|4096/3969]] || {{monzo| 12 -4 0 -2 }} || n
def avg(a):
|-
    total = 0
| 0 || 2 || [[Buzzard]] || [[65536/64827]] || {{monzo| 16 -3 0 -4 }} || n
    for i in a:
|-
        total = total + i
| 0 || 2.5 = 5/2 || [[Slendric schisma|Slendrismic]] || [[Slendric schisma|68719476736/68641485507]] || {{monzo| 36 -5 0 -10 }} || Y
    return total/len(a)
|-
   
| 0 || 2.6 = 13/5 || 2.3.7 [https://sintel.pythonanywhere.com/result?subgroup=2.3.7&reduce=on&weights=weil&target=&edos=&commas=4988891938119860195948410209%2F4951760157141521099596496896&submit_comma=submit 5 & 171] || [[4988891938119860195948410209/4951760157141521099596496896|(28 digits)]] || {{monzo| -92 12 0 26 }} || Y
 
|-
best = 10**10
| 0 || 2.{{overline|6}} = 8/3 || 2.3.7 [https://sintel.pythonanywhere.com/result?subgroup=2.3.7&reduce=on&weights=weil&target=&edos=&commas=72680419155717387%2F72057594037927936&submit_comma=submit 5 & 212] || 72680419155717387/72057594037927936 || {{monzo| -56 7 0 16 }} || n
 
|-
for i in range(1, 100000):
| 0 || 3 || [[Slendric]] (squared) || [[1029/1024|1058841/1048576]] || {{monzo| -20 2 0 6 }} || n
    if avg(ednerrorlist(tonalitydiamond([3,2],[5,2],[7,4]),i,[3,2]))*i < best:
|-
        best = avg(ednerrorlist(tonalitydiamond([3,2],[5,2],[7,4]),i,[3,2]))*i
| 0 || 4 || [https://sintel.pythonanywhere.com/result?subgroup=2.3.7&reduce=off&weights=weil&target=&edos=&commas=17294403%2F16777216&submit_comma=submit 5 & 81] || 17294403/16777216 || {{monzo| -24 1 8 }} || Y
        print(i)
|-
</syntaxhighlight>
| 0 || 5 || [[Cloudy]] (squared) || [[16807/16384|282475249/268435456]] || {{monzo| -28 0 0 10 }} || Y
|-
| 0 || ∞ || [[Semaphore]] || [[49/48]] || {{monzo| -4 -1 0 2 }} || n
|-
| 1 || 0 || [[Srutal]] || [[2048/2025]] || {{monzo| 11 -4 -2 0 }} || n
|-
| 1.25 = 5/4 || 0 || [[Quintosec]] || 140737488355328/140126044921875 || {{monzo| 47 -15 -10 0 }} || n
|-
| 1.3 = 13/10 || 0 || 2.3.5 [https://sintel.pythonanywhere.com/result?subgroup=5&reduce=on&weights=weil&target=&edos=&commas=%5B119+-37+-26%3E&submit_comma=submit 10 & 171] || [[670975306467707996070384979248046875/664613997892457936451903530140172288|(36 digits)]] || {{monzo| -119 37 26 0 }} || n
|-
| 1.{{overline|3}} = 4/3 || 0 || [[Marvel temperaments#Submajor|Submajor]] || 69198046875/68719476736 || {{monzo| -36 11 8 }} || Y
|-
| 1.5 = 3/2 || 0 || 2.3.5 [[Miracle]] || [[34171875/33554432]] || {{monzo| -25 7 6 }} || Y
|-
| 2 || 0 || [[Negri]] || [[16875/16384]] || {{monzo| -14 3 4 0 }} || n
|-
| ∞ || 0 || [[Dicot]] || [[25/24]] || {{monzo| -3 -1 2 0 }} || n
|-
| 1 || 0.5 = 1/2 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=on&weights=weil&target=&edos=&commas=67108864%2F66976875&submit_comma=submit 10 & 53 & 130] || 67108864/66976875 || {{monzo| 26 -7 -4 -2 }} || n
|-
| 6/5 = 1.2 || 3/5 = 0.6 || p=1,q=2 Miracle projection || 35162859375/34359738368 [[1236426679426025390625/1180591620717411303424|(squared)]] || {{monzo|| -35 8 6 3 }} || Y
|-
| 2 || 1 || [[Avicennmic temperaments|Avicennmic]] || [[525/512|275625/262144]] || {{monzo| -18 2 4 2 }} || Y
|-
| 1 || 1 || [[Mirwomo temperaments|Mirwomo]] || [[33075/32768]] || {{monzo| -15 3 2 2 }} || n
|-
| 0.{{overline|857142}} = 6/7 || 0.{{overline|857142}} = 6/7 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=off&weights=weil&target=&edos=&commas=318130560585842112604248046875%2F316912650057057350374175801344&submit_comma=submit 10 & 77 & 308] || [[318130560585842112604248046875/31691265005705735037417580134|(30 digits)]] || {{monzo| -98 23 12 12 }} || Y
|-
| 0.8{{overline|3}} = 5/6 || 0.8{{overline|3}} = 5/6 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=on&weights=weil&target=&edos=&commas=9671406556917033397649408%2F9618459881658113759765625&submit_comma=submit 80d & 130 & 140] (decoid detemp.) || [[9671406556917033397649408/9618459881658113759765625|(25 digits)]] || {{monzo| 83 -20 -10 -10 }} || Y
|-
| 1 || ∞ || [[Jubilic]] || [[50/49]] || {{monzo| 1 0 2 -2 }} || n
|-
| 1 || -1 || [https://sintel.pythonanywhere.com/result?subgroup=2.3.5.7&reduce=on&weights=weil&target=&edos=&commas=6272%2F6075&submit_comma=submit 10 & 14 & 27] || 6272/6075 || {{monzo| 7 -5 -2 2 }} || n
|-
| 2 || -2 || [https://sintel.pythonanywhere.com/result?subgroup=2.3.5.7&reduce=on&weights=weil&target=&edos=&commas=153664%2F151875&submit_comma=submit 10 & 19 & 58] || 153664/151875 || {{monzo| 6 -5 -4 4 }} || n
|-
| 2.5 = 5/2 || -2.5 = -5/2 || [[Linus]] || 578509309952/576650390625 || {{monzo| 11 -10 -10 10 }} || n
|-
| 2.6 = 13/5 || -2.6 = -13/5 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=on&weights=weil&target=&edos=&commas=%5B-27+25+26+-26%3E&submit_comma=submit 10 & 171 & 20cd] || [[1262558414702117443084716796875/1259966282563754447206426345472|(31 digits)]] || {{monzo| -27 25 26 -26 }} || n
|-
| 2.{{overline|6}} = 8/3 || -2.{{overline|6}} = -8/3 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=on&weights=weil&target=&edos=&commas=%5B16+-15+-16+16%3E&submit_comma=submit 10 & 111 & 91] || 2189469451904296875/2177953337809371136 || {{monzo| -16 15 16 -16 }} || n
|-
| 3 || -3 || [https://sintel.pythonanywhere.com/result?subgroup=7&reduce=on&weights=weil&target=&edos=&commas=3796875%2F3764768&submit_comma=submit 10 & 41 & 133d] || 3796875/3764768 || {{monzo| -5 5 6 -6 }} || n
|-
| ∞ || 1 || [[Jubilic]] || [[50/49]] || {{monzo| 1 0 2 -2 }} || n
|-
| ∞ || 2 || [[Breedsmic temperaments|Breedsmic]] || [[2401/2400]] || {{monzo| -5 -1 -2 4 }} || n
|}