Template:Primes in edo/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
add documentation and example for new 'prec' parameter
m Fix typos and some formatting improvements
Line 4: Line 4:
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
{{primes in edo
{{primes in edo
| edo=<EDO of interest, default is 12>
| edo = <EDO of interest, default is 12>
| columns=<coulumn count, default is 8>
| columns = <column count, default is 8>
| start=<start column, default is 1>
| start = <start column, default is 1>
| prec=<decimals of abs error, default is 1>
| prec = <decimals of abs error, default is 1>
| title=<your title>
| title = <your title>
}}
}}
</syntaxhighlight>
</syntaxhighlight>
Line 15: Line 15:


; edo: (this parameter can also be given without the parameter name)
; edo: (this parameter can also be given without the parameter name)
; columns: amount 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 1
; prec: precision of absolute error (digits after the decimal point), default is 1
; title: default is Approsimations of primary intervals in ''edo'' EDO
; title: default is Approximations of primary intervals in ''edo'' EDO


=== Examples ===
=== Examples ===

Revision as of 05:50, 13 January 2021

Usage

{{primes in edo
| edo = <EDO of interest, default is 12>
| columns = <column count, default is 8>
| start = <start column, default is 1>
| prec = <decimals of abs error, default is 1>
| title = <your title>
}}

This template takes up to 5 arguments:

edo
(this parameter can also be given without the parameter name)
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 1
title
default is Approximations of primary intervals in edo EDO

Examples

Although the template does also work without any arguments, one argument should be seen as mandatory: the EDO number.

Basic

In most cases it will be sufficient to input just the EDO and nothing else.

{{primes in edo|17}}

Script error: No such module "primes_in_edo".

Advanced

Sometimes you want to see more or skip some lower columns and have to adjust the title

{{primes in edo|19|columns=11|start=2|title=Primes in [[19edo]]}}

Script error: No such module "primes_in_edo".

For large EDOs (318edo in this example) the absolute error gets very small, so stick to the fixed format, we have to add digits after the decimal point. This can be achieved by setting the parameter prec to a value higher than 1 (which is the default); compare the following two tables:

{{primes in edo|318|columns=9|start=2}}
{{primes in edo|318|columns=9|start=2|prec=2|title=Same with prec=2}}

Script error: No such module "primes_in_edo". Script error: No such module "primes_in_edo".