Template:Infobox interval: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
m remove "...", xen-calc now in Italic
Fix spaced and/or newlined ratios for xen-calc (huge ratios still broken from xen-calc's part but this is our part). Prepare to get rid of JI glyph
Line 1: Line 1:
<div style="
<includeonly><div style="
border: 1px solid #999;
border: 1px solid #999;
margin: 0;
margin: 0;
Line 20: Line 20:
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Ratio}}}''' |
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Ratio}}}''' |
   {{!}} style="text-align:right; padding-right: 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><includeonly>[[Category:Todo:add interval ratio]]</includeonly>
   {{!}} <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]]
}}
}}
|-
|-
Line 27: Line 27:
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{Monzo|{{{Monzo}}}}}''' |
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{Monzo|{{{Monzo}}}}}''' |
   {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[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><includeonly>[[Category:Todo:add interval monzo]]</includeonly>
   {{!}} <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]]
}}
}}
|-
|-
Line 34: Line 34:
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Cents}}}''' |
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Cents}}}''' |
   {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Size in [[cent]]s
   {{!}} 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><includeonly>[[Category:Todo:add interval cents]]</includeonly>
   {{!}} <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]]
}}
}}
|-
|-
Line 41: Line 41:
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Name|{{{Names}}}}}}''' |
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Name|{{{Names}}}}}}''' |
   {{!}} style="text-align:right; padding-right: 0.25em" {{!}} Name
   {{!}} 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><includeonly>[[Category:Todo:add interval name]]</includeonly>
   {{!}} <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|}}}}}} |
{{#if: {{{Color name|{{{Color Name|}}}}}} |
   {{!}} style="text-align:right; padding-right: 0.25em" {{!}} [[Kite's color notation|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}}}}}}'''
   {{!}} style="background-color: white; padding-left: 0.25em" {{!}} '''{{{Color name|{{{Color Name}}}}}}'''
}}
}}
Line 59: Line 59:
|-
|-
{{#if: {{{Ratio|}}} |
{{#if: {{{Ratio|}}} |
   {{!}} colspan="2" style="text-align: center;" {{!}} <small>[https://www.yacavone.net/xen-calc/?q={{{Ratio|}}} open this interval in ''xen-calc'']</small>
   {{!}} 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><includeonly><!-- this includeonly section is for changing parameter names to regular form -->{{#if: {{{Names|}}}  
</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: {{{Color Name|}}}  
| [[Category:Todo:normalize interval parameters]]}}{{#if: {{{FJS Name|}}}  
| [[Category:Todo:normalize interval parameters]]}}{{#if: {{{FJS Name|}}}  
Line 70: Line 70:


== Usage ==
== Usage ==
The templates supports the following parameters (highly requested parameters in '''bold'''):
The templates supports the following parameters (highly requested parameters in '''bold'''):


Line 78: Line 77:
! Usage notes, Remarks  
! Usage notes, Remarks  
|-
|-
| JI glyph
| <s>JI glyph</s>
| Just intonation glyph, if one exists
| <s>Just intonation glyph, if one exists</s>
| complete with prefix "File:" and brackets
| <s>complete with prefix "File:" and brackets</s>
|-
|-
| '''Ratio'''
| '''Ratio'''
Line 100: Line 99:
| Color name
| Color name
| Color name after [[Kite's color notation]]  
| 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]]
| in the form: <code>written form, spoken form</code>, for color names see also [[Gallery of just intervals]]
|-
|-
| FJS name
| FJS name
Line 108: Line 107:
| Sound
| Sound
| Soundfile, if one exists
| Soundfile, if one exists
| only name of the file (no prefix "File:" and of course without Brackets)
| only name of the file (no prefix "File:" and of course without brackets)
|}
|}


== Example ==
== Example ==
Usage example for the harmonic seventh ([[7/4]]):
Usage example for the harmonic seventh ([[7/4]]):
<nowiki>{{Infobox Interval
<pre>
| JI glyph = [[File:glyph_7_4.png|48px]]
{{Infobox Interval
| Ratio = 7/4
| Ratio = 7/4
| Monzo = -2 0 0 1
| Monzo = -2 0 0 1
Line 123: Line 121:
| FJS name = m7<sup>7</sup>
| FJS name = m7<sup>7</sup>
| Sound = jid_7_4_pluck_adu_dr220.mp3
| Sound = jid_7_4_pluck_adu_dr220.mp3
}}</nowiki>
}}
In the above example, an icon from the [[JI glyphs]] set is used.
</pre>


== Boilerplates ==
== Boilerplates ==
 
'''Empty template''' for copy &amp; paste (to avoid copying wrong values from interval pages):
'''Empty template''' for copy &amp; paste (to avoid copying wrong values from interval pages:
<pre>
<nowiki>{{Infobox Interval
{{Infobox Interval
| JI glyph =
| Ratio =  
| Ratio =  
| Monzo =  
| Monzo =  
Line 138: Line 135:
| FJS name =  
| FJS name =  
| Sound =  
| Sound =  
}}</nowiki>
}}
</pre>


'''Partlially self-filling''' version for copy &amp; paste (to avoid copying wrong values from interval pages:
'''Partlially self-filling''' version for copy &amp; paste (to avoid copying wrong values from interval pages):
<nowiki>{{Infobox Interval
<pre>
| Icon =
{{Infobox Interval
| Ratio = {{subst:PAGENAME}}
| Ratio = {{subst:PAGENAME}}
| Monzo =  
| Monzo =  
Line 150: Line 148:
| FJS name =  
| FJS name =  
| Sound =  
| Sound =  
}}</nowiki>
}}
</pre>


== See also ==
== See also ==
* [[Template:Infobox ET]]
* [[Template:Infobox ET]]
* [[xen-calc]] -- the according page of that tool gets linked automatically if the <code>Ratio</code> parameter is filled in
* [[xen-calc]] the according page of that tool gets linked automatically if the <code>Ratio</code> parameter is filled in


[[Category:Templates]]
[[Category:Templates]]

Revision as of 23:40, 16 November 2021


The template Infobox Interval was built to help presenting basic information about intervals 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

The templates supports the following parameters (highly requested parameters in bold):

Parameter Meaning Usage notes, Remarks
JI glyph Just intonation glyph, if one exists complete with prefix "File:" and brackets
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 cents 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: written form, spoken form, 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):

{{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
}}

Boilerplates

Empty template for copy & paste (to avoid copying wrong values from interval pages):

{{Infobox Interval
| Ratio = 
| Monzo = 
| Cents = 
| Name = 
| Color name = 
| FJS name = 
| Sound = 
}}

Partlially self-filling version for copy & paste (to avoid copying wrong values from interval pages):

{{Infobox Interval
| Ratio = {{subst:PAGENAME}}
| Monzo = 
| Cents = {{subst:cents|{{subst:PAGENAME}}|5}}
| Name = 
| Color name = 
| FJS name = 
| Sound = 
}}

See also