User:Plumtree/Infobox Interval: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 78: | Line 78: | ||
== Examples == | == Examples == | ||
{{#invoke:Infobox Interval|infobox_interval|Ratio=7/4|Name= | {{#invoke:Infobox Interval|infobox_interval|Ratio=7/4|Name=harmonic seventh|Color name=z7, zo 7th|Sound=jid_7_4_pluck_adu_dr220.mp3|debug=1}} | ||
Usage example for a small ratio ([[7/4]]): | Usage example for a small ratio ([[7/4]]): | ||
<pre> | <pre> | ||
Revision as of 17:40, 12 October 2022
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
There are three different ways to use this template:
- Small ratios:
{{Infobox Interval}}(the ratio is inferred from page name),{{Infobox Interval|7/4}},{{Infobox Interval|Ratio=7/4}}.- In this form, Factorization, Subgroup, Monzo, Cents, FJS name, Norms, Harmonic entropy are computed automatically.
- When use this form? In most cases - whenever both numerator and denominator of the ratio are small enough to fit within Lua numbers as integers. You should not encounter any problems when those are [math]\displaystyle{ \leq 2^{32} }[/math], and you might happen to not encounter any problems when those are [math]\displaystyle{ \leq 2^{53} }[/math]. With larger numbers, you are almost guaranteed to get inaccurate results.
- Large ratios:
{{Infobox Interval|Ket=-2 0 0 1}},{{Infobox Interval|Monzo=-2 0 0 1}}.- In this form, Ratio and Norms are omitted, Factorization, Subgroup, Cents, FJS name, Harmonic entropy are computed automatically.
- When use this form? Whenever numerator or denominator are too large.
- Irrational intervals:
{{Infobox Interval|Ratio=π|Cents=1981.795}}.- In this form, Factorization, Subgroup, Monzo, FJS name, Norms, Harmonic entropy are omitted.
- When use this form? Whenever the interval is irrational.
The template supports the following parameters:
| Entry | Parameter | Meaning, usage notes. |
|---|---|---|
| Ratio | 1, Ratio | Frequency ratio of the interval. Specified explicitly, derived from page name or omitted. |
| Factorization | Prime factorization of the ratio. Derived either from Ratio or Monzo or omitted for irrational intervals. | |
| Subgroup | JI subgroup generated by factors of the ratio. Derived either from Ratio or Monzo or omitted for irrational intervals. | |
| Monzo | Ket, Monzo | Coefficients of the Monzo notation, separated by whitespaces. Derived from Ratio or specified or omitted for irrational intervals. |
| Cents | Cents | Size in cents. Either derived from Ratio or Monzo or specified. |
| Name | Name | Name(s) of the interval. Pages with missing values go into Category:Todo:add interval name. You should not put any <br/> tags between names here; it will be done automatically. |
| Color 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. Default: omitted.
|
| FJS name | FJS name | Functional Just System name. Provided, derived from Ratio or Monzo or omitted for irrational intervals. At the moment, when computed automatically, results may be incorrect in rare cases. |
| Norms | Tenney height, Weil height, Benedetti height. Derived from Ratio or omitted. | |
| Harmonic entropy | Harmonic entropy approximation (Shannon, [math]\displaystyle{ \sqrt{n\cdot d} }[/math] weights, [math]\displaystyle{ 200\text{-integer limit}\cap\{x\mid\left|\left|x\right|\right|\leq 100\} }[/math]). Derived from Ratio, Monzo or Cents. | |
| Sound | Sound | Soundfile, if one exists. Only name of the file is required (no prefix "File:" and of course without brackets). Default: omitted. |
| Xen-calc | A link to xen-calc. Appears when Ratio is shown. |
Examples
Script error: No such module "Infobox Interval". Usage example for a small ratio (7/4):
{{Infobox Interval
| Name = harmonic seventh
| Color name = z7, zo 7th
| Sound = jid_7_4_pluck_adu_dr220.mp3
}}
Usage example for a large ratio (Septimal ruthenia):
{{Infobox Interval
| Monzo = -263 88 0 44
| Name = septimal ruthenia, septiruthenia
}}
Usage example for an irrational interval (Pitave):
{{Infobox Interval
| Ratio = π
| Cents = 1981.795
| Name = pitave
}}
Boilerplates
Empty template for copy & paste (to avoid copying wrong values from interval pages):
{{Infobox Interval
| Name =
| Color name =
| Sound =
}}
See also
- Template:Infobox ET
- xen-calc – the according page of that tool gets linked automatically if the
Ratioparameter is filled in
[[Category:Templates]]