slapyak: tinkering and fidgeting
Just another WordPress.com weblog

Guitar Hero Midi Controller

GHMC - chord mode 3From the time i started playing guitar hero this last Christmas (i know, i’m a little late to the party) I just couldn’t help but think what cool real instrument it would be. I saw the video of the band that uses the PS2 version through usb and knew people were talking to the wii-mote with bluetooth, but i wanted a real instrument, something that was self contained and didnt require a computer to be dragged along in order to make music. So the solution was to make it use midi , then i could use any synth in the world or do whatever i wanted.

With the current version you can:
play 2 octaves of an 8 note scale at a time
change the starting note anywhere in the range of a regular keyboard
change octaves
change keys
change tonal modes (Ionian, Mixolydian, Lydian, Dorian, Aeolian, Phrygian, Locrian)
change the timbre of a sound
change the resonance of a sound
use the whammy bar to pitchbend
play chords in the mode you have the guitar set to (major/minor/etc.)
rock out with a video game toy

Finished GHMC

First i got the idea together and designed a method of operation. I actually wrote the user’s guide before i did any programming or and hardware slicing. If you check out the USER’S GUIDE page, you can see how all of the control works.

The block diagram of how it works comes next. it goes
Guitar –> Arduino –> LEDs & MIDI –> external MIDI device.

Then the programming and prototyping using todbot’s wiichuck adapters so i didnt have to void the warranty just yet.

once the basics worked it was hardware hacking time. the leds went in (i like leds a bit too much i think). I had the LCD in, but thought it looked too clunky and swapped it out for the status lights. Plus i didnt really need it. Everything that would need to be adjsuted can be done without text feedback.

Then the software was adjusted to do what i wanted it to. The ‘user’s guide’ for the code is below. For the guitar itself GO HERE.

total cost ~
Guitar Hero controller $60
Freeduino $13
various electronic bits $10
wires/cables to cut up $8
plexi $14
time…ewww... guts

in order to make the program run, you’ll need my MIDI library and my guitar library

files needed:
http://www.dwdesignlabs.com/GuitarHeroMidi.zip
http://www.dwdesignlabs.com/midi.zip
http://www.dwdesignlabs.com/guitar_funcs.zip

———————- ————————– —————————–
———————- ————————– —————————–
———————- ————————– —————————–
———————- ————————– —————————–


GHMC programming USERS GUIDE

This is a program for Arduino written for the purpose of using a Wii Guitar Hero Controller
as a MIDI input device. As with most arduino projects, this is released under the GNU
understanding. The use of and modification of the software for personal use is granted.
however rights of sale of completed Guitar Hero Midi Controllers, or kits for the same is
reserved. any commercialization of this kit may only be with the express written consent of
the original author.

