Jump to content

Template:Piano/doc

From Wikipedia, the free encyclopedia

Usage[edit]

This template shows the piano keys (C to B) and allows the inclusion of a mark over the notes passed by parameters

Named parameters[edit]

Besides the unnamed parameters, used to define the notes, it is possible to use the following additional parameters to control the form and size of the generated keyboard:

  • width e height: Define the external sizes of the keyboard (not counting the margin);
  • color1: Defines the color of marks used on white keys
  • color2: Defines the color of marks used on black keys

Examples[edit]

Major chord[edit]

{{Piano
| |___|___| | |___|_X_|___| | |___|___| | |___|___|___| |
|___|___|_X_|___|___|___|_X_|___|___|___|___|___|___|___|
}}

Minor seventh chord[edit]

{{Piano
| |___|___| | |___|___|_X_| | |___|___| | |___|___|___| |
|___|___|___|___|_X_|___|___|___|_X_|___|_X_|___|___|___|
}}

All notes[edit]

{{Piano
| |_X_|_X_| | |_X_|_X_|_X_| | |_X_|_X_| | |_X_|_X_|_X_| |
|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|
}}


All notes, changing the appearance[edit]

{{Piano
|width=250|height=112|color1=green|color2=blue
| |_X_|_X_| | |_X_|_X_|_X_| | |_X_|_X_| | |_X_|_X_|_X_| |
|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|_X_|
}}

See also[edit]