Template:Infobox interval: Difference between revisions

Xenwolf (talk | contribs)
m added spaces to copy template
Fredg999 (talk | contribs)
Add parameter for harmonic entropy (opt-in switch)
 
(29 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|}}}
{|
| debug={{lc:{{{debug|}}}}}
|+ <u>Interval information</u>
| Harmonic entropy={{lc:{{{Harmonic entropy|}}}}}
{{#if: {{{Icon|}}} |
}}</includeonly><noinclude>
  {{!}} colspan="2" style="text-align:center" {{!}} <div style="background-color: white; padding: 2px; margin: 2px; border: 1px solid #eee; display: inline-block;">{{{Icon}}}</div>
{{documentation}}
}}
|-
{{#if: {{{Ratio|}}} |
  {{!}} style="text-align:right; color:#888" {{!}} Ratio&nbsp;
  {{!}} '''{{{Ratio}}}''' |
  <includeonly><span style="color:red">Error: Parameter ''Ratio'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Monzo|}}} |
  {{!}} style="text-align:right; color:#888" {{!}} Monzo&nbsp;
  {{!}} [[Monzos|'''{{Monzo|{{{Monzo}}}}}''']] |
  <includeonly><span style="color:red">Error: Parameter ''Monzo'' missing!</span> [[Template:Infobox Interval|Help ...]]<br/></includeonly>
}}
|-
{{#if: {{{Cents|}}} |
  {{!}} style="text-align:right; color:#888" {{!}} Size&nbsp;
  {{!}} [[cent|'''{{{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; color:#888" {{!}} Name(s)&nbsp;
  {{!}} '''{{{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; color:#888" {{!}} Color name&nbsp;
  {{!}} [[Kite's color notation|'''{{{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
|-
| Icon
| Image or symbol, 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]], if one exists
| 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
| Icon = [[File:glyph_7_4.png|alt=glyph 7 4.png|124x112px|glyph 7 4.png]] <small><br/>JI glyph for 7/4</small>
| 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
| Icon =
| Ratio =
| Monzo =
| Cents =
| Name =
| Sound =
| Color name =
}}</nowiki>
 
[[Category:Templates]]
 
<!-- interwiki -->
[[de:Vorlage:Infobox Intervall]]
</noinclude>
</noinclude>