The use of the MIDI library from https://slapyak.wordpress.com/ is required.
author: Dave Wernli (slapyak)
created: April 2008
website: https://slapyak.wordpress.com/
created in EditPlus (http://wwweditplus.com) multi-language coding text editor
resources:
Midi Guide: http://www.indiana.edu/~emusic/etext/MIDI/chapter3_MIDI.shtml
I2C (wire) library: included with new arduino environment disrtibutions
Wii adaptor/code: Tod Kurt – http://www.todbot.com
Windmeadow labs – http://www.windmeadow.com/node/42
Wii guitar mapping, function basics: Jason Leyrer – http://www.jleyrer.net/
LCD4Bit library: http://www.arduino.cc/playground/Code/LCD4BitLibrary
Arduino Playground: Serial, test library, countless tidbits from the forum posts

The end user user’s guide can be found at https://slapyak.wordpress.com/
this is more of a programming guide to the software and hardware involved

Notes:
——————————————————————————–

Hardware: everything is made so no hardware modification is necessary to the
guitar hero controller. though i did cut up mine a little, with some modification
you could use the software without needing to cut anything up.

I’ve commented the code pretty excessively and tried to compartmentalize as much
as possible. This is partially for my benfit while writing the thing, and
partially for anyone who would want to use this.

general notes:
midi standard usually uses Hexadecimal (0x00) notation, so thats
what i’ve used here. You are free to use standard decimal everywhere though.

The Wii guitar hero controller connects to arduino via I2C protocol. and is accessed
with the Wire library. Wire and LCD4Bit funtions called with wire.* and lcd.* are
covered very well in the documentation for their respective libraries.

Below are the functions and an explanation of how they are used in my program.

PROGRAM FUNCTIONS:
————————————————

GUITAR DATA RECIEVE AND PROCESS FUNCITONS:
————————————————
GENERAL NOTE ABOUT HOW I GET THE DATA.
I wanted to be absolutely sure I didnt miss a strum and therefore notes. So, I
linked the strumbar to an interrupt via an optoisolator. I’m working on a software solution
that assures me of not missing any notes, but it isnt 100% yet.

Guitar.init();
returns nothing
run in the setup function to initialize the communication with the wii guitar.
can also be run as a reset to re-establish a link if drop out is possible.

Guitar.refresh();
returns nothing
gets new status data for access.
NOTE: this function must be called to get new data, otherwise you are just calling
the same data over and over. I did this because there are times in my program i want to
set a state, get the status of everything in that state and access it repeatedly.
you can always just build this funtion into another to avoid calling it a thousand times.

Guitar.strumUp();
returns byte
returns 1 for up strum

Guitar.strumDn();
returns byte
returns 1 for up strum

Guitar.whammy();
returns byte
returns value, 0-255 for posistion of whammy bar
0 is off, 255 is full down.

Guitar.joyX();
returns byte
returns x position as -127 to +127

Guitar.joyY();
returns byte
returns y position as -127 to +127

Guitar.buttons();
returns pseudo array of buttons as binary byte
it makes sense to see it.
Bud0abcde –
where u is 0 or 1 based on down strum state
where d is 0 or 1 based on up strum state
where a is 0 or 1 based on Yellow button state
where b is 0 or 1 based on Green button state
where c is 0 or 1 based on Blue button state
where d is 0 or 1 based on Red button state
where e is 0 or 1 based on Orange button state
returned value would be B01011111 when you strum up with all 5 buttons down
the B before the number is just letting the program know its in binary notation just
like 0x signifies a hex notated number.

These next functions return 0 or 1 as a byte for button states. 1 means the button is pressed…
Guitar.yellow_but();
Guitar.green_but();
Guitar.blue_but();
Guitar.red_but();
Guitar.orange_but();
Guitar.plus();
Guitar.minus();

MIDI FUNCTIONS AND THEIR PARAMETERS:
————————————————
(required) (optional) (optional)
Midi.noteOn(byte _note, byte _velocity, byte _channel);
EXAMPLE CALLS:
Midi.noteOn(0x3C); plays middle C at full(127) velocity(default) on channel 0(default)
Midi.noteOn(0x3C, 0x64) plays middle C at 100 velocity on channel 0(default)
Midi.noteOn(0x3C, 0x64, 0x0A) plays middle C at 100 velocity on channel ten
_note: the note to be played 60 is middle C, 61 is a half-step up, etc…
accepts decimal(0-127) or hexadecimal(0x00 – 0x7F)
will automatically bring a note above 0x7F down an octave until it
is a valid note.
_velocity(optional): optional parameter, but must be included if channel is included
if left out, 127 will be default.
accepts decimal(0-127) or hexadecimal(0x00 – 0x7F)
_channel(optional): an optional parameter, if left off, all notes go to channel 0

(required) (optional)
Midi.noteOff(byte _note, byte _channel);
EXAMPLE CALLS:
Midi.noteOff(0x3C); turns off playing note, middle C on channel 0 (default)
Midi.noteOff(0x3C, 0x0A); turns off playing note, middle C on channel ten
_note: see above
_channel: see above

(required) (optional)
Midi.pitchBend(int _bend, byte _direction);
EXAMPLE CALLS:
Midi.pitchBend(0x3F01, 1);
_bend: a number between 0 & 16129 (127*127) due to its 2 byte length.
_direction: defaults to 1, which would indicate up (0==down)

Midi.pitchReset();
resets pitch bend to 0 and plays whole tones. (normal operation)

Midi.omniOn();
turns omni on. This allows a message sent to any channel to be played on all channels
It could be used to perform, but helps with debugging when you are using
multiple channels at a time. For detail about Omni, Mono, Poly and other modes,
consult the Midi guide referenced above.

Midi.omniOff();
see Midi.omniOn()

Midi.modePoly(byte _chan);
sets polyphonic mode on. This means you can have more than one note playing at a time.
modes must be either mono or poly.

Midi.modeMono(byte _chan);
sets monophonic mode on. This means only one note per channel will be played at a time.

Midi.sustain(bool _status);
sets sustain pedal to on for _status==1 and off for _status==0

Midi.volume(bool _level);
accepts _level val from 0-127 for overall volume control

Midi.porta(bool _status);
accepts _status as 0 or non-zero for on/off control of portamento

Midi.suste(bool _status);
accepts _status as 0 or non-zero for on/off control of sustenuto

56 Responses to “Guitar Hero Midi Controller”

  1. […] check out the other pages here – notably the Guitar Hero Midi Controller pages and leave a comment below and let me know what you think or what you’d […]

  2. […] pages the whole project is spread out on  – GHMC – program and introduction page GHMC – musician’s user’s guide GHMC – youtube video1, video2, […]

  3. […] Link (via) Read More Turn Your Guitar Hero Controller Into a Working InstrumentMake your own Guitar Hero controller from scratchDIY: How to fix your defective Guitar Hero controllerGuitar Hero controller will work with Rock BandGuitar Hero Effect Pedal confirmed through 360 instructions TAGS: SHARE: Stumble Upon, Digg, del.icio.us, Reddit this, SlashdotSend to a FriendPermalink […]

  4. […] the normal controllers.  However this is the first time I’ve seen a Guitar Hero controller converted in the opposite direction; it now works as a MIDI guitar, compatible with any synth with the necessary port.  Best of all, […]

  5. […] Read | Permalink | Email this | Comments […]

  6. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  7. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  8. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  9. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  10. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  11. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  12. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  13. […] faint of heart, but feel free to hit the read link if you’re hacker enough to handle it.[Via MAKE]Read | Permalink | Email […]

  14. […] than $50 (assuming you already have the guitar). For how-to instructions, hit the following link. [Slapyak via […]

  15. […] Read | Permalink | Email this | Comments […]

  16. […] a huge Guitar Hero fan, has used his electronics wizardry to turn a Wii Guitar Hero controller into a MIDI device. Here’s his take (unedited) on the project […]

  17. […] a huge Guitar Hero fan, has used his electronics wizardry to turn a Wii Guitar Hero controller into a MIDI device. Here’s his take (unedited) on the project […]

  18. dude – this is kind of like matt bellamy’s (Muse) (real) manson guitar, he has had a midi controller built inthat controls pretty much just like what you have done here. Based on that – could this same tech be emulated/built into a real guitar? i’d love to incorporate it into a guitar project i have to increase my guitar’s tonal durability and create a midi interface.

    Muse and the things bellamy does with his guitar were a huge inspiration for this and some other mods i did to a bass guitar i have. I’m not sure exactly what he has going on in his axe, but the kaos pad he uses can modify normal waveform audio i believe.

    to build this into a real, stringed guitar, you’d need to add a bunch of buttons. A more practical approach would be to use a roland midi pickup (or engineer your own) to take the audio and convert it into the proper midi signal. you’d need to analyze the frequency (eliminating harmonics) and then output the midi signal to create the same note.

    Maybe you’ve given me the inspiration for my next project here. I’ll have to see where this takes me.
    -Dave

  19. […] a huge Guitar Hero fan, has used his electronics wizardry to turn a Wii Guitar Hero controller into a MIDI device. Here’s his take (unedited) on the project […]

  20. […] a huge Guitar Hero fan, has used his electronics wizardry to turn a Wii Guitar Hero controller into a MIDI device. Here’s his take (unedited) on the project […]

  21. […] your Guitar Hero guitar into a midi controller, read how at Slapyak. This was on Gizmodo yesterday, and I’m actually surprised that someone didn’t come […]

  22. can someone make me one and how much??

  23. Why not use a Wiimote, and bluetooth it to a computer and use the computer as a MIDI controller. You could even use Finale to create sheet music of what was played.

    because the whole point was to cut the computer out of the mix. this will work with any standard midi instrument. portability. and to see if i could…
    -Dave

  24. […] a midi controller. Many such mods (like this one) require a computer to do the actual work, but one of the most recent projects to hit the scene uses the Wii version of the guitar to create a MIDI instrument. All of these […]

  25. […] than $50 (assuming you already have the guitar). For how-to instructions, hit the following link. [Slapyak via […]

  26. […] just found the Slapyak Guitar Hero Midi Controller, which uses an Arduino and is much better than my […]

  27. Hey, how much would you charge to set one of these up? I am really interested, but not very techie. Curious. Please feel free to email me. Thanks!

  28. I would like to purchased a pre-concerted guitar hero guitar. Would you make this available? How Much? email me

  29. Hello, I’m extremely interested in you’re project and think it’s fantastically done.
    I’d love to look at the code in full if possible? I tried to download but the program/library etc but my computer just keep saying decompression failed for the zip files.
    I’d be eternally grateful if you could email the code as a notepad file so I could take a look.
    Thanks in advance,
    Ryan
    (E-mail is call.it.in.the.air@hotmail.com)

  30. Hey Dave, just got the idea of doing this a couple days ago, then found you. I would love to do this myself, the problem being i know jack about programming. I am in the process of getting a guitar hero 3 guitar and was wondering if you could help me out with modding mine once I got it.

  31. hey pal im looking at doing a project witch is a real guitar but with a x/y midi controller. i got somthing called a korg kaoss pad 2 but im not sure how to build a pcb for a midi controller so i can control somthing like this please if ya know a way of building/buying a curcuit that does this please let me know

    karl rigby

    rigby_666@msn.com

    thanks

    • the kaos puts out midi, so you could just tap into that with the arduino’s serial connection and set up an audio circuit to do whatever you want with variable voltage coming from the arduino.

  32. Well honestly, I don’t have the time or tech knowledge to do a project like this on my own, but could I pay you to do it for me? I don’t mean any disrespect by it, but you’ve already done it successfully once and know the in’s and out’s. You can email me about it at theguitarjedi@yahoo.com

    • Sure thing – I’ve already made and sold a bunch of them. I use paypal and it’s $225 to your door (if that door is in the 48 states) ($200 + actual shipping)

  33. Dude, I’d love to have this done, but I’m not as tech as you. The files hosted at http://www.dwdesignlabs.com/ are no longer there. Infact the whole site is down! I was hoping you could email me them to jeremydire@gmail.com?

    Love your work, Jeremy.

  34. Hi Dave,
    I would like to build one of these. Do you have a final parts list and schematic? Also, the links to the .zip files you provided are broken. Can you email these to me as well?

    Thanks,
    Jon Paul

  35. i was wondering where the sound of the guitar comes out and can you reupload the files needed at dwdesignlabs.com. also which freeduino did you buy? i would like to build my own and create a 1/4 audio jack to plug it into sound system speakers etc

  36. I am very interested in building one of these. I have a couple of questions:
    1. Can you email me a schematic witha parts list or something like that?
    2. The links to your .zip files with programming are broken, can you email me those files?
    3. Do you have any recommendations to make the guitar more useful now that you have been using it for a while?

    Email: japes5rt @ gmail . com

  37. cool project! im just confused a little. how is the arduino hooked up to the guitar?

  38. i want to attempt this project and i think i could do it. But i would need instructions almost a step process, i was wondering if you had anything like this or could send me at least the code/necessary files. if any of this is possible please email me at knowlton.J17@gmail.com

  39. Hello slapyak,
    I have been looking for this solution for a while, I was very pleased to see the last posts regarding buying this from you.
    please contact me to let me know if your offer is still available!
    brad@gltelecom.com,
    Thanks much!
    Brad

  40. Wow That’s Quite a cool toy!

  41. Hey,
    Are you still making these for people?
    I’m super late at joining the party but am incredibly interested if its still on offer.
    Did you only ever do this with wii guitars, or did you make 360 as well?
    Please shoot me an email if you’re still up for this:
    vitrics@hotmail.com

    Thanks

  42. Hi!

    May I know if the source codes still available for download anywhere?

  43. I’d love to purchase one of these from you!

    Some questions:
    DO you have any youtube videos of this in action?

    Are you still making them?

    How much does it cost? I live in dreary ireland, so please allow for postage…..

  44. You actually talked about many engaging things in this article. I found it by using Yahoo and I have to confess that I am now subscribed for your blog site, it is quite great ;D


Leave a reply to Guitar Hero without the console | Development Feeds Cancel reply