Template:Harmonics in ED: Difference between revisions

From Xenharmonic Reference
mNo edit summary
m shows all the different error colors
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#invoke: Harmonics_in_ED | table  
<includeonly>{{#invoke: Harmonics_in_ED | table  
| et = {{{1}}}
| et = {{{1}}}
| p_lim = {{{2|31}}}
| p_lim = {{{2|default}}}
| nowiki = {{{3}}}
| type = {{{3|prime}}}
| nowiki = {{{4|0}}}
}}</includeonly><noinclude>
}}</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.
==== Arguments ====
==== 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.
* '''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.
* '''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''.
* '''nowiki:''' Whether or not to ignore wiki formatting; 0 for ''false'', 1 for ''true''.
=== Usage example ===
=== Usage example ===
<pre>{{Harmonics in ED|41|23|0}}</pre>
<pre>{{Harmonics in ED|40|31|prime|0}}</pre>
{{Harmonics in ED|41|23|0}}
{{Harmonics in ED|40|31|prime|0}}
</noinclude>
</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)