Template:Infobox interval: Difference between revisions

m Moved "Category:Rational intervals" to the top to make sure that it appears in first position in the categories list at the bottom of each page, removed blank line
Add parameter for harmonic entropy (opt-in switch)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>[[Category:Rational intervals]]<div style="
<includeonly>{{#invoke: Infobox_interval | infobox_interval
border: 1px solid #999;
| Ratio={{{1|{{{Ratio|{{PAGENAME}}}}}}}}
margin: 0;
| Ket={{{Ket|{{{Monzo|}}}}}}
margin-left: 1em;
| Cents={{{Cents|}}}
margin-bottom: 0.5em;
| Comma={{{Comma|}}}
padding: 0.25em 0.5em;
| Name={{{Name|}}}
background-color: #fafafa;
| Color name={{{Color name|}}}
min-width: 15em;
| FJS name={{{FJS name|}}}
float: right;
| Sound={{{Sound|}}}
">
| Calc={{{Calc|}}}
{| width="100%" style="border-collapse: collapse;"
| debug={{lc:{{{debug|}}}}}
|+ <u>Interval information</u>
| Harmonic entropy={{lc:{{{Harmonic entropy|}}}}}
{{#if: {{{JI glyph|}}} |
}}</includeonly><noinclude>
  {{!}} style="text-align:right; padding-right: 0.25em; vertical-align: top" {{!}} [[JI glyphs|JI glyph]]
{{documentation}}
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} {{{JI glyph}}}
}}
|-
{{#if: {{{Ratio|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Ratio
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Ratio}}}''' |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Ratio
  {{!}} <span style="color:red"><abbr title="missing value for parameter 'Ratio'">''missing''</abbr></span><sup>[[Template:Infobox Interval| ?&nbsp;]]</sup>[[Category:Todo:add interval ratio]]
}}
|-
{{#if: {{{Monzo|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Monzo]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{Monzo|{{{Monzo}}}}}''' |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Monzo]]
  {{!}} <span style="color:red"><abbr title="missing value for parameter 'Monzo'">''missing''</abbr></span><sup>[[Template:Infobox Interval| ?&nbsp;]]</sup>[[Category:Todo:add interval monzo]]
}}
|-
{{#if: {{{Cents|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Size in [[cent]]s
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Cents}}}''' |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Size in [[cent]]s
  {{!}} <span style="color:red"><abbr title="missing value for parameter 'Cents'">''missing''</abbr></span><sup>[[Template:Infobox Interval| ?&nbsp;]]</sup>[[Category:Todo:add interval cents]]
}}
|-
{{#if: {{{Name|{{{Names|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Name(s)
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Name|{{{Names}}}}}}''' |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Name
  {{!}} <span style="color:red"><abbr title="missing value for parameter 'Name'">''missing''</abbr></span><sup>[[Template:Infobox Interval| ?&nbsp;]]</sup>[[Category:Todo:add interval name]]
}}
|-
{{#if: {{{Color name|{{{Color Name|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Color notation|Color name]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Color name|{{{Color Name}}}}}}'''
}}
|-
{{#if: {{{FJS name|{{{FJS Name|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Functional Just System|FJS name]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{FJS name|{{{FJS Name}}}}}}'''
}}
|-
{{#if: {{{Sound|}}} |
  {{!}} colspan="2" style="text-align: center;" {{!}} [[File:{{{Sound}}}|270px]]<br/><small>[[:File:{{{Sound}}}|[sound info]]]</small>
  [[Category:Pages with internal sound examples]]
}}
|-
{{#if: {{{Ratio|}}} |
  {{!}} colspan="2" style="text-align: center;" {{!}} <small>[https://www.yacavone.net/xen-calc/?q={{#regex: {{{Ratio|}}}|/\s+{{!}}<br>/|}} open this interval in ''xen-calc'']</small>
}}
|}
</div><!-- this section is for changing parameter names to regular form -->{{#if: {{{Names|}}}
| [[Category:Todo:normalize interval parameters]]}}{{#if: {{{Color Name|}}}
| [[Category:Todo:normalize interval parameters]]}}{{#if: {{{FJS Name|}}}  
| [[Category:Todo:normalize interval parameters]]}}</includeonly><noinclude>
The template '''Infobox Interval''' was built to help presenting basic information about [[interval]]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.


== Usage ==
[[Category:Infoboxes]]
The templates supports the following parameters (highly requested parameters in '''bold'''):
 
{| class="wikitable"
! Parameter
! Meaning
! Usage notes, Remarks
|-
| <s>JI glyph</s>
| <s>Just intonation glyph, if one exists</s>
| <s>complete with prefix "File:" and brackets</s>
|-
| '''Ratio'''
| Frequency [[ratio]] of the interval
| pages with missing values go into [[:Category:Todo:add interval ratio]]
|-
| '''Monzo'''
| Parameters of the [[Monzo]] notation
| pages with missing values go into [[:Category:Todo:add interval monzo]]
|-
| '''Cents'''
| Size in [[cent]]s
| pages with missing values go into [[:Category:Todo:add interval cents]]
|-
| '''Name'''
| Name(s) of the interval
| pages with missing values go into [[:Category:Todo:add interval name]]
|-
| Color name
| Color name after [[Kite's color notation]]
| in the form: <code>written form, spoken form</code>, for color names see also [[Gallery of just intervals]]
|-
| FJS name
| [[Functional Just System]] name
|
|-
| Sound
| Soundfile, if one exists
| only name of the file (no prefix "File:" and of course without brackets)
|}
 
== Example ==
Usage example for the harmonic seventh ([[7/4]]):
<pre>
{{Infobox Interval
| Ratio = 7/4
| Monzo = -2 0 0 1
| Cents = 968.82591
| Name = Harmonic seventh
| Color name = z7, zo 7th
| FJS name = m7<sup>7</sup>
| Sound = jid_7_4_pluck_adu_dr220.mp3
}}
</pre>
 
== Boilerplates ==
'''Empty template''' for copy &amp; paste (to avoid copying wrong values from interval pages):
<pre>
{{Infobox Interval
| Ratio =
| Monzo =
| Cents =
| Name =
| Color name =
| FJS name =
| Sound =
}}
</pre>
 
'''Partlially self-filling''' version for copy &amp; paste (to avoid copying wrong values from interval pages):
<pre>
{{Infobox Interval
| Ratio = {{subst:PAGENAME}}
| Monzo =
| Cents = {{subst:cents|{{subst:PAGENAME}}|5}}
| Name =
| Color name =
| FJS name =
| Sound =
}}
</pre>
 
== See also ==
* [[Template:Infobox ET]]
* [[xen-calc]] – the according page of that tool gets linked automatically if the <code>Ratio</code> parameter is filled in
 
[[Category:Templates]]
 
<!-- interwiki -->
[[de:Vorlage:Infobox Intervall]]
</noinclude>
</noinclude>