Template:Harmonics in equal/doc: Difference between revisions
Created page with "<includeonly><hr><small>Documentation transcluded from /doc</small></includeonly> === Usage === ==== Simple ==== For divisions of the octave (EDO), you can use one u..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly> | <includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly> | ||
This template generates a table for prime approximations in [[Equal-step tuning|equal-step tunings]]. | |||
=== Usage === | === Usage === | ||
==== Simple ==== | ==== Simple ==== | ||
For divisions of the octave ([[ | For divisions of the octave ([[edo]]), you can use one unnamed argument: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
| Line 10: | Line 12: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For other | For other divisions, you can use two or three unnamed arguments: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
| Line 39: | Line 41: | ||
* columns: number of primes to include, the default (8) means 2, 3, 5, 7, 11, 13, 17, 19 | * columns: number of primes to include, the default (8) means 2, 3, 5, 7, 11, 13, 17, 19 | ||
* start: Default is 1 (which means the prime 2), set to 2 to skip the octave. | * start: Default is 1 (which means the prime 2), set to 2 to skip the octave. | ||
* prec: Precision of absolute error (digits after the decimal point), default is estimated | * prec: Precision of absolute error (digits after the decimal point), default is estimated according to the step size. | ||
* title: Default is: "Approximations of prime intervals in ''name''" | * title: Default is: "Approximations of prime intervals in ''name''" By default, the names for divisions of 2/1, 3/1 and 3/2 will be displayed as 'edo', 'edt' and 'edf' respectively. When the denominator is 1, it will not be displayed. | ||
=== Examples === | === Examples === | ||
| Line 63: | Line 65: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
{{primes in equal| | {{primes in equal|15|7|3}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{primes in equal| | {{primes in equal|15|7|3}} | ||
==== Advanced ==== | ==== Advanced ==== | ||
Revision as of 19:49, 14 January 2022
This template generates a table for prime approximations in equal-step tunings.
Usage
Simple
For divisions of the octave (edo), you can use one unnamed argument:
{{primes in equal|<EDO number>}}
For other divisions, you can use two or three unnamed arguments:
{{primes in equal|<steps>|<numerator>|<denominator>}}
By default, the titles for divisions of 2/1, 3/1 and 3/2 will be displayed as 'edo', 'edt' and 'edf' respectively. When the denominator is 1, it will not be displayed.
Advanced
The template takes up to 7 arguments:
{{primes in edo
| steps = <number of steps>
| num = <numerator>
| denom = <denominator>
| columns = <column count>
| start = <start column>
| prec = <decimals of abs error>
| title = <your title>
}}
- steps: Number of steps. This parameter can also be given without the parameter name.
- num: Numerator of the interval that is divided equally. Can be used without parameter name. Default: 2.
- denom: Denominator of the interval that is divided equally. Can be used without parameter name. Default: 1.
- columns: number of primes to include, the default (8) means 2, 3, 5, 7, 11, 13, 17, 19
- start: Default is 1 (which means the prime 2), set to 2 to skip the octave.
- prec: Precision of absolute error (digits after the decimal point), default is estimated according to the step size.
- title: Default is: "Approximations of prime intervals in name" By default, the names for divisions of 2/1, 3/1 and 3/2 will be displayed as 'edo', 'edt' and 'edf' respectively. When the denominator is 1, it will not be displayed.
Examples
Basic
For edos it is sufficient to only input the number of steps:
{{primes in equal|31}}
For tritave or other prime divisions, two arguments is enough:
{{primes in equal|13|3}}
In the most general case, we can input the number of steps, numerator and denominator.
{{primes in equal|15|7|3}}
Advanced
Sometimes you want to see more or skip some lower columns and have to adjust the title:
{{primes in equal|13|3|columns=11|start=2|title=Primes in [[13edt]]}}
For large divisions (313edo in this example) the absolute error gets very small. The default precision gets calculated automatically, but if we want to increase it even further, we can set prec to a higher value. This is not recommended generally.
{{primes in equal|313|columns=9|start=2}}
{{primes in equal|313|columns=9|start=2|prec=5|title=Same with prec=5}}