Nothing Special   »   [go: up one dir, main page]

Jump to content

Template:Music/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Hyacinth (talk | contribs)
Documenting the new {{{size}}} parameter
Line 440: Line 440:
| {{Music|right repeat}}
| {{Music|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 <tt><nowiki>{{{size}}}</nowiki></tt> parameter. Example:
*<tt>{{tag|big|content={{tag|big|content=G{{tlc|music|bb|size{{=}}x16px}}}}}}</tt> &rarr; <big><big>G{{music|bb|size=x16px}}</big></big>


==See also==
==See also==

Revision as of 22:49, 15 February 2014

{{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 and remember to update the categorization.

Accidentals

The template correctly renders Unicode 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 flat), double sharp (double sharp), and microtonal signs since the corresponding Unicode characters are not widely supported.

Symbol Unicode
entity
Unicode
result
Template
text
Template
result
Flat &#x266d; {{music|flat}}
or {{music|b}}
or {{music|♭}}
or {{flat}}
Natural &#x266e; {{music|natural}}
or {{music|♮}}
Sharp &#x266f; {{music|sharp}}
or {{music|#}}
or {{music|♯}}
or {{sharp}}
Double
flat
&#x1D12B; 𝄫 {{music|doubleflat}}
or {{music|bb}}
or {{music|𝄫}}
double flat
Double sharp &#x1D12A; 𝄪 {{music|doublesharp}}
or {{music|##}}
or {{music|x}}
or {{music|𝄪}}
double sharp
Triple
flat
{{music|tripleflat}}
or {{music|bbb}}
triple flat
Triple sharp {{music|triplesharp}}
or {{music|###}}
or {{music|#x}}
triple sharp
Half
flat
&#x1D133; 𝄳 {{music|halfflat}}
or {{music|d}}
half flat
Half
sharp
&#x1D132; 𝄲 {{music|halfsharp}}
or {{music|t}}
half sharp
Flat
stroke
&#x1D133; 𝄳 {{music|flatstroke}} flat stroke
Double
flat
stroke
{{music|doubleflatstroke}} double flat stroke
Three quarter flat {{music|threequarterflat}}
or {{music|db}}
three quarter flat
Three quarter sharp {{music|threequartersharp}}
or {{music|#t}}
three quarter sharp
Septimal quarter tone (-) {{music|7}}
or {{music|septimalquartertone-}}
7
Septimal quarter tone (+) {{music|L}}
or {{music|septimalquartertone+}}
Error using {{music}}: unable to parse music symbol "septimalquartertone+"
Eleventh partial [53 cents] (-) {{music|down}}
or {{music|Down}}
Eleventh partial [difference between 11:8 & 4:3] (+) {{music|up}}
or {{music|Up}}
Thirteenth partial [26.8 cents] (-) {{music|13upsidedown}}
or {{music|thirteenupsidedown}}
or {{music|13U}}
Error using {{music}}: unable to parse music symbol "13upsidedown"
Thirteenth partial [difference between 13:8 & 8:5] (+) {{music|13}}
or {{music|thirteen}}
13
Seventeenth partial [34.28 cents] (-) {{music|17 upside down}} Error using {{music}}: unable to parse music symbol "17upsidedown"
Seventeenth partial [difference between 17:16 & 25:24] (+) {{music|17}} 17
Nineteenth partial [18.13 cents] (-) {{music|19}} 19
Nineteenth partial [difference between 19:16 & 6:5] (+) {{music|19 upside down}} Error using {{music}}: unable to parse music symbol "19upsidedown"
Sample text

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

Notes and rests

Symbol Unicode
entity
Unicode
result
Template
text
Template
result
Whole
note
&#x1d15d; 𝅝 {{music|wholenote}}
or {{music|whole}}
or {{music|semibreve}}
whole note
Half
note
&#x1d15e; 𝅗𝅥 {{music|halfnote}}
or {{music|half}}
or {{music|minim}}
half note
Quarter
note
&#x1d15f; 𝅘𝅥 {{music|quarternote}}
or {{music|quarter}}
or {{music|crotchet}}
quarter note
Eighth
note
&#x1d160; 𝅘𝅥𝅮 {{music|eighthnote}}
or {{music|eighth}}
or {{music|quaver}}
eighth note
Beamed
eighth
notes
{{music|eighthnotebeam}}
or {{music|eighthbeam}}
or {{music|quaverbeam}}
beamed eighth notes
Sixteenth
note
&#x1d161; 𝅘𝅥𝅯 {{music|sixteenthnote}}
or {{music|sixteenth}}
or {{music|semiquaver}}
sixteenth note
Beamed
sixteenth
notes
{{music|sixteenthnotebeam}}
or {{music|sixteenthbeam}}
or {{music|semiquaverbeam}}
beamed sixteenth notes
Thirty-
second
note
{{music|thirty-secondnote}}
or {{music|thirty-second}}
or {{music|demisemiquaver}}
thirty-second note
Dot . . {{music|dot}} .
Dotted quarter
note
&#x1d161;. 𝅘𝅥𝅯. {{music|dottedquarter}}
or {{music|dottedcrotchet}}
dotted quarter note.
Dotted half
note
&#x1d15e;. 𝅗𝅥. {{music|dottedhalf}}
or {{music|dottedminim}}
dotted half note.
Whole
rest
&#x1d13b; 𝄻 {{music|wholerest}}
or {{music|semibreverest}}
whole rest
Half
rest
&#x1d13c; 𝄼 {{music|halfrest}}
or {{music|minimrest}}
half rest
Quarter
rest
&#x1d13d; 𝄽 {{music|quarterrest}}
or {{music|crotchetrest}}
quarter rest
Eighth
rest
&#x1d13e; 𝄾 {{music|eighthrest}}
or {{music|quaverrest}}
eighth rest
Sixteenth
rest
&#x1d13f; 𝄿 {{music|sixteenthrest}}
or {{music|semiquaverrest}}
sixteenth rest
Thirty-
second
rest
{{music|thirtysecondrest}}
or {{music|demisemiquaverrest}}
thirty-second rest

Some browsers and typefaces support &#x2669; (♩) and &#x266a; (♪) for quarter and eighth notes, as well as &#x266b; (♫) and &#x266c; (♬) 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 (whole note), Chopin writes eighth rest half note quarter note eighth note, completely changing the profile of the music.

Clefs

Symbol Template
text
Template
result
Treble clef
or G-clef
{{music|treble}}
or {{music|trebleclef}}
or {{music|gclef}}
treble clef
Alto
clef
{{music|alto}}
or {{music|altoclef}}
alto clef
Tenor
clef
{{music|tenor}}
or {{music|tenorclef}}
tenor clef
C-clef {{music|cclef}} C clef
Bass clef
or F-clef
{{music|bass}}
or {{music|bassclef}}
or {{music|fclef}}
bass clef
Neutral clef {{music|neutral}}
or {{music|neutralclef}}
||

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.

Time signatures

Symbol Template
text
Template
result
common-time {{music|common-time}} common time
cut-time {{music|cut-time}}
or {{music|alla-breve}}
cut time
2/4 {{music|time|2|4}} 2
4
3/4 {{music|time|3|4}} 3
4
6/8 {{music|time|6|8}} 6
8
9/8 {{music|time|9|8}} 9
8
12/8 {{music|time|12|8}} 12
8

For a general time signature, use {{music|time|top number|bottom number}}. This makes use of Template:Time signature, which should not be used on its own.

Scale degrees

Scale degrees are often represented as Arabic numerals with a hat on them and thus the root of a scale is scale degree 1.

Scale degree Template
text
Template
result
1 {{music|scale|1}} scale degree 1
2 {{music|scale|2}} scale degree 2
3 {{music|scale|3}} scale degree 3
4 {{music|scale|4}} scale degree 4
5 {{music|scale|5}} scale degree 5
6 {{music|scale|6}} scale degree 6
7 {{music|scale|7}} scale degree 7
8 {{music|scale|8}} scale degree 8
9 {{music|scale|9}} scale degree 9
Sample text

A descending tetrachord could be written as scale degree 4-scale degree 3-scale degree 2-scale degree 1.

Chord symbols

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}}
Δ
Sample text

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

III becomes III+ in G minor by raising the F to Fdouble sharp.

The FΔ7 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}} C-sharp major A minor {{music|a-sharp minor}} A-sharp minor
6 F major {{music|f-sharp major}} F-sharp major D minor {{music|d-sharp minor}} D-sharp minor
5 B major {{music|b major}} B major G minor {{music|g-sharp minor}} G-sharp minor
4 E major {{music|e major}} E major C minor {{music|c-sharp minor}} C-sharp minor
3 A major {{music|a major}} A major F minor {{music|f-sharp minor}} F-sharp minor
2 D major {{music|d major}} D major B minor {{music|b minor}} B minor
1 G major {{music|g major}} G major E minor {{music|e minor}} E minor
0 C major {{music|c major}} C major A minor {{music|a minor}} A minor
1 F major {{music|f major}} F major D minor {{music|d minor}} D minor
2 B major {{music|b-flat major}} B-flat major G minor {{music|g minor}} G minor
3 E major {{music|e-flat major}} E-flat major C minor {{music|c minor}} C minor
4 A major {{music|a-flat major}} A-flat major F minor {{music|f minor}} F minor
5 D major {{music|d-flat major}} D-flat major B minor {{music|b-flat minor}} B-flat minor
6 G major {{music|g-flat major}} G-flat major E minor {{music|e-flat minor}} E-flat minor
7 C major {{music|c-flat major}} C-flat major A minor {{music|a-flat minor}} A-flat minor

Bars

Symbol Unicode
entity
Unicode
result
Template
text
Template
result
Left repeat &#x1D106; 𝄆 {{Music|left repeat}} left repeat
Right repeat &#x1D107; 𝄇 {{Music|right repeat}} 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:

  • <big><big>G{{music|bb|size=x16px}}</big></big>Gdouble flat

See also