Godtone (talk | contribs)
m My Python 3 code: antispam option
 
(3 intermediate revisions by one other user not shown)
Line 374: Line 374:
* I gave names for the interval prefixes and interval name abbreviations for [[5L 7s]] (p-chromatic) and [[7L 5s]] (m-chromatic). For [[7L 5s]] I picked "chrome" as it is strongly befitting of meantone as meantone does the 7-limit efficiently, elegantly and colourfully, and because its a contraction of "chromatic" and the "me" in "meantone". Pronounced like the word. For [[5L 7s]], in contrast with [[5L 7s]] which is mellow and harmonic, [[5L 7s]] is sharp and active, perhaps like fire, hence I picked "pyr-" from "pyro" and from "[py]thago[r]ean", with the letters "pyr" of course also being for "[p]a[r]a[py]th", "su[p]e[rpy]th" and "ult[r]a[py]yth".
* I gave names for the interval prefixes and interval name abbreviations for [[5L 7s]] (p-chromatic) and [[7L 5s]] (m-chromatic). For [[7L 5s]] I picked "chrome" as it is strongly befitting of meantone as meantone does the 7-limit efficiently, elegantly and colourfully, and because its a contraction of "chromatic" and the "me" in "meantone". Pronounced like the word. For [[5L 7s]], in contrast with [[5L 7s]] which is mellow and harmonic, [[5L 7s]] is sharp and active, perhaps like fire, hence I picked "pyr-" from "pyro" and from "[py]thago[r]ean", with the letters "pyr" of course also being for "[p]a[r]a[py]th", "su[p]e[rpy]th" and "ult[r]a[py]yth".


