Template:Music: Difference between revisions
Better ugly then no symbols at all. The inline declaration only works on Windows. There are more OSs, you know? |
|||
Line 1: | Line 1: | ||
<includeonly><span class="music-symbol |
<includeonly><span class="music-symbol unicode">{{#switch: {{lc:{{{1}}}}} |
||
| ♭ |
| ♭ |
||
| b |
| b |
||
| flat = ♭ |
| flat = ♭ |
||
| 𝄫 |
| 𝄫 |
||
| bb |
|||
| double flat |
| double flat |
||
| doubleflat = [[File:Doubleflat.svg|8px|double flat]] |
| doubleflat = [[File:Doubleflat.svg|8px|double flat]] |
||
Line 25: | Line 25: | ||
| sharp = ♯ |
| sharp = ♯ |
||
| 𝄪 |
| 𝄪 |
||
| x |
|||
| ## |
| ## |
||
| double sharp |
| double sharp |
Revision as of 15:34, 28 March 2011
![]() | This template is used on approximately 7,700 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
![](http://upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png)
{{Music}} renders Western music notation of various types into Wikipedia and improves cross-browser support for music symbols. Per Wikipedia:Manual of Style (music)#Accidentals, this template (or the terms "flat", etc.) should be used in preference to the lowercase letter "b" and the number sign (#).
The images used here are categorized at commons:Category:Template:Music, so if you change an image used please try to remember to update the categorization.
Accidentals
The template correctly renders Unicode accidentals, sharps (♯), flats (♭), and natural signs (♮) in Internet Explorer which would otherwise display empty squares unless a full Unicode font is chosen in its Preferences. The choice of fonts also improves the rendering in other browsers on Microsoft Windows such as Mozilla Firefox. See the tables below to compare the results in your current browser. The template makes use of SVG to display double flat (), double sharp (
), and microtonal signs since the corresponding Unicode characters are not widely supported.
Symbol | Unicode entity |
Unicode result |
Template text |
Template result |
---|---|---|---|---|
Flat | ♭ |
♭ | {{music|flat}} or {{music|b}} or {{music|♭}} or {{flat}} |
♭ |
Natural | ♮ |
♮ | {{music|natural}} or {{music|n}} or {{music|♮}} |
♮ |
Sharp | ♯ |
♯ | {{music|sharp}} or {{music|#}} or {{music|♯}} or {{sharp}} |
♯ |
Double flat |
𝄫 |
𝄫 | {{music|doubleflat}} or {{music|bb}} or {{music|𝄫}} |
![]() |
Double sharp | 𝄪 |
𝄪 | {{music|doublesharp}} or {{music|##}} or {{music|x}} or {{music|𝄪}} |
![]() |
Triple flat |
|
{{music|tripleflat}} or {{music|bbb}} |
Unable to parse music symbol tripleflat | |
Triple sharp | ♯𝄪 |
♯𝄪 | {{music|triplesharp}} or {{music|###}} or {{music|#x}} |
Unable to parse music symbol triplesharp |
Half flat |
𝄳 |
𝄳 | {{music|halfflat}} or {{music|d}} |
![]() |
Half sharp |
𝄲 |
𝄲 | {{music|halfsharp}} or {{music|t}} |
![]() |
Flat stroke |
𝄳 |
𝄳 | {{music|flatstroke}} |
![]() |
Double flat stroke |
|
{{music|doubleflatstroke}} |
![]() | |
Three quarter flat | |
{{music|threequarterflat}} or {{music|db}} |
![]() | |
Three quarter sharp | |
{{music|threequartersharp}} or {{music|#t}} |
![]() | |
Septimal quarter tone (-) | |
{{music|7}} or{{music|septimal}} |
Unable to parse music symbol 7 | |
Septimal quarter tone (+) | |
{{music|L}} or{{music|septimal plus}} |
Unable to parse music symbol L | |
11th partial [53 cents] (-) | |
{{music|down}} or {{music|11U}} |
Unable to parse music symbol down | |
11th partial [difference between 11:8 & 4:3] (+) | |
{{music|up}} or {{music|11}} |
Unable to parse music symbol up | |
13th partial [26.8 cents] (-) | |
{{music|E1}} or{{music|13U}} |
Unable to parse music symbol 13U | |
13th partial [difference between 13:8 & 8:5] (+) | |
{{music|13}} or{{music|thirteen}} |
Unable to parse music symbol 13 | |
17th partial [34.28 cents] (-) | |
{{music|17 upside down}} or {{music|L1}} or {{music|17U}} |
Unable to parse music symbol 17U | |
17th partial [difference between 17:16 & 25:24] (+) | |
{{music|17}} |
Unable to parse music symbol 17 | |
19th partial [18.13 cents] (-) | |
{{music|19}} |
Unable to parse music symbol 19 | |
19th partial [difference between 19:16 & 6:5] (+) | |
{{music|19U}} |
Unable to parse music symbol 19U | |
23rd partial [38.05 cents] (+) | |
{{music|23}} |
Unable to parse music symbol 23 | |
29th partial [11.98 cents] (+) | |
{{music|29}} |
Unable to parse music symbol 29 | |
31st partial [-56.77 cents] (-) | |
{{music|1E}} or{{music|31U}} |
Unable to parse music symbol 31U | |
31st partial [56.77 cents] (+) | |
{{music|31}} |
Unable to parse music symbol 31 | |
37th partial [Difference between 37/32 and 75/64] (-) | |
{{music|37}} |
Unable to parse music symbol 37 | |
37th partial [23.24 cents] (+) | |
{{music|37U}} |
Unable to parse music symbol 37U | |
Syntonic comma [+21.51 cents] (+) | |
{{music|plus}} |
Unable to parse music symbol plus | |
Syntonic comma [-21.51 cents] (-) | |
{{music|minus}} |
Unable to parse music symbol minus | |
Septimal quarter tone [-48.7 cents] (-) | |
{{music|check up}} |
Unable to parse music symbol check up | |
Septimal quarter tone [+48.7 cents] (+) | |
{{music|check}} |
Unable to parse music symbol check | |
Sixth tone [+33.33 cents] (+) | |
{{music|half check up}} |
Unable to parse music symbol half check up | |
Sixth tone [-33.33 cents] (-) | |
{{music|half check}} |
Unable to parse music symbol half check |
- Sample text
The C♯ crops up very early in Beethoven's Symphony No. 3 in E♭.
Some browsers and typefaces support ♩
(♩) and ♪
(♪) for quarter and eighth notes, as well as ♫
(♫) and ♬
(♬) for beamed eighth-note and sixteenth-note pairs respectively, but since the display of these characters 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.
Note that there is no graphical distinction between treble clef and G-clef; alto clef, tenor clef and C-clef; bass clef and F-clef. The names preserve a difference in meaning and make the caption text (for screen readers) different.
For a general time signature, use {{music|time|top number|bottom number}}
. This makes use of {{Time signature}}; if an article uses many invocations of {{Music}} it can lead to excessive post-expand include size; calling {{Time signature}} will reduce that.
Scale degrees
Scale degrees are often represented as Arabic numerals with a hat on them and thus the root of a scale is .
- Sample text
A descending tetrachord could be written as -
-
-
.
Chord | Template text |
Template result |
---|---|---|
Diminished | {{music|dim}} or {{music|dimdeg}} |
o or ° |
Half-diminished | {{music|halfdim}} or {{music|dimslash}} |
ø |
Augmented | {{music|+}} or {{music|aug}} |
+ |
Major | {{music|Δ}} or {{music|delta}} or {{music|major}} or {{music|maj}} |
Unable to parse music symbol major |
Root position | {{music|53}} or {{music|53 chord}} |
Unable to parse music symbol 53 |
First inversion | {{music|63}} or {{music|63 chord}} or {{music|6 chord}} |
Unable to parse music symbol 6 chord or Unable to parse music symbol 63 |
Second inversion | {{music|64}} or {{music|64 chord}} |
Unable to parse music symbol 64 |
Seventh chord root position | {{music|7 chord}} |
Unable to parse music symbol 7 chord |
Seventh chord first inversion | {{music|65}} or {{music|65 chord}} |
Unable to parse music symbol 65 |
Seventh chord second inversion | {{music|43 chord}} |
Unable to parse music symbol 43 chord |
Seventh chord third inversion | {{music|2}} or {{music|2 chord}} or {{music|42}} |
Unable to parse music symbol 2 or Unable to parse music symbol 42 |
Walter Piston's notation of viio | {{music|07 chord}} |
Unable to parse music symbol 07 chord |
Ninth chord first inversion | {{music|75}} or {{music|75 chord}} |
Unable to parse music symbol 75 |
Ninth chord second inversion | {{music|65}} or {{music|65 chord}} |
Unable to parse music symbol 65 |
Ninth chord third inversion | {{music|643}} or {{music|643 chord}} |
Unable to parse music symbol 643 |
Ninth chord fourth inversion | {{music|642}} or {{music|642 chord}} |
Unable to parse music symbol 642 |
- Sample text
- viio7 becomes viiø7 in B♭ minor by raising the G♭ to G♮.
- The F♯Unable to parse music symbol major7 is used to great effect in the last measure of the piece.
Key signatures
Key signatures must be typed in using the names of the articles themselves on keys. Note that there is no visual difference between the major and minor key signatures, but the alt text is different.
Sharps/Flats | Key signature (major) | Template text |
Template result |
Key signature (minor) | Template text |
Template result |
---|---|---|---|---|---|---|
7♯ | C♯ major | {{music|c-sharp major}} |
Unable to parse music symbol c-sharp major | A♯ minor | {{music|a-sharp minor}} |
Unable to parse music symbol a-sharp minor |
6♯ | F♯ major | {{music|f-sharp major}} |
Unable to parse music symbol f-sharp major | D♯ minor | {{music|d-sharp minor}} |
Unable to parse music symbol d-sharp minor |
5♯ | B major | {{music|b major}} |
Unable to parse music symbol b major | G♯ minor | {{music|g-sharp minor}} |
Unable to parse music symbol g-sharp minor |
4♯ | E major | {{music|e major}} |
Unable to parse music symbol e major | C♯ minor | {{music|c-sharp minor}} |
Unable to parse music symbol c-sharp minor |
3♯ | A major | {{music|a major}} |
Unable to parse music symbol a major | F♯ minor | {{music|f-sharp minor}} |
Unable to parse music symbol f-sharp minor |
2♯ | D major | {{music|d major}} |
Unable to parse music symbol d major | B minor | {{music|b minor}} |
Unable to parse music symbol b minor |
1♯ | G major | {{music|g major}} |
Unable to parse music symbol g major | E minor | {{music|e minor}} |
Unable to parse music symbol e minor |
0 | C major | {{music|c major}} |
Unable to parse music symbol c major | A minor | {{music|a minor}} |
Unable to parse music symbol a minor |
1♭ | F major | {{music|f major}} |
Unable to parse music symbol f major | D minor | {{music|d minor}} |
Unable to parse music symbol d minor |
2♭ | B♭ major | {{music|b-flat major}} |
Unable to parse music symbol b-flat major | G minor | {{music|g minor}} |
Unable to parse music symbol g minor |
3♭ | E♭ major | {{music|e-flat major}} |
Unable to parse music symbol e-flat major | C minor | {{music|c minor}} |
Unable to parse music symbol c minor |
4♭ | A♭ major | {{music|a-flat major}} |
Unable to parse music symbol a-flat major | F minor | {{music|f minor}} |
Unable to parse music symbol f minor |
5♭ | D♭ major | {{music|d-flat major}} |
Unable to parse music symbol d-flat major | B♭ minor | {{music|b-flat minor}} |
Unable to parse music symbol b-flat minor |
6♭ | G♭ major | {{music|g-flat major}} |
Unable to parse music symbol g-flat major | E♭ minor | {{music|e-flat minor}} |
Unable to parse music symbol e-flat minor |
7♭ | C♭ major | {{music|c-flat major}} |
Unable to parse music symbol c-flat major | A♭ minor | {{music|a-flat minor}} |
Unable to parse music symbol a-flat minor |
Symbol | Unicode entity |
Unicode result |
Template text |
Template result |
---|---|---|---|---|
Left repeat | 𝄆 | 𝄆 | {{Music|left repeat}}
|
Unable to parse music symbol left repeat |
Right repeat | 𝄇 | 𝄇 | {{Music|right repeat}}
|
Unable to parse music symbol right repeat |
Changing the size
Most symbols generated by this template, including double flats and sharps, notes, rests and key signatures, use images, as corresponding Unicode characters either don't exist or are not supported by all browsers. Unlike characters, images don't scale along with the surrounding text. To change the size of an image, to match the font size of the text in which it is placed, use the |size=
parameter. Example: