Forget Password

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. 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!


[The article is for Basic Members only. Login or sign up now to read the whole article.]
[The article is for Premium Members only. Login or sign up now to read the whole article.]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Design Float
  • Reddit
  • Technorati
  • Twitter
  • StumbleUpon
See the list of all Illustrator tutorials.
Learn 101 Illustrator tips and techniques for free.


About The Author: Tony Soh

Hi. I'm the founder of Vector Diary. Illustrator is my passion and I have written numerous tutorials on illustrator helping people learn illustrator. My most popular tutorial on learn illustrator has been a hit. It makes learning illustrator so easy and has benefited more than 20,000 people worldwide. Also, I've revealed some of my secret techniques in the premium tutorials. So don't forget to check it out!

0 Trackbacks

+Add Comment26 Comments

  1. Gravtar for Cito
    Cito March 18th

    >Ekhm<… Sorry, but I don’t need Illustrator to do such a thing :P Inkscape is doing it well enough :)

  2. Gravtar for Fede
    Fede March 18th

    Very nice tutorial! thanks for sharing ….

  3. Gravtar for stephanie
    stephanie March 19th

    Not sure when i’ll need to draw a keyboard specifically, but this def taught me some nice tips about the Transform effect! Thanks!

  4. Gravtar for Dalia
    Dalia March 20th

    Thats what i love about this kind of tutorials: simple yet very effective

  5. Gravtar for Nora Reed
    Nora Reed March 21st

    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!

  6. Gravtar for Khawla
    Khawla March 24th

    This is an easy tutorial. Thanks for sharing!

  7. Gravtar for Ghada
    Ghada March 30th

    Thanks for sharing, taught me some new tips.

  8. Gravtar for Asmaa’
    Asmaa' April 1st

    A very cool and informative tutorial thanks for sharing!

  9. Gravtar for joyoge designers’ bookmark
    joyoge designers' bookmark April 2nd

    nice work thanks..

  10. Gravtar for Motti
    Motti April 5th

    very nice tutorial

  11. Gravtar for nicoals.lee
    nicoals.lee April 12th

    ahh,cool…
    thank you for sharing

  12. Gravtar for Flash design
    Flash design April 20th

    Thanks for sharing this…though it seems pretty simple thing to do but it becomes a lot easier with the step by step tutorial ..

  13. Gravtar for Firts timer
    Firts timer May 2nd

    Good stuff. I learned some cool tricks. Thanks!!

  14. Gravtar for I Was Able to Lose T h i r t y P o u n d s in Only a Month
    I Was Able to Lose T h i r t y P o u n d s in Only a Month May 7th

    Hi, good post. I have been wondering about this issue,so thanks for blogging. I will certainly be subscribing to your blog. Keep up the good work

  15. Gravtar for i forgot my name
    i forgot my name May 19th

    oooooooooooooooooooooh coooooooooooool that’s awsome

  16. Gravtar for Suiren_m
    Suiren_m May 22nd

    So fun and easy to follow, thanks for sharing Sheryl :)

  17. Gravtar for LW
    LW May 29th

    Thats what i love about this kind of tutorials: simple yet very effective

  18. Gravtar for Pol65
    Pol65 October 22nd

    In traditional evaluation, goals reflect the mission of the library. ,

  19. Gravtar for lirik
    lirik April 7th

    great tutorial.. thanks for sharing

  20. Gravtar for Zain
    Zain July 11th

    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

  21. Gravtar for chepe263
    chepe263 September 3rd

    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

  22. Gravtar for Alexander
    Alexander September 4th

    Another simple solution is to use Inkscape and extension “Music scale generator”.

  23. Gravtar for Mohamed
    Mohamed September 4th

    Thank you very much for sharing. Great job! however the sound of the keys doen’t work!! XD

  24. Gravtar for amy
    amy January 7th

    totally helpful

  25. Gravtar for Piano Technique
    Piano Technique December 19th

    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 …

  26. Gravtar for Denny
    Denny May 12th

    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?

Ads

Subscribe

Social Media Icons

Visit Us On TwitterVisit Us On FacebookCheck Our Feed

Istock Ads

Google Ads

About Vector Diary

Vector Diary is a popular blog offering great illustrator tutorials and tips. It was created by Tony Soh, a graphic designer, who has great passion in illustration. Tony has written one of the most popular tutorial to learn illustrator and has helped more than 20,000 people. On top of that, his tutorials and tips has helped designers improve their illustration skills and have received great feedback. So join Vector Diary and start learning today!

Write a Tutorial

Get paid $150 for each approved tutorials! Any writers who are passionate about sharing their illustrator techniques can contribute. Learn how »