User:Fastaro/Generalized Pythagorean tuning: Difference between revisions

Fastaro (talk | contribs)
Fastaro (talk | contribs)
No edit summary
Line 5: Line 5:


== The Basics of Pythagorean Tuning ==
== The Basics of Pythagorean Tuning ==
Pythagorean tuning is a system based on the ratio of 3/2, known as a perfect fifth. The method involves generating scales through a chain of fifths, multiplying the frequency by 3/2 until passing an octave. This system is limited by the specific ratios it employs and does not return to the unison ratio of 1/1, leading to the need for more generalized methods.
Pythagorean tuning is a system based on the ratio of 3/2, known as a perfect fifth. The method involves generating scales through a chain of fifths, multiplying the frequency by 3/2 until passing an octave. This system is limited by the specific ratios it employs and does not return to the unison ratio of 1/1.


== Generalization of Ratios ==
== Generalization of Ratios ==
The generalized Pythagorean tuning considers 'q' as the octave term and 'p' as the term usually associated with the fifth, such as in the traditional 3/2 ratio for a perfect fifth. The idea is to extend the Pythagorean tuning beyond the fixed intervals of 3/2 and 4/3, allowing any two numbers to define the tuning system.
The generalized Pythagorean tuning considers 'q'(2) as the octave term and 'p'(3) as the term usually associated with the fifth, such as in the traditional 3/2 ratio for a perfect fifth. The idea is to extend the Pythagorean tuning by generalizing the standard chain of fifths and fourths (using 3 and 2) method.


== Derivation of 'n' ==
== Derivation of 'n' ==
Line 27: Line 27:
\[ n \geq \frac{x\ln(3)}{\ln(2)} - 1 \]
\[ n \geq \frac{x\ln(3)}{\ln(2)} - 1 \]


5. Since 'n' must be an integer, we apply the floor function to get the largest integer less than or equal to the expression:
5. Since 'n' must be an integer, we apply the ceiling function to get the largest integer less than or equal to the expression:
\[ n = \left\lfloor \frac{x\ln(3)}{\ln(2)} - 1 \right\rfloor \]
\[ n = \left\lceil \frac{x\ln(3)}{\ln(2)} - 1 \right\rceil \]
 
6. Simplify:
\[ n = \left\lfloor \frac{x\ln(3)}{\ln(2)} \right\rfloor \]


== Generating Tuple of Ratios ==
== Generating Tuple of Ratios ==
<nowiki>Using the derived value of 'n', we can generate a tuple of ratios \[ R_{x_1} \text and\  R_{x_2} \], where \[ R_{x_1} = \frac{p^x}{q^n} \text and\  R_{x_2} = \frac{q^{n+1}}{p^x} \]. This pair of ratios represents the upper and lower bounds of a frequency range for a given 'x'. The product of \[ R_{x_1}  \text and\  R_{x_2} \] for all 'x' from 0 to 'k' yields the series:</nowiki>
<nowiki>Using the derived value of 'n', we can generate a tuple of ratios \[ R_{x_1} \text and\  R_{x_2} \], where \[ R_{x_1} = \frac{p^x}{q^n} \text and\  R_{x_2} = \frac{q^{n+1}}{p^x} \]. This pair of ratios represents the upper and lower bounds of a frequency range for a given 'x'. The product of \[ R_{x_1}  \text and\  R_{x_2} \] for all 'x' from 0 to 'k' yields the result:</nowiki>


\[ \prod_{x=0}^{k} R_{x_1} \cdot R_{x_2} = q^{k+1} \]
\[ \prod_{x=0}^{k} R_{x_1} \cdot R_{x_2} = q^{k+1} \]


This series of ratios describes the continuum of the Pythagorean Ratios from the smallest numerator/denominator to the largest, encompassing all the Pythagorean Ratios within the range of 'k' octaves.
== Generating the Ratios with Code ==
<pre>
from math import log, floor
 
# Define 'p' and 'q'(q is the octave term, to keep everything within an octave keep q = 2)
p = 3
q = 2
 
# Define the function to calculate 'n' using the floor function
def calculate_n(x, p, q):
    return floor(x * log(p) / log(q))
 
# Define the range/edo for 'x'
limit = 12
 
# Print out the values of 'n' and the ratio for each 'x'
for x in range(limit):
    n = calculate_n(x, p, q)
    ratio1 = (p**x) / (q**n)
    print(f'For x={x}, n={n}, the ratio p^x/q^n is: {ratio1}')
    ratio2 = (q**(n+1)) / (p**x)
    print(f'For x={x}, n={n}, the ratio q^n+1/p^x is: {ratio2}')
</pre>


== Implications and Applications ==
== Implications and Applications ==
The generalized Pythagorean tuning provides a more versatile framework for musical tuning, allowing composers and musicians to explore scales and harmonies beyond the traditional limits. This approach can lead to new musical expressions and better alignment with various musical traditions and instruments.
The generalized Pythagorean tuning provides a more versatile framework for musical tuning, allowing composers and musicians to explore scales and harmonies beyond the traditional limits. This approach can lead to new musical expressions and better alignment with various musical traditions and instruments.