Templat:Music/doc
Ini ialah sublaman pendokumenan untuk Templat:Music. Ia mempunyai maklumat penggunaan, kategori dan kandungan lain yang bukan sebahagian daripada laman templat templat laman. |
Benefits
[sunting sumber]The template renders Western music notation of various types into Wikipedia.
Accidentals
[sunting sumber]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 sharp | 𝄪 | |
half flat | 𝄳 | |
half sharp | 𝄲 | |
flat stroke | 𝄳 |
The template also makes use of SVG to display double flat () and double sharp () signs since the corresponding Unicode characters are not widely supported.
Examples
[sunting sumber]Flat sign
[sunting sumber]{{music|flat}}
, {{music|b}}
, or {{music|♭}}
renders ♭
{{music|doubleflat}}
, {{music|bb}}
, or {{music|𝄫}}
renders
Natural sign
[sunting sumber]{{music|natural}}
or {{music|♮}}
renders ♮
Sharp sign
[sunting sumber]{{music|sharp}}
, {{music|#}}
or {{music|♯}}
renders ♯
{{music|doublesharp}}
, {{music|##}}
or {{music|𝄪}}
renders
- Sample text: The C♯ crops up very early in Beethoven's Symphony No. 3 in E♭.
Notes and Rests
[sunting sumber]Note that some browsers support ♩ (♩) and ♪ (♪) 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 (), Chopin writes , completely changing the profile of the music.
Clefs
[sunting sumber]use {{music|X}} | to get: |
---|---|
treble | |
trebleclef | |
gclef | |
alto | |
altoclef | |
tenor | |
tenorclef | |
cclef | |
bass | |
bassclef | |
fclef |
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
[sunting sumber]Scale degrees are often represented as Arabic numerals with a hat on them. So that the root of a scale would be . 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 ---
Chord Symbols
[sunting sumber]Two chord symbols are currently implemented: o (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:
viio becomes viiø in B♭ minor by raising the G♭ to G♮
Goals
[sunting sumber]- The template code should be easy to remember.
- The template should improve cross-browser support for music symbols.
- The template should reduce edit squabbles between Unicode sharps and flats versus ASCII #'s and b's. It should not be used to create new edit wars.