User:Plumtree/Infobox Interval: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (34 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
|Ket={{{Ket|{{{Monzo|}}}}}} | |Ket={{{Ket|{{{Monzo|}}}}}} | ||
|Cents={{{Cents|}}} | |Cents={{{Cents|}}} | ||
|Comma={{{Comma|}}} | |||
|Name={{{Name|}}} | |Name={{{Name|}}} | ||
|Color name={{{Color name|}}} | |Color name={{{Color name|}}} | ||
|FJS name={{{FJS name|}}} | |FJS name={{{FJS name|}}} | ||
|Sound={{{Sound|}}}}}</includeonly><noinclude> | |Sound={{{Sound|}}} | ||
|Calc={{{Calc|}}}}}</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. | 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. | ||
| Line 14: | Line 16: | ||
** 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>\leq 2^{32}</math>, and you might happen to not encounter any problems when those are <math>\leq 2^{53}</math>. With larger numbers, you are almost guaranteed to get inaccurate results. | ** 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>\leq 2^{32}</math>, and you might happen to not encounter any problems when those are <math>\leq 2^{53}</math>. With larger numbers, you are almost guaranteed to get inaccurate results. | ||
* Large ratios: <code><nowiki>{{Infobox Interval|Ket=-2 0 0 1}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Monzo=-2 0 0 1}}</nowiki></code>. | * Large ratios: <code><nowiki>{{Infobox Interval|Ket=-2 0 0 1}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Monzo=-2 0 0 1}}</nowiki></code>. | ||
** In this form, '''Ratio''' and | ** In this form, '''Ratio''' (unless you specify it explicitly, in which case it will be printed as is) and most norms are omitted. | ||
** When use this form? Whenever numerator or denominator are too large. | ** When use this form? Whenever numerator or denominator are too large. | ||
* Irrational intervals: <code><nowiki>{{Infobox Interval|Ratio= | * Irrational intervals: <code><nowiki>{{Infobox Interval|Ratio=\pi|Cents=1981.795}}</nowiki></code>. | ||
** In this form, '''Factorization''', '''Subgroup''', '''Monzo''', '''FJS name''', | ** In this form, '''Factorization''', '''Subgroup''', '''Monzo''' (unless you specify it explicitly), '''FJS name''', norms are omitted. | ||
** When use this form? Whenever the interval is irrational. | ** When use this form? Whenever the interval is irrational. | ||
The template will add the page to the categories when appropriate: | The template will add the page to the categories when appropriate: | ||
* [[:Category:Rational intervals]] and [[:Category:Irrational intervals]]; | * [[:Category:Rational intervals]] and [[:Category:Irrational intervals]]; | ||
* [[:Category:2-limit]], [[:Category:3-limit]], ...; | |||
* [[:Category:Unnoticeable commas]], [[:Category:Small commas]], [[:Category:Medium commas]], [[:Category:Large commas]]; | * [[:Category:Unnoticeable commas]], [[:Category:Small commas]], [[:Category:Medium commas]], [[:Category:Large commas]]; | ||
* [[:Category:Superparticular]]; | |||
* [[:Category:Harmonics]], [[:Category:Octave-reduced harmonics]], [[:Category:Subharmonics]], [[:Category:Octave-reduced subharmonics]]; | |||
* [[:Category:Pages with internal sound examples]]; | * [[:Category:Pages with internal sound examples]]; | ||
* [[:Category:Todo:add interval name]]. | * [[:Category:Todo:add interval ratio]], [[:Category:Todo:add interval name]], [[:Category:Todo:add color name]], [[:Category:Todo:remove explicit ket notation]], [[:Category:Todo:remove explicit cents]], [[:Category:Todo:initialise Infobox Interval]], [[:Category:Todo:replace sup and sub with LaTeX]], [[:Category:Todo:remove manual line breaks]]. | ||
The template supports the following parameters: | The template supports the following parameters: | ||
| Line 35: | Line 40: | ||
| Ratio | | Ratio | ||
| 1, Ratio | | 1, Ratio | ||
| Frequency [[ratio]] of the interval. Specified explicitly, derived from page name or omitted. | | Frequency [[ratio]] of the interval. Specified explicitly, derived from page name or omitted. For irrational intervals, a LaTeX expression describing the interval (without <nowiki><math></nowiki>). | ||
|- | |- | ||
| Factorization | | Factorization | ||
| | | | ||
| Prime factorization of the ratio. Derived either from '''Ratio''' or '''Monzo''' or omitted for irrational intervals. | | Prime factorization of the ratio. Derived either from '''Ratio''' or '''Monzo''' or omitted for irrational intervals. | ||
|- | |- | ||
| [[Monzo]] | | [[Monzo]] | ||
| Ket, Monzo | | Ket, Monzo | ||
| Coefficients of the [[Monzo]] notation, separated by whitespaces. Derived from '''Ratio''' or specified or omitted for irrational intervals. | | Coefficients of the [[Monzo]] notation, separated by whitespaces. Derived from '''Ratio''' or specified or omitted for irrational intervals. If you specify one for an irrational interval, [[Template:Monzo]] with the provided argument will be printed. | ||
|- | |||
| [[Smonzos and svals|Subgroup monzo]] | |||
| | |||
| Shown instead of '''Factorization''' and '''Monzo''' when there is a sequence of 4+ zeros in ket notation. Derived either from '''Ratio''' or '''Monzo''' or omitted for irrational intervals. | |||
|- | |- | ||
| [[Cent]]s | | [[Cent]]s | ||
| Cents | | Cents | ||
| Size in [[cent]]s. Either derived from '''Ratio''' or '''Monzo''' or specified. | | Size in [[cent]]s. Either derived from '''Ratio''' or '''Monzo''' or specified for irrational intervals. | ||
|- | |||
| [[Comma|Comma size]] | |||
| Comma | |||
| Pass a non-empty string (for example, <code>yes</code> or <code>1</code>) to enable this entry. For specific values of '''Cents''', an interval is considered a comma. <math>(0; 3.5] \to</math> unnoticeable, <math>(3.5; 30] \to</math> small, <math>(30; 100] \to</math> medium, <math>(100; +∞) \to</math> large. If the interval is rational and is an integer power of another rational number, the entry is omitted. | |||
|- | |- | ||
| [[ | | [[Square superparticular|S-expression]]s | ||
| | | | ||
| For | | For a rational '''Comma''', a search for S-expressions of specific forms is done. | ||
|- | |- | ||
| Name | | Name | ||
| Line 63: | Line 72: | ||
| [[Kite's color notation|Color name]] | | [[Kite's color notation|Color name]] | ||
| Color 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]]. Default: omitted. | | 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]]. Pages with missing values go into [[:Category:Todo:add color name]]. Default: omitted. | ||
|- | |- | ||
| [[Functional Just System|FJS name]] | | [[Functional Just System|FJS name]] | ||
| FJS name | | FJS name | ||
| [[Functional Just System]] name. Provided, derived from '''Ratio''' or '''Monzo''' or omitted for irrational intervals. | | [[Functional Just System]] name. Provided, derived from '''Ratio''' or '''Monzo''' or omitted for irrational intervals. Use LaTeX syntax to provide custom names: <code>P5^{11}_{5}</code>. | ||
|- | |- | ||
| Special properties | | Special properties | ||
| | | | ||
| Currently implemented: [[Superparticular interval|superparticular]] for small ratios. | | Currently implemented: [[Superparticular interval|superparticular]] and [[square superparticular]] for small ratios, [[harmonic]]s and [[subharmonic]]s, including reduced ones, whether a ratio is [[octave reduction|reduced]]. | ||
|- | |||
| [[Tenney height]] | |||
| | |||
| Derived from '''Ratio''' or '''Monzo''' or omitted. | |||
|- | |- | ||
| | | [[Weil height]] | ||
| | | | ||
| | | Derived from '''Ratio''' or omitted. | ||
|- | |||
| [[Benedetti height]] | |||
| | |||
| Derived from '''Ratio''', if the result is small, or omitted. | |||
|- | |- | ||
| [[Harmonic entropy]] | | [[Harmonic entropy]] | ||
| Line 86: | Line 103: | ||
|- | |- | ||
| [[Xen-calc]] | | [[Xen-calc]] | ||
| | | Calc | ||
| A link to xen-calc. | | A link to xen-calc. Provided or derived from '''Ratio''' or '''Monzo''' or omitted. When provided (you should do that only for irrational intervals recognised by xen-calc, such as <code>sqrt(25/24)</code>), '''Calc''' is interpreted as the query, not the full link. It is urlencoded automatically. | ||
|} | |} | ||
== Examples == | == Examples == | ||
{{#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= | {{#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=hide}} | ||
Usage example for a small ratio ([[7/4]]): | Usage example for a small ratio ([[7/4]]): | ||
<pre> | <pre> | ||
| Line 101: | Line 118: | ||
</pre> | </pre> | ||
Usage example for a large ratio ([[ | Usage example for a large ratio ([[septimal ruthenia]]), which is also considered to be a comma: | ||
<pre> | <pre> | ||
{{Infobox Interval | {{Infobox Interval | ||
| Monzo = -263 88 0 44 | | Monzo = -263 88 0 44 | ||
| Name = septimal ruthenia, septiruthenia | | Name = septimal ruthenia, septiruthenia | ||
| | | Comma = yes | ||
}} | }} | ||
</pre> | </pre> | ||
Usage example for an irrational interval ([[ | Usage example for an irrational interval ([[sqrt(25/24)]]): | ||
<pre> | <pre> | ||
{{Infobox Interval | {{Infobox Interval | ||
| Ratio = | | Ratio = \sqrt{25/24} | ||
| Cents = | | Monzo = -3/2 -1/2 1 | ||
| Name = | | Cents = 35.336213 | ||
| Name = square root of 25/24 | |||
| Calc = sqrt(25/24) | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 131: | Line 150: | ||
== See also == | == See also == | ||
* [[Template:Infobox ET]] | * [[Template:Infobox ET]] | ||
* [[xen-calc]] – the according page of that tool gets linked automatically | * [[xen-calc]] – the according page of that tool gets linked automatically for rational intervals | ||
<nowiki>[[Category:Templates]]</nowiki> | <nowiki>[[Category:Templates]]</nowiki> | ||
</noinclude> | </noinclude> | ||