nxtprograms.com

Fun Projects for your LEGO® MINDSTORMS® NXT!

Home     Projects     Help     Contacts

Electric Guitar
Building: Intermediate
Program: Expert

Building Instructions


1


2


3


4

The ultrasonic sensor needs something hard and flat to measure distance to, so that is what this sliding plate is for.  The ultrasonic sensor does not work when something is too close to it, so the two pegs sticking out of the neck near the sensor prevent the plate from getting closer than about 1 inch from the sensor.

 


5


6


7


8


9

First connect the wire to the ultrasonic sensor as shown below. Then connect the wire to port 4 on the NXT (this will be a tight fit), then route around the peg as shown.

Electric Guitar Programming

There are two programs to choose from for your electric guitar.

  • The program Guitar Tones uses the NXT’s built-in tone generator to make musical notes.

  • The program Guitar Chords will play some cool recorded guitar “power chord” sounds to make your electric guitar sound more realistic. However, to use this program, you will first need to copy some recorded guitar chord sound files to the NXT Sounds folder on your computer. To do this:
  1. Locate and open the NXT Sounds folder on your computer. On most computers, this is:

Windows: C:\Program Files\LEGO Software\LEGO MINDSTORMS NXT\engine\Sounds
Mac:
Applications > LEGO MINDSTORMS NXT > engine > Sounds

To locate your Sounds folder on Windows, start by finding out where your NXT software is installed by right-clicking on the icon you use to launch the NXT software, picking Properties, and then pressing Open File Location (or look at the Target path), then open engine\Sounds from there.

  1. Open the package of Guitar Chord Sounds (a .zip file) and open it to locate the eight guitar sound (.rso) files.  If your computer cannot open .zip files, you can download the eight sound files individually from here.

  2. Copy (select and drag) all eight of the guitar chord sound files (.rso) to the NXT Sounds folder on your computer.

In addition to needing the guitar sound files, the Guitar Chords program has a couple of other restrictions that you should know about:

  • The recorded guitar chord sounds take a lot of memory on the NXT, so you may need to delete other programs that you have downloaded to your NXT to make room. And when you are done using the guitar and need more memory for other programs, you should delete the sound files from the NXT.

  • Due to memory constraints, the guitar chords will only play for about ½ second for each press, so you can‘t hold long notes. Use it like a “rhythm guitar” and keep strumming!

 


How to Play Your Electric Guitar

Hold the sliding plate with your left hand with your hand on the side away from the ultrasonic sensor.  Slide the plate up and down the guitar's neck to select the note to play, then press the orange button on the NXT with your right thumb to play the note. The NXT’s display will show the name of the note or chord that will be played as the sliding plate moves.

 

The Electric Guitar's Notes

The programs for the electric guitar play a series of notes or chords known as the “blues scale”.
These notes are often used in blues and heavy metal rock music. The notes in this scale are:

A, C, D, D#, E, G, G#, A     (The # means “sharp”, so D# is “D sharp”)

On a piano keyboard, these notes are:

Using these notes, it is easy to improvise or "play around" even if you don't know anything about music.

 

Challenges
  • Design your own Guitar body that has a shape you like.

  • Can you arrange the pegs in the neck of the guitar to visually mark the different note locations?

  • Can you figure out the notes to some tunes you know? For example, the main riff of
    the rock song “Smoke on the Water” by the band Deep Purple would be:

A C D A C D# D
  • The NXT is not very loud, especially when playing recorded sounds as in the Guitar Chords program. Can you figure out a way to use the microphone and sound system on your computer as an amplifier for your guitar?

  • Try the upgraded version of this project, the Guitar Challenge Game!

Get nxtprograms.com on CD!
Click here for info

Home     Projects     Help     Contacts

 

Copyright © 2007-2011 by Dave Parker.  All rights reserved. 
All project designs, images, and programs are protected by copyright.  Please see the usage policy.