Introduction: Hacked Guitar

Engage in a new musical compositional experience using capacitive touch sensors to trigger pre-recorded loops. This contains our open-source Arduino code, Processing sketch, and some pre-recorded wav files for such a project.

The hacked guitar is a project aimed at bringing code to life. At M3Lab we are actively inventing, participating in and designing new technologies, pedagogies, and experiences for engaging everyone in meaningful, public, and open-source coding opportunities. Our work is inspired by John Dewey’s emphasis on art as a fundamental form of human experience. And yes, learning through inventing is an art. This specific project was part of a larger interactive musical performance initiative, which employed and demonstrated various forms of coding (like the hacked guitar), live musicians, computer simulations, and public feedback that took place at the University of Calgary. Stay tuned for more ideas from the future.


For more information check out our Github and Medium pages.

Step 1: Materials

Computer (Windows, OSX, or Linux)
Processing (Software, Sketchbook, and Language) - https://processing.org/download/
Arduino IDE (Software) - https://www.arduino.cc/en/Main/Software
Guitar (Acoustic or Electric with Strings)USB Type A Male / Type B Male Cable (6ft minimum)
Conductive Surface (We used ¼” Copper Clamps and Conductive Tape)
Double Sided Tape
Arduino Uno Breadboard
Arduino & Breadboard holder (Sparkfun Electronics)
Breadboard jumpers (Male/Male, Female/Female, Male/Female)
Alligator Clips
1M 5% Resistors
Electrical Tape

Step 2: Arduino Building

Mount Arduino and Breadboard to holder:

1. Breadboards come with double sided tape on their bottom. Stick bread board to holder.(See Image 1)(See Image 2)

2. Arduino’s come with 4 screw holes. Your holder comes with a set of screws that will be used to fasten the Arduino to it’s holder. (See Image 3)(See Image 4)


Connect Arduino Power to Breadboard:

*Here we begin dealing with Pins. The term Pins is deceiving, it actually refers to the slots in which jumper wires are inserted. On an Arduino the Pins line both lengths of the edges and are labelled with numbers and either Digital or Analog.

(See Image 5)

1. On an Arduino there are two rows of pins: Analog Pins and Digital Pins. For our purposes we will be using the Digital pins (Each Digital Pin has an associated number).

2. Insert one end of a Male/Male Breadboard Jumper into Digital Pin #2 of the Arduino and insert the other end of the Breadboard Jumper into a Positive Pin slot.

(See Image 6)

*This initial Jumper will be your Power Jumper that will Power the unit and sensors.


Connecting Sensors:


Sensor 1:

1. Next insert one end of a 1 M 5% Resistor into another positive pin slot, in the same column as the Power Jumper on the Breadboard, and then insert the other end of the same resistor into the “30” “a” pin slot on the Breadboard.

(See Image 7)

2. Next insert a Male/Male Breadboard Jumper into the Breadboard Pin slot “30” “c” and leave the other end of this jumper unattached and not inserted.

(See Image 8)

3. Complete the sensor connection by inserting one end of a Male/Male Breadboard jumper in the Breadboard Pin slot “30” “d” and then inserting the other end of the jumper into Arduino Digital Pin #4.

(See Image 9)


Sensor 2:

1. Next insert one end of a 1 M 5% Resistor into another positive pin slot, in the same column as the Power Jumper on the Breadboard, and then insert the other end of the same resistor into the “28” “a” pin slot on the Breadboard.

2. Next insert a Male/Male Breadboard Jumper into the Breadboard Pin slot “28” “c” and leave the other end of this jumper unattached and not inserted.

3. Complete the sensor connection by inserting one end of a Male/Male Breadboard jumper in the Breadboard Pin slot “28” “d” and then inserting the other end of the jumper into Arduino Digital Pin #6.


Sensor 3:

1. Next insert one end of a 1 M 5% Resistor into another positive pin slot, in the same column as the Power Jumper on the Breadboard, and then insert the other end of the same resistor into the “26” “a” pin slot on the Breadboard.

2. Next insert a Male/Male Breadboard Jumper into the Breadboard Pin slot “26” “c” and leave the other end of this jumper unattached and not inserted.

3. Complete the sensor connection by inserting one end of a Male/Male Breadboard jumper in the Breadboard Pin slot “26” “d” and then inserting the other end of the jumper into Arduino Digital Pin #8.


