Template:Infobox interval: Difference between revisions

TallKite (talk | contribs)
took out "if one exists", because if there's a ratio, there's a color name!
Fredg999 (talk | contribs)
Add parameter for harmonic entropy (opt-in switch)
 
(27 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<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|}}}
<!-- width: 15em; -->
| FJS name={{{FJS name|}}}
float: right;
| Sound={{{Sound|}}}
">
| Calc={{{Calc|}}}
{| 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}}}''' |
  <includeonly><span style="color:red">Error: Parameter ''Ratio'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Monzo|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Monzos|Monzo]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{Monzo|{{{Monzo}}}}}''' |
  <includeonly><span style="color:red">Error: Parameter ''Monzo'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Cents|}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Size in [[Cent|Cents]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Cents}}}&#8239;&cent;''' |
  <includeonly><span style="color:red">Error: Parameter ''Cents'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Name|{{{Names|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Name(s)
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Name|{{{Names}}}}}}''' |
  <includeonly><span style="color:red">Error: Parameter ''Name'' or ''Names'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Color name|{{{Color Name|}}}}}} |
  {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Kite's color notation|Color name]]
  {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Color name|{{{Color Name}}}}}}'''
}}
|-
{{#if: {{{Sound|}}} |
  {{!}} colspan="2" style="text-align: center;" {{!}} [[File:{{{Sound}}}|270px]]<br/><small>[[:File:{{{Sound}}}|[sound info]]]</small>
}}
|}
</div><noinclude>


The template '''Infobox Interval''' was built to help presenting basic informations 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.
[[Category:Infoboxes]]
 
The templates supports the following parameters (mandatory parameters in '''bold'''):
 
{| class="wikitable"
! Parameter
! Meaning
! Usage hints, Remarks
|-
| JI glyph
| Just intonatin glyph, if one exists
| complete with prefix "File:" and brackets
|-
| '''Ratio'''
| Frequency ratio of the interval
|
|-
| '''Monzo'''
| Parameters of the [[Monzos|Monzo notation]]
|
|-
| '''Cents'''
| Size in [[Cent]]
|
|-
| '''Names''' <br/> or '''Name'''
| Name(s) of the interval
| '''''Maybe better optional?'''''
|-
| Sound
| Soundfile is one exists
| only name of the file (no prefix "File:" and of course without Brackets)
|-
| 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]]
|}
 
Usage example for the harmonic seventh ([[7/4]]):
<nowiki>{{Infobox Interval
| JI glyph = [[File:glyph_7_4.png|48px]]
| Ratio = 7/4
| Monzo = -2 0 0 1
| Cents = 968.82591
| Name = Harmonic seventh
| Sound = jid_7_4_pluck_adu_dr220.mp3
| Color name = z7, zo 7th
}}</nowiki>
In the above example, an icon from the [[JI glyphs]] set is used.
 
----
 
Empty template for copy &amp; paste (to avoid copying wrong values from interval pages:
<nowiki>{{Infobox Interval
| JI glyph =
| Ratio =
| Monzo =
| Cents =
| Name =
| Sound =
| Color name =
}}</nowiki>
 
[[Category:Templates]]
 
<!-- interwiki -->
[[de:Vorlage:Infobox Intervall]]
</noinclude>
</noinclude>