* Similarly to how I made an exception for the 1Lns scale form of [[1L 6s]], I'm also making an exception to include the multiMOSS of [[6L 2s]] as [[Diaschismic_family#Echidna|echidna]] (from which the MOSS derives its name) is a strong and important temperament to me with a period of half an octave and where one generator is both 11/10 and 9/7 depending on from which direction you view it, as 11/10 * 9/7 is extremely close to half an octave, the period for this MOSS scale. ("MultiMOSS" stands for "multi-period Moment Of Symmetry Scale".) '''However,''' this would not be included if I were to have this as "the semi-official [[TAMNAMS]] minimal MOSS name list", because this is a true exception to a lot of the design principles behind choosing this set of MOSSes to name and recognise as important.
* Similarly to how I made an exception for the 1Lns scale form of [[1L 6s]], I'm also making an exception to include the multiMOSS of [[6L 2s]] as [[echidna]] (from which the MOSS derives its name) is a strong and important temperament to me with a period of half an octave and where one generator is both 11/10 and 9/7 depending on from which direction you view it, as 11/10 * 9/7 is extremely close to half an octave, the period for this MOSS scale. ("MultiMOSS" stands for "multi-period Moment Of Symmetry Scale".) '''However,''' this would not be included if I were to have this as "the semi-official [[TAMNAMS]] minimal MOSS name list", because this is a true exception to a lot of the design principles behind choosing this set of MOSSes to name and recognise as important.


{| class="wikitable center-all"
{| class="wikitable center-all"
Line 1,553: Line 1,553:


# there is only finitely many EDOs which provide some simplification of a set of intervals as contrasted to all-distinct
# there is only finitely many EDOs which provide some simplification of a set of intervals as contrasted to all-distinct
def efficient_edos( n, inconsistencies=0, min_simplifications=1, edos=range(1,1000) ):
def efficient_edos( ivs, inconsistencies=0, min_simplifications=1, edos=range(1,1000) ):
if type(n)==int:
if type(ivs)==int:
n = odd_lim(n)
ivs = odd_lim(ivs)
elif type(n)==list and type(n[0])==int:
elif type(ivs)==list and type(ivs[0])==int:
n = odd_lim(1,[],n)
ivs = odd_lim(1,[],ivs)
results = []
results = []
for edo in edos:
for edo in edos:
v = edo
v = edo
if type(v)==int:
if type(v)==int:
v = val( lim(max([ prime_idx(len(fact(x))-1) for x in n ])), ed(edo) )
v = val( lim(max([ prime_idx(len(fact(x))-1) for x in ivs ])), ed(edo) )
# else v is assumed to be a mapping
# else v is assumed to be a mapping
m = dict()
m = dict()
for x in n: # collect mappings of intervals
for x in ivs: # collect mappings of intervals
sedo = map_iv(v,x)
sedo = map_iv(v,x)
if sedo in m:
if sedo in m:
Line 1,571: Line 1,571:
else:
else:
m[sedo] = [x]
m[sedo] = [x]
if len(inconsistent_ivs_by_val(n,v)) <= inconsistencies:
if len(inconsistent_ivs_by_val(ivs,v)) <= inconsistencies:
if len(n) - len([ sedo for sedo in m ]) >= min_simplifications:
if len(ivs) - len([ sedo for sedo in m ]) >= min_simplifications:
results.append(edo)
results.append(edo)
return results
return results


# the following definitions are equivalent in the set of commas considered 7-limit dieses:
# the following definitions are equivalent in the set of commas considered 7-limit dieses:
# dieses(4,odd_lim(9),odd_lim(9)) == dieses(4,odd_lim(9),odd_lim(7)) == dieses(5,odd_lim(9),odd_lim(9)) == dieses(5,odd_lim(9),odd_lim(7))
# dieses(4,odd_lim(9),odd_lim(9)) == dieses(4,odd_lim(9),odd_lim(7)) == dieses(5,odd_lim(9),odd_lim(7))
def dieses( max_n=4, gs=odd_lim(9), targets=None, show=True, minsizeexcl=1/1, maxsizeincl=250/243, minerr=steps(20000/19683,1)/4 ):
def dieses( max_n=4, gs=odd_lim(9), targets=None, show=False, minerr=steps(20000/19683,1)/4 ):
if not targets:
if not targets:
targets = gs
targets = gs
dieses_found = []
dieses_found = dict()
for g in gs:
for g in gs:
if steps(g,1)<1/2:
for target in targets+[(2,1)]:
for target in targets+[(2,1)]:
for n in range(2,max_n+1):
for n in range(2,max_n+1):
candidate = reduce(div_iv( target, mul_iv(*[g]*n) ))
c = div_iv(target,mul_iv( *([g]*n) ))
if steps(candidate,1)>1/2:
swap = steps(c,1)<0
candidate = div_iv((2,1),(candidate))
if swap:
if steps(candidate,1)/n >= steps(20000/19683,1)/4 and steps(250/243,1) >= steps(candidate,1):
c = div_iv((1,1),c)
if candidate not in dieses_found:
c = reduce(c) # condition 2 and 3 in line below
dieses_found[candidate] = []
if steps(minsizeexcl,1) < steps(c,1) <= steps(maxsizeincl,1) and steps(c,1)/n >= minerr:
dieses_found[candidate].append(( n, g, target, steps(candidate,ed(1200))/n ))
lhs, rhs = '('+striv(target)+')', '('+striv(g)+')^'+str(n)
if show:
if c not in dieses_found:
for diesis in dieses_found:
if show:
mindamage = min([ dieses_found[diesis][k][3] for k in range(len( dieses_found[diesis] )) ])
print( striv(c), '=', rhs if swap else lhs, '/', lhs if swap else rhs )
if mindamage >= minerr:
dieses_found.append(c)
def equiv(d):
else:
return ', '.join([ '('+striv(eq[1])+')^'+str(eq[0])+' ~ '+striv(eq[2])+' (~'+
if show:
str( int(eq[3]*100+.5)/100 )[:5]+'c)' for eq in dieses_found[d] ])
print( '(', striv(c), '=', rhs if swap else lhs, '/', lhs if swap else rhs, ')' )
print(
dieses_found.sort(key=lambda x: steps(x,1))
pad( striv(diesis), 12 ),
return dieses_found
pad( str( int(mindamage*100+.5)/100 )[:6]+'c', 7, '.' ),
equiv(diesis)
)
results = [diesis for diesis in dieses_found]
results.sort(key=lambda x: as_float(x))
return results
</syntaxhighlight>
</syntaxhighlight>