Contribution (talk | contribs)
Contribution (talk | contribs)
No edit summary
 
(21 intermediate revisions by 6 users not shown)
Line 34: Line 34:


Below is a piece of Python code doing it (better solutions may be possible):
Below is a piece of Python code doing it (better solutions may be possible):
<code>
<pre>
primes=[2,3,5,7,11,13,17,19,23,29,31]
primes=[2,3,5,7,11,13,17,19,23,29,31]
 
# reciprocal of a given monzo
def reciprocal(monzo):
  for p in range(0,len(monzo)):
      monzo[p]*=-1
  return(monzo)
 
# ABSCISSA MONZOS LIST
x_axis=[]
for a in range(0,26+1):
  # pythagorean interval
  monzo=[0]*len(primes)
  monzo[1]+=a
 
  # insert it at the end of the list 
  x_axis.append(monzo)
 
  # insert its reciprocal at the beginning of the list, so that 1/1 is the center of symmetry between reciprocals
  x_axis.insert(0,reciprocal(monzo.copy()))
 
# ORDINATE MONZOS LIST
y_axis=[]
 
# insert 1/1
monzo=[0]*len(primes)
y_axis.insert(0,monzo)
 
# first prime
for a in range(2,len(primes)): 
  # pure harmonic series
  monzo=[0]*len(primes)
  monzo[a]+=1
 
  # insert the pure harmonic at the beginning of the list
  y_axis.insert(0,monzo)
 
  # insert its subharmonic version at the end of the list, so that 1/1 is the center of symmetry between reciprocals
  y_axis.append(reciprocal(monzo.copy()))   
 
  # second prime 
  for b in range(2,a+1):
     
      # combine the pure harmonic with another prime, both by putting it in the numerator or in the denominator
      for c in range(1,-1-1,-2):
          monzo=[0]*len(primes)
          monzo[a]+=1
         
          # when c=1, the second prime is put in the numerator ; when c=-1, the second prime is put in the denominator
          monzo[b]+=c
         
          # before inserting, eliminate the cases where the first and the second prime are reciprocal
          if(monzo!=[0]*len(primes)):
             
              # insert the combination at the beginning
              y_axis.insert(0,monzo)
             
              # insert its reciprocal at the end, so that 1/1 is the center of symmetry between reciprocals
              y_axis.append(reciprocal(monzo.copy()))
             
              # insert 125/64 exception and its reciprocal
              if(monzo==[0,0,2,0,0,0,0,0,0,0,0]):
                  monzo[2]+=1
                  y_axis.insert(0,monzo)
                  y_axis.append(reciprocal(monzo.copy()))
 
# CARTESIAN COORDINATE PLANE OF MONZOS
table=[]
for y in range(0,len(y_axis)):
  row=[]
  for x in range(0,len(x_axis)):
      monzo=[]
      for a in range(0,len(primes)):
          # combine the abscissa monzo and the ordinate monzo
          monzo.append(x_axis[x][a]+y_axis[y][a])
      row.append(monzo)
  table.append(row)
 
##### SHOW RESULT #####
print(table)
</pre>
 
Would be curious to see your implementation :)
 
== Subpage helper ==
 
