Template:Infobox ET: Difference between revisions

Xenwolf (talk | contribs)
support also P5, M2, m2, and A1 as parameter names
ArrowHead294 (talk | contribs)
mNo edit summary
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<div style="
<includeonly>{{#invoke: Infobox_ET | infobox_ET
border: 1px solid #999;
| name = Infobox ET
margin: 0;
| tuning = {{{1|{{SUBPAGENAME}}}}}
margin-left: 1em;
| Prime factorization = {{{Prime factorization|}}}
margin-bottom: 0.5em;
| Zeta = {{{Zeta|}}}
padding: 0.5em;
| Consistency = {{{Consistency|}}}
background-color: #f0f0f0;
| Distinct consistency = {{{Distinct consistency|{{{Distinct|}}}}}}
min-width: 15em;
| debug = {{lc:{{{debug|}}}}}
float: right;
}}</includeonly><noinclude>
">
{{documentation}}
{| width="100%" style="border-collapse: collapse;"
|+ '''{{PAGENAME}}'''
|-
{{#if: {{{Prime factorization|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Prime factorization
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Prime factorization|}}} '''
}}
|-
{{#if: {{{Step size|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Step size
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Step size|}}}'''
}}
|-
{{#if: {{{Fifth|{{{Fifth type|{{{P5|}}}}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Fifth
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Fifth|{{{Fifth type|}}}}}}'''
}}
|-
{{#if: {{{Major 2nd|{{{M2|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Major 2nd
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Major 2nd|}}}'''
}}
|-
{{#if: {{{Minor 2nd|{{{m2|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Minor 2nd
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Minor 2nd|}}}'''
}}
|-
{{#if: {{{Augmented 1sn|{{{A1|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Augmented 1sn
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Augmented 1sn|}}}'''
}}
|}
</div><includeonly><!-- this includeonly section is for changing parameter names to regular form -->{{#if: {{{Fifth type|}}}
| [[Category:Todo:normalize EDO parameters]]}}</includeonly><noinclude>


The template '''Infobox ET''' was built to help presenting basic information about [[EDO]]s in a unified form, to make them obvious by glance. Also the formatting of the wiki text itself is easier to read and improve when it is obviously structured by this template.
[[Category:Infoboxes]]
 
The templates supports the following parameters:
 
{| class="wikitable"
! width="15%" | Parameter
! width="85%" | Meaning, usage notes
|-
| Prime factorization
| Prime factorization of the equal temperament (e.g. 12 = 2<sup>2</sup> × 3), even if prime per se (e.g. 17 (prime)).
|-
| Step size
| One step (1200/edo) of the equal temperament in cents (5 digits).
|-
| Fifth
| (<s>Fifth type</s>) The best approximation of 3/2, the perfect fifth (P5), in edosteps and in cents. (<code>P5 := round(log2(3/2)*edo)</code>)
|-
| Major 2nd
| Size of the 3-limit major second (M2) in edosteps and cents. (<code>M2 := 2*P5 - P8</code>)
|-
| Minor 2nd
| Size of the 3-limit minor second (m2) in edosteps and cents. (<code>m2 := 3*P8 - 5*P5</code>)
|-
| Augmented 1sn
| Size of the 3-limit augmented unison (A1) in edosteps and cents. This is also the sharpness/flatness of the edo. (<code>A1 := M2 - m2</code>)
|}
 
Usage example for [[24edo]]:
<nowiki>{{Infobox ET
| Prime factorization = 2<sup>3</sup> × 3
| Step size = 50¢
| Fifth = 14\24 = 700¢
| Major 2nd = 4\24 = 200¢
| Minor 2nd = 2\24 = 100¢
| Augmented 1sn = 2\24 = 100¢
}}</nowiki>
 
----
 
Empty (Step size is self-filling) template for copy &amp; paste (to avoid copying wrong values from edo pages:
<nowiki>{{Infobox ET
| Prime factorization =
| Step size = {{subst:#number_format:{{subst:#expr:1200/{{subst:#regex:{{subst:PAGENAME}}|/(\d+)-?EDO/i|\1}}}}|5}}
| Fifth =
| Major 2nd =
| Minor 2nd =
| Augmented 1sn =
}}</nowiki>
 
== See also ==
 
* [[Template:Infobox Interval]]
 
{{todo
| inline=1
| comment=Reach consensus on parameters, see discussion page!
<!-- | cleanup -->
}}
 
[[Category:Templates]]
<!-- interwiki -->
</noinclude>
</noinclude>