Template:Harmonics in equal/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Sintel (talk | contribs)
No edit summary
m Advanced: fix and formatting
Line 25: Line 25:


<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
{{primes in edo
{{primes in equal
| steps = <number of steps>
| steps = <number of steps>
| num = <numerator>
| num = <numerator>
Line 36: Line 36:
</syntaxhighlight>
</syntaxhighlight>


* steps: Number of steps. This parameter can also be given without the parameter name.  
; steps
* num: Numerator of the interval that is divided equally. Can be used without parameter name. Default: 2.
: Number of steps. This parameter can also be given without the parameter name.  
* denom: Denominator of the interval that is divided equally. Can be used without parameter name. Default: 1.
; num
* columns: number of primes to include, the default (8) means 2, 3, 5, 7, 11, 13, 17, 19
: Numerator of the interval that is divided equally. Can be used without parameter name. Default: 2.
* start: Default is 1 (which means the prime 2), set to 2 to skip the octave.
; denom
* prec: Precision of absolute error (digits after the decimal point), default is estimated according to the step size.
: Denominator of the interval that is divided equally. Can be used without parameter name. Default: 1.
* 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.
; 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 ===
=== Examples ===

Revision as of 21:12, 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 equal
| 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}}

Template:Primes in equal

For tritave or other prime divisions, two arguments is enough:

{{primes in equal|13|3}}

Template:Primes in equal


In the most general case, we can input the number of steps, numerator and denominator.

{{primes in equal|15|7|3}}

Template:Primes in equal

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

Template:Primes in equal

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

Template:Primes in equal Template:Primes in equal