Sensor 4:

1. Next insert one end of a 1 M 5% Resistor into another positive pin slot, in the same column as the Power Jumper on the Breadboard, and then insert the other end of the same resistor into the “24” “a” pin slot on the Breadboard.

2. Next insert a Male/Male Breadboard Jumper into the Breadboard Pin slot “24” “c” and leave the other end of this jumper unattached and not inserted.

3. Complete the sensor connection by inserting one end of a Male/Male Breadboard jumper in the Breadboard Pin slot “24” “d” and then inserting the other end of the jumper into Arduino Digital Pin #8.



Your Arduino Unit is now complete. For each sensor there will be one Breadboard Jumper with a Male end that has not been inserted into anything, this end will serve as the capacitive touch sensor. You can either directly touch the jumper or attach the jumper to a conductive surface. For our purposes we will attach these jumpers to a copper clamp.

Step 3: Arduino and Processing Coding

Once you have downloaded the Arduino IDE and Processing, open the Example files from Github.

1. Open the Arduino IDE and open the Arduino_Sketch.ino file in the Arduino_Sketch folder.

2. In your browser go to https://github.com/arduino-libraries/CapacitiveSe... and download the Capacitive Sensor library.

3. Back in the IDE select Sketch in the toolbar then Include Library then Add .ZIP Library… and locate the zip file that you downloaded

4. Next find the IDE’s toolbar and select the tools dropdown, then port and find the Arduino Board

5. Once you have found the board write down the port and select it

6. You can now upload the sketch to the Arduino using the Upload button


Once the sketch is uploaded close the Arduino IDE and open up Processing

1. Open the hackedGuitarProcessing.pde file in the hackedGuitarProcessing folder

2. Take the port that you had written down before and put it into the programing inside the Port Name Here brackets

3. Run the Program

After you have completed the setup steps, save the Processing code so you don’t need to do anymore editing.

Step 4: Assembly

Now that you have your Arduino unit built we will be mounting it onto a guitar with sensors to interact with.

Arduino/Breadbox Unit:


1. Cut three pieces of double sided tape that are equal to the length of your Arduino/Breadbox unit.

2. Peel one side of each of the double sided tape and stick evenly on the back of your Arduino/Breadbox unit.

(See Image 10)

3. Now peel the other side of the double sided tape (which is now attached to your Arduino/Breadbox unit) and stick your unit onto the outside of your guitar.

* We chose a spot at the end of the guitar by the tailpiece or bridge, but you can attach the Arduino/Breadboard unit where you prefer.

(See Image 11)


Sensors:

We are now going to attach the open ends of all four of the remaining Breadboard Jumpers to a conductive surface for use.

* You may need various lengths and sexes of Breadboard Jumpers depending on where you decide to attach your sensors.


Sensor 1:


1. Take the open end of the Breadboard Jumper that is inserted into Breadboard Pin “30” “c” and connect it to a Female/Female Breadboard jumper.

(See Image 12)

2. Connect the open end of the Female/Female jumper to another Male/Male jumper. This process is primarily to provide the length needed to attach a sensor in a desirable spot.

3. Now with the open end of the Male/Male jumper take a copper clamp and insert the bare wire of the jumper into the hole on the base of the clamp.

(See Image 13)

4. Using electrical tape, tape the wire in position, while making contact with the clamp, to the clamp.

5. Again using electrical tape, tape the clamp (With the attached Breadboard Jumper) to your guitar.

* We chose to attach the copper clamps just below the strings and pick-ups, but you may have another preference.

6. Repeat this process for Sensors 2, 3, and 4, placing them in the desired position.

(See Image 14)

Step 5: Use

1. Turn on computer and open processing sketch: HackGuitarProcessing

2. Insert USB Type B into Arduino and insert USB Type A into your computer.

(See Image 15)

3. In your processing window click the “Play” icon.

4. Touch sensors to trigger wav files.

Step 6: Extras

1. Conductive materials:

We initially used Conductive Tape as our conductive surface to attach the Breadboard Jumpers to, but this tape seemed to lose conductivity over time and was hard to ensure the jumper wire remained in good contact. To solves this issue we used the copper clamps, which come with a small hole ideal for ensuring contact between the jumper wire and the surface.


2. Add more sensors


3. Add/edit sound files