Template:Music/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Meg Taylor
(content)
 
imported>Meg Taylor
(copyedit)
 
Line 1: Line 1:
{{documentation subpage}}
==Benefits==
The template renders Western music notation of various types into Citizendium.
==Accidentals==
==Accidentals==
It correctly renders Unicode sharps ({{music|sharp}}) flats ({{music|flat}}) and natural signs ({{music|natural}}) in [[Internet Explorer]] which, unless a full Unicode font is chosen in Preferences, would otherwise display [[Mojibake|empty squares]]. The choice of fonts also improves the rendering in other browsers on [[Microsoft Windows]] such as [[Mozilla Firefox]] 2.0. See the table below to compare the results in your current browser.
It correctly renders Unicode sharps ({{music|sharp}}) flats ({{music|flat}}) and natural signs ({{music|natural}}) in [[Internet Explorer]] which, unless a full Unicode font is chosen in Preferences, would otherwise display [[Mojibake|empty squares]]. The choice of fonts also improves the rendering in other browsers on [[Microsoft Windows]] such as [[Mozilla Firefox]] 2.0. See the table below to compare the results in your current browser.
Line 55: Line 50:
!<nowiki>use {{music|</nowiki>''X''<nowiki>}}</nowiki>!!to get:
!<nowiki>use {{music|</nowiki>''X''<nowiki>}}</nowiki>!!to get:
|-
|-
|wholenote, whole, or semibreve||{{music|semibreve}}
|semibreve, wholenote, or whole||{{music|semibreve}}
|-
|-
|halfnote, half, or minim||{{music|minim}}
|minim, halfnote, or half||{{music|minim}}
|-
|-
|quarternote, quarter, or crotchet||{{music|crotchet}}
|crotchet, quarternote, or quarter||{{music|crotchet}}
|-
|-
|eighthnote, eighth, or quaver||{{music|quaver}}
|quaver, eighthnote, or eighth||{{music|quaver}}
|-
|-
|sixteenthnote, sixteenth, or semiquaver||{{music|semiquaver}}
|semiquaver, sixteenthnote, or sixteenth||{{music|semiquaver}}
|-
|-
|wholerest or semibreverest||{{music|semibreve rest}}
|semibreverest or wholerest||{{music|semibreve rest}}
|-
|-
|halfrest or minimrest||{{music|minim rest}}
|minimrest or halfrest||{{music|minim rest}}
|-
|-
|quarterrest or crotchetrest||{{music|crotchet rest}}
|crotchetrest or quarterrest||{{music|crotchet rest}}
|-
|-
|eighthrest or quaverrest||{{music|quaver rest}}
|quaverrest or eighthrest||{{music|quaver rest}}
|-
|-
|sixteenthrest or semiquaverrest||{{music|semiquaver rest}}
|semiquaverrest or sixteenthrest||{{music|semiquaver rest}}
|}
|}


Line 113: Line 108:


==Chord Symbols==
==Chord Symbols==
Two chord symbols are currently implemented: {{music|dim}} (dim) and {{music|halfdim}} (halfdim or dimslash), usually used to represent diminished and half-diminished chords, respectively. The markup:
Two chord symbols are currently implemented:{{music|dim}} (dim) and {{music|halfdim}} (halfdim or dimslash), usually used to represent diminished and half-diminished chords, respectively. The markup:


<nowiki>vii{{music|dim}} becomes vii{{music|dimslash}} in B{{music|flat}} minor by raising the G{{music|b}} to G{{music|natural}}</nowiki>
<nowiki>vii{{music|dim}} becomes vii{{music|dimslash}} in B{{music|flat}} minor by raising the G{{music|b}} to G{{music|natural}}</nowiki>

Latest revision as of 23:00, 26 February 2010

Accidentals

It correctly renders Unicode sharps ( ) flats ( ) and natural signs ( ) in Internet Explorer which, unless a full Unicode font is chosen in Preferences, would otherwise display empty squares. The choice of fonts also improves the rendering in other browsers on Microsoft Windows such as Mozilla Firefox 2.0. See the table below to compare the results in your current browser.

Without template With template
Flat
Natural
Sharp
double flat 𝄫 double flat
double sharp 𝄪 double sharp
half flat 𝄳 half flat
half sharp 𝄲 half sharp
flat stroke 𝄳 flat stroke

The template makes use of SVG to display double flat (double flat ), double sharp (double sharp ), and microtonal signs since the corresponding Unicode characters are not widely supported.

Examples

Flat sign

{{music|flat}}, {{music|b}}, or {{music|♭}} renders
{{music|doubleflat}}, {{music|bb}}, or {{music|𝄫}} renders double flat


Natural sign

{{music|natural}} or {{music|♮}} renders


Sharp sign

{{music|sharp}}, {{music|#}} or {{music|♯}} renders
{{music|doublesharp}}, {{music|##}} or {{music|𝄪}} renders double sharp


Sample text: The C
crops up very early in Beethoven's Symphony No. 3 in E

.

Notes and Rests

use {{music|X}} to get:
semibreve, wholenote, or whole semibreve
minim, halfnote, or half minim
crotchet, quarternote, or quarter crotchet
quaver, eighthnote, or eighth quaver
semiquaver, sixteenthnote, or sixteenth semiquaver
semibreverest or wholerest semibreve rest
minimrest or halfrest minim rest
crotchetrest or quarterrest crotchet rest
quaverrest or eighthrest quaver rest
semiquaverrest or sixteenthrest semiquaver rest

Note that some browsers support &#x2669; (♩) and &#x266a; (♪) for quarter and eighth notes, but since the display is often ugly and does not match any of the other (non-supported) notes and rests, this template does not use these characters.

Sample text: In place of the single whole note (semibreve

), Chopin writes quaver rest

minim
crotchet
quaver

, completely changing the profile of the music.

Clefs

use {{music|X}} to get:
treble treble clef
trebleclef treble clef
gclef G clef
alto alto clef
altoclef alto clef
tenor tenor clef
tenorclef tenor clef
cclef C clef
bass bass clef
bassclef bass clef
fclef F clef

Note that there is no graphical distinction between treble (trebleclef) and gclef; alto (altoclef), tenor (tenorclef) and cclef; bass (bassclef) and fclef. The difference is to preserve a difference in meaning and to make the caption text (for screen readers) different.

Scale degrees

Scale degrees are often represented as Arabic numerals with a hat on them. So that the root of a scale would be scale degree 1 . This template supports this usage with {{music|scale|1}}. Scale degrees 1–8 and 9 are supported. So a descending tetrachord could be written as scale degree 4 -scale degree 3 -scale degree 2 -scale degree 1


Chord Symbols

Two chord symbols are currently implemented:°

(dim) and ø
(halfdim or dimslash), usually used to represent diminished and half-diminished chords, respectively. The markup:

vii{{music|dim}} becomes vii{{music|dimslash}} in B{{music|flat}} minor by raising the G{{music|b}} to G{{music|natural}}

renders as:

vii°

becomes viiø
in B
minor by raising the G
to G