finaleffect

Illustrator Tutorial: Drawing a Piano Keyboard


final effect

This step by step tutorial demonstrates drawing a keyboard illustration using rectangles, grids, move and transform effects.

1. Create a New Document

Create a new document named “keyboard” with a custom size of 500 px width and 120 px height. Press OK.

Screenshot of New Document Window

2. Draw a black rectangle for the keyboard background

Begin with drawing the main background of the keyboard. Select the Rectangle Tool and set the fill to black and stroke to none as shown in the Toolbox below. Click once on the artboard and define a rectangle 500 px wide by 120 px height. Press OK.

Screenshot of black rectangle with options

With the black rectangle selected, go to the Transform Panel and position the lower left corner at X: 0 px and Y: 0 px, as shown below.

Transform Panel with X and Y settings 0

With the black rectangle selected, round the corners by selecting from the menu Effect, Convert to Shape, Rounded Rectangle. Using the same width and height dimensions of the original rectangle for the Absolute values, set the rectangle to Width: 500 px and Height: 120 px, with a corner radius of 9 px. Press OK.

Screenshot of making rectangle rounded

Rename the layer “black background” and lock the layer.

Screenshot of layer panel

3. Draw 52 white keys

Create a new layer for the white keys by selecting the Create New Layer icon on the Layers panel as shown with the red circle below. Rename the layer “white keys”.

Screenshot of layers panel with new layer

Draw the leftmost key. Select the Rectangle Tool and set the fill to white and stroke to black (1 px) as shown in the Toolbox below. Click once on the artboard and define a rectangle 9 px wide by 50 px height. Press OK.

Screenshot of white key rectangle

With the white rectangle selected, go to the Transform Panel and position the lower left corner to X: 16 px and Y: 16 px, as shown below.

Transform Panel with X and Y 16

Round the edges of the key slightly by selecting from the menu Effect, Convert to Shape, Rounded Rectangle. Using the same width and height dimensions of the original rectangle for the Absolute values, set the rectangle to Width: 9 px and Height: 50 px, with a corner radius of 2 px. Press OK.

Screenshot of making white key rounded rectangle

With the white key selected, make duplicates of the key using the menu option Effect, Distort & Transform, Transform. In the Move section, set the Horizontal to 9 px, make sure the Vertical is set to 0 px, set number of copies to 51, and check the Preview box to confirm that the keys appear as below. Press OK.

Screenshot of transform 51 keys

Create a rectangle to cover the rounded edges of the top of the keys. With no objects selected, select the Rectangle Tool and set the fill to black and stroke to none as shown in the Toolbox below. Click once on the artboard and define a rectangle 470 px wide by 5 px height. Press OK.

Screenshot of add black strip to top of keys

Position the strip above the keys to cover the rounded edges at the top. Using the Transform Panel, set the bottom center position to X: 250 px and Y: 62 px.

Screenshot of position black strip

Lock this layer and a new layer will be created to draw the black keys in the next step.

4. Draw the black keys

Create a new layer named “black keys” as shown below.

Screenshot of layer panel

Draw the first black key.

With no objects selected, Select the Rectangle Tool and set the fill to black and stroke to none as shown in the Toolbox below. Click once on the artboard and define a rectangle 5 px wide by 30 px height. Press OK.

Screenshot of black key rectangle

Position the black key.

With the black key selected, use the Transform Panel to position it. Set the top center position to X: 25.5 px and Y: 62 px. The next few steps will set up a group of keys that can be duplicated across.

Screenshot of position black key

Duplicate the first black key to create the second black key.

With the black key selected, access the Move options by double clicking the Selection Tool in the Toolbox (circled in red below). Check the Preview box to see where the resulting key will be. Set the Horizontal position to 17 px and make sure the Vertical is 0 px. Click copy, and two keys will be positioned as shown below.

Screenshot of copy key 1

Result:

Screenshot of results with 2 keys

Duplicate the second black key to create the third black key.

With the second black key selected, access the Move options again by double clicking the Selection Tool in the Toolbox (circled in red below). Check the Preview box to see where the resulting key will be. Set the Horizontal position to 10 px and make sure the Vertical is 0 px. Click copy, and three keys will be positioned as shown below.

Screenshot of copy key 2

Result:

Screenshot of results with 3 keys

Duplicate the third black key to create the fourth black key.

With the third black key selected, access the Move options again by double clicking the Selection Tool in the Toolbox (circled in red below). Check the Preview box to see where the resulting key will be. Set the Horizontal position to 17 px and make sure the Vertical is 0 px. Click copy, and four keys will be positioned as shown below.

Screenshot of copy key 3

Result:

Screenshot of results with 4 keys

Duplicate the fourth black key to create the fifth black key.

With the fourth black key selected, access the Move options again by double clicking the Selection Tool in the Toolbox (circled in red below). Check the Preview box to see where the resulting key will be. Set the Horizontal position to 9.5 px and make sure the Vertical is 0 px. Click copy, and five keys will be positioned as shown below.

