Template:Harmonics in ED: Difference between revisions

From Xenharmonic Reference
Created basic template page for harmonics table template
 
m shows all the different error colors
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{#invoke: Harmonics_in_ED | table  
<includeonly>{{#invoke: Harmonics_in_ED | table  
| et = {{{1}}}
| et = {{{1}}}
| p_lim = {{{2}}}
| p_lim = {{{2|default}}}
}}</noinclude><includeonly>
| type = {{{3|prime}}}
| nowiki = {{{4|0}}}
}}</includeonly><noinclude>
Takes an equal tuning and returns a table with approximations of its prime harmonics up to a given number.
Takes an equal tuning and returns a table with approximations of its prime harmonics up to a given number.
== Usage example ==
==== Arguments ====
`{{Harmonics in ED|41|23}}`
* '''et:''' The edo to display the table for. At the moment, only edos are supported, but more equal tunings should be supported in the future.
{{Harmonics in ED|41|23}}
* '''p_lim:''' The maximum harmonic to display if prime; otherwise, display the largest prime smaller than the value of this argument. If left out, it defaults to 31 for primes and 25 for odds.
</includeonly>
* '''type:''' The type of harmonic to be displayed: '''prime''' for prime harmonics, '''odd''' for odd harmonics.
* '''nowiki:''' Whether or not to ignore wiki formatting; 0 for ''false'', 1 for ''true''.
=== Usage example ===
<pre>{{Harmonics in ED|40|31|prime|0}}</pre>
{{Harmonics in ED|40|31|prime|0}}
</noinclude>

Latest revision as of 15:53, 23 February 2026

Takes an equal tuning and returns a table with approximations of its prime harmonics up to a given number.

Arguments

  • et: The edo to display the table for. At the moment, only edos are supported, but more equal tunings should be supported in the future.
  • p_lim: The maximum harmonic to display if prime; otherwise, display the largest prime smaller than the value of this argument. If left out, it defaults to 31 for primes and 25 for odds.
  • type: The type of harmonic to be displayed: prime for prime harmonics, odd for odd harmonics.
  • nowiki: Whether or not to ignore wiki formatting; 0 for false, 1 for true.

Usage example

{{Harmonics in ED|40|31|prime|0}}
Approximation of prime harmonics in 40edo
Harmonic 2 3 5 7 11 13 17 19 23 29 31
Error Absolute (¢) 0.0 -12.0 +3.7 -8.8 -11.3 -0.5 -15.0 +2.5 +1.7 -9.6 -5.0
Relative (%) 0.0 -39.9 +12.3 -29.4 -37.7 -1.8 -49.9 +8.3 +5.8 -31.9 -16.8
Steps
(reduced)
40
(0)
63
(23)
93
(13)
112
(32)
138
(18)
148
(28)
163
(3)
170
(10)
181
(21)
194
(34)
198
(38)