Hi Contribution, <br>
You might be interested in a wiki function that creates an inline list of subpages: <code><nowiki>{{Special:PrefixIndex/{{FULLPAGENAME}}/}}</nowiki></code> (could be helpful on your user page).<br>
Best regards
--[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 14:43, 11 June 2020 (UTC)
 
== Factor limit suggestion ==
 
Hi Contribution, <br>
Your '''factor limit''' idea looks quite interesting to me. Just a few thoughts:
''1-factor-limit'' seems to include the [[prime harmonic series]] and its inverse (and what about ''0-factor-limit'' being ''1'')?. <br>
Maybe also the (obviously abandoned) [[prime interval]] attempt could be worth reading (some open questions there). <br>
Best regards --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 08:25, 12 June 2020 (UTC)
 
== Moving pages around ==
 
Hi Contribution, <br>
I've seen you move wiki pages to strange places after you deleted their content. Maybe it's your way to try to get a page "deleted" somehow. <br> I built a tool to say "please delete this page" to one of the operators. A short description is on [[Help:Help]], I hope that helps. <br> Best regards --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 18:30, 20 June 2020 (UTC)
 
== A BIG Thanks ==
 
... for all the work you did adding all the [[:Category:Helmholtz-Ellis notation|Helmholtz-Ellis notation symbols]]! Especially that you did it in SVG, make them an ideal base for derivates and images using them. Thanks again. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 08:31, 4 October 2020 (UTC)
 
== Reduce comma tables on EDO pages ==
 
Please have a look at [[Xenharmonic Wiki: Things to do #Comma tables in EDO_pages]]. Thanks --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 09:10, 11 January 2021 (UTC)
 
== Huge Tables ==
 
I think that the tables you are adding are a usability nightmare. Do you really think they are good for the wiki? --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 17:48, 13 April 2021 (UTC)
 
: I agree with Xenwolf honestly, especially in light of some of the things currently being discussed on the Xenharmonic Alliance Discord Server. --[[User:Aura|Aura]] ([[User talk:Aura|talk]]) 20:48, 13 April 2021 (UTC)
 
== equal contrary motion ==
 
Hi contribution, <br>
I think it would ease to understand this voice leading concept it there was some article of at least section (reachable via [[Help:redirect|redirect]]). Do you think you could explain (and illustrate) it a bit further? <br>
Thanks in advance. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 21:00, 3 October 2022 (UTC)
 
: According to [[Wikipedia: Contrapuntal motion]], another name for equal contrary motion is "strict contrary motion". I don't think it is necessary to redefine basic voice leading concepts here on the Xen Wiki, since it is possible to link to Wikipedia whenever such a definition might be judged necessary. I think adding pictures would help more than adding definitions.
 
: That said, I would see no problem if there were pages about examples of voice leading specific to some tunings, when there is too much content to keep it reasonably on the tuning's main page. --[[User:Fredg999|Fredg999]] ([[User talk:Fredg999|talk]]) 02:28, 4 October 2022 (UTC)
 
:: Thanks for your opinion, Fredg999, so a page about (xenharmonic) counterpoint could help here (with ''strict contrary motion'' redirecting to it). --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 06:33, 4 October 2022 (UTC)
 
 
Hello,
 
What kind of intervals does the concept of strict contrary motion refer to? Degrees of a scale (for example 1 degree of 12 tones), or size (for example 100 cents)? Could all contrary motion of the same amount of degrees in an irregular temperament still be called strict?
 
== Template: Infobox ZPI ==
The template you created calls an inexistent module. If this template is work in progress, please add <code><nowiki>[[Category:Draft templates]]</nowiki></code> and don't use it in other pages until its basic functionality is complete. Thank you in advance. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 13:19, 28 March 2024 (UTC)
 
= Recent edits to EDx pages =
 
Hello! May I know where you get your numbers from? For instance, you have written in the Ed11/9 page that:
 
''[[19ed11/9]], [[21ed11/9]] and [[40ed11/9]] are to the [[Ed11/9|division of 11/9]] what [[17ed5/4]], [[19ed5/4]], and [[36ed5/4]] are to the [[Ed5/4|division of 5/4]]... <long text omitted>''
 
May we know how you arrive at these values? I feel that without any context or explanation people are going to have a hard time understanding why you are editing these pages. Thank you!    [[User:2^67-1|2^67-1]] 05:50, 28 August 2024 (UTC)
 
: Hi. For each pair of superparticular ratios <math>{s1}/{s2}</math>​ and <math>{s2}/{s3}</math>, there exists a ratio <math>{a}/{b}</math> such that <math>{s1}/{s2}</math>​ and <math>{s2}/{s3}</math>​ are <math>{a}/{b}</math> complementary; it is observed that <math>a−b=1</math> or <math>a−b=2</math>.
: In other words, for each ratio <math>a/b</math> where <math>a−b=1</math> or <math>a−b=2</math>, there exists a pair of superparticular ratios <math>{s1}/{s2}</math>​ and <math>{s2}/{s3}</math> that are <math>{a}/{b}</math> complementary.
 
: Bellow is a Python code that show for equal divisions of <math>a/b</math> the cent error in the mapping of superparticular ratios <math>{s1}/{s2}</math>​ and <math>{s2}/{s3}</math> that are <math>a/b</math> complementary.
: When running the tests sequentially for equal divisions of 2/1, 5/3, 3/2, 7/5, 4/3, 9/7, 5/4, 11/9, 6/5, and so on, we observe a converging sequence and pattern for low errors: 5, 7, 12; then 7, 9, 16; then 9, 11, 20; then 11, 13, 24; then 13, 15, 28; then 15, 17, 32; then 17, 19, 36; then 19, 21, 40; then 21, 23, 44; etc. --[[User:Contribution|Contribution]] ([[User talk:Contribution|talk]]) 11:08, 28 August 2024 (UTC)
 
<pre>
# Enter the values for the X ratio of EDX. Ensure the numerator and denominator differ by 1 or 2.
numerator, denominator = 3, 2
 
# Program
from math import log
 
def calculate_complementary_pair(numerator, denominator):
    """
    Calculates the superparticular complementary pair based on the difference
    between the numerator and denominator.
    """
    diff = numerator - denominator
      
      
# reciprocal of a given monzo
    if diff == 1:
def reciprocal(monzo):
        # Case where numerator and denominator differ by 1
    for p in range(0,len(monzo)):
        numerator_2 = numerator * 2
         monzo[p]*=-1
        denominator_2 = numerator + denominator
     return(monzo)
        numerator_3 = numerator + denominator
        denominator_3 = denominator * 2
    elif diff == 2:
        # Case where numerator and denominator differ by 2
        numerator_2 = numerator
        denominator_2 = int((numerator + denominator) / 2)
        numerator_3 = int((numerator + denominator) / 2)
         denominator_3 = denominator
     else:
        raise ValueError("Invalid input: numerator and denominator must differ by 1 or 2.")
      
      
# ABSCISSA MONZOS LIST
    return (numerator_2, denominator_2), (numerator_3, denominator_3)
x_axis=[]
 
for a in range(0,26+1):
def calculate_log_ratio(ratio):
    # pythagorean interval
     """
    monzo=[0]*len(primes)
     Calculates the logarithmic value of a ratio in cents.
    monzo[1]+=a
     """
   
     return 1200 * log(ratio) / log(2)
    # insert it at the end of the list 
 
    x_axis.append(monzo)
def print_mappings(ratio_log, superparticular_log, numerator, denominator):
      
     """
     # insert its reciprocal at the beginning of the list, so that 1/1 is the center of symmetry between reciprocals
     Prints the mapping of ratios and their differences in logarithmic cents.
    x_axis.insert(0,reciprocal(monzo.copy()))
     """
      
     for ed in range(1, 101):
# ORDINATE MONZOS LIST
         mapping = int(superparticular_log / (ratio_log / ed) + 0.5)  # Rounds to the nearest integer
y_axis=[]
         error = mapping * (ratio_log / ed) - superparticular_log
      
        print(f"scale: {ed}ed{numerator}/{denominator}, error: {error:.5f}")
# insert 1/1
 
monzo=[0]*len(primes)
# Calculate the superparticular complementary pairs
y_axis.insert(0,monzo)
(pair_1, pair_2) = calculate_complementary_pair(numerator, denominator)
   
 
# first prime
print(f"Successive superparticular complementary pair of {numerator}/{denominator}: {pair_1[0]}/{pair_1[1]} and {pair_2[0]}/{pair_2[1]}")
for a in range(2,len(primes)):  
 
     # pure harmonic series
# Calculate ratios
    monzo=[0]*len(primes)
ratio = numerator / denominator
    monzo[a]+=1
superparticular_complementary_ratio = pair_1[0] / pair_1[1]
      
 
    # insert the pure harmonic at the beginning of the list
# Calculate the logarithmic values for the ratios in cents
    y_axis.insert(0,monzo)
ratio_log_cents = calculate_log_ratio(ratio)
   
superparticular_complementary_log_cents = calculate_log_ratio(superparticular_complementary_ratio)
    # insert its subharmonic version at the end of the list, so that 1/1 is the center of symmetry between reciprocals
    y_axis.append(reciprocal(monzo.copy()))   
   
     # second prime 
     for b in range(2,a+1):
          
        # combine the pure harmonic with another prime, both by putting it in the numerator or in the denominator
         for c in range(1,-1-1,-2):
            monzo=[0]*len(primes)
            monzo[a]+=1
           
            # when c=1, the second prime is put in the numerator ; when c=-1, the second prime is put in the denominator
            monzo[b]+=c
           
            # before inserting, eliminate the cases where the first and the second prime are reciprocal
            if(monzo!=[0]*len(primes)):
               
                # insert the combination at the beginning
                y_axis.insert(0,monzo)
               
                # insert its reciprocal at the end, so that 1/1 is the center of symmetry between reciprocals
                y_axis.append(reciprocal(monzo.copy()))
               
                # insert 125/64 exception and its reciprocal
                if(monzo==[0,0,2,0,0,0,0,0,0,0,0]):
                    monzo[2]+=1
                    y_axis.insert(0,monzo)
                    y_axis.append(reciprocal(monzo.copy()))
# CARTESIAN COORDINATE PLANE OF MONZOS
table=[]
for y in range(0,len(y_axis)):
    line=[]
    for x in range(0,len(x_axis)):
        monzo=[]
        for a in range(0,len(primes)):
            # combine the abscissa monzo and the ordinate monzo
            monzo.append(x_axis[x][a]+y_axis[y][a])
        line.append(monzo)
    table.append(line)
##### SHOW RESULT #####
print(table)</code>


Would be curious to see your implementation :)
# Output the mappings
print_mappings(ratio_log_cents, superparticular_complementary_log_cents, numerator, denominator)
</pre>