Screenshot of copy key 4

Result:

Screenshot of results with 5 keys

Duplicate the fifth black key to create the sixth black key.

With the fifth black key selected, repeat the Move from the last step by pressing Cmd+D (Mac) or Ctrl+D (PC). The sixth key is now positioned as shown below. (If you need to access the Move options again to copy the fourth key, the Horizontal is 9.5 px.)

Result:

Screenshot of results with 6 keys

Now the keys can be selected and duplicated across. Only keys two through six will repeat. Select these five black keys (shown in green below) using the Selection Tool to marquee around them. Because the other layers are locked, you will only select the black keys. From the menu, choose Effect, Transform Effect, Transform. In the Move section, set the Horizontal to 63 px, make sure the Vertical is set to 0 px, set number of copies to 6, and check the Preview box to confirm that the keys appear as below. Press OK.

Screenshot of transform effect for black keys

Lock the “black keys” layer, and all that’s left is adding the staff and musical elements.

5. Draw staff

Create a new layer named “staff” as shown below.

Screenshot of layer panel

Select the Rectangle Tool, set the fill to none and choose a neutral color of choice for the stroke with the stroke size set to 0.5 px. The color used here is from the Neutrals 3 swatch library that came with CS3. A metallic color might be nice depending on your project. Click once on the artboard and define a rectangle 470 px wide by 20 px height. Press OK.

Screenshot of draw rectangle for staff

With the rectangle selected, select from the menu Object, Path, Split into Grid. Set the Number of Rows to 4, with a Gutter of 0 px. You may have to set the Number of Rows to 2 and change the gutter to 0 before you are able to set the Number of Rows to 4. Leave the Number of Columns set to 1. Press OK.

Screenshot of split rectangle into grid for staff

Position the staff with the Transform Panel, setting the center position to X: 250 px and Y: 91 px.

Screenshot of positioning staff

Click on the artboard to deselect the staff.

Screenshot of keyboard with staff

Lock the “staff” layer, and a new layer will be created for the music elements in the next step.

6. Add music

Now the illustration is ready for the final touches of adding notes and musical elements. You may have clip art or images to use. I found a font from www.fontspace.com named MetDemo that has musical elements, which I used for this exercise.

Create a new layer named “music”.

Screenshot of layer panel

The symbols below were created using the Text Tool and the MetDemo font with a Font Size of 16 px. The fill color is the same neutral color as the staff stroke color, and the stroke for the text is None. Type the symbols and notes of your choosing. (Alprazolam) The letters/symbols : (colon), K, Q, and W in the MetDemo font creates the treble clef, sharp symbol, and quarter and half notes.

Screenshot of musical notations

Once you have typed your chosen symbols and notes, use the Selection Tool to select all of the text and select from the menu Type, Create Outlines. Still selected, Ungroup the letters with the shortcut Sh+Cmd+G (Mac) or Sh+Ctrl+G (PC), or access from the menu with Object, Ungroup. Now all pieces can be selected, moved and positioned into the staff area individually, using the Selection Tool or selecting them from the layers panel.

Screenshot of layers panel showin music sublayers

My tune is from one of my Phantom of the Opera favorites, simplified and spread out to fill the space above the keys.

Screenshot of final illustration

Experiment with different color backgrounds, gradients and artistic effects. Scale the image or use portions of the keyboard to suit your print or web project.

To download the source file for this tutorial, you will need to login as a member.
Sign up today to access all exclusive members content!

premium content lock

26 thoughts on “Illustrator Tutorial: Drawing a Piano Keyboard”

  1. >Ekhm<… Sorry, but I don’t need Illustrator to do such a thing 😛 Inkscape is doing it well enough 🙂

  2. Really interesting tutorial. You would think that it would be easy to create a piano keyboard, but there really is a lot more to it than you would think. Great job though. Hey check out my blog too please. logoblog.org. We are having a design contest and there are great prize opportunities. Thanks!

  3. heyy great tutorial :)… i am just stuck at the last part i installed the fonnt i can see it in the illustrator fonts but then when i try to do the musical notes it doesnt work…and it write like alphabets :S… plz help

  4. Yeah! I’m learning! This is like the fourth tutorial i made so i’m learning illustrator ha ha ha

    nice one, but i was thinking on one of those yamaha pianos. i call them “piano de cola”. Thanks for the help dude

  5. Best tips to play the piano There are lots of techniques to
    practice the piano. I like to divide a piece into small parts, then put them together to make a longer tune till you reach a complete music sentence.
    Practicing with one hand at a time usually is the best
    way. Try to do …

  6. I was wondering if you ever thought of changing the structure
    of your blog? Its very well written; I love what
    youve got to say. But maybe you could a little more in the way of content
    so people could connect with it better. Youve got an awful lot of text for
    only having 1 or 2 pictures. Maybe you could space it out better?

Comments are closed.

Scroll to Top