Inspiration

While perusing through Circuit Launch, we saw three guitars. They called to us. We stepped closer, and felt their ancient power seeping towards us. We wanted to integrate this with modern tech, and while typing our thoughts on a Google Doc, we thought: "Heck! If only I could use this guitar to type!"

What it does

This emulates key strokes based on the different pitches and frequencies produced by playing the guitar. While it does type, it is even more powerful as a gaming controller. Worry no more! You can now play Minecraft is the greatest of A minor chords, and amuse others with your gaming riffs.

How we built it

The guitar frequency is processed through a pitch recognition algorithm. We then take this pitch and match it against a table that associates different pitches with different keystrokes. Then, we use pyautogui and pynput to input those keys and mouse movements.

Challenges we ran into

  • Mouse movement in Minecraft
    • Minecraft is annoying when it comes to mouse movement
    • Moving your mouse to the edge of the screen with pyautogui doesn't turn
    • used macos osascript to tell the System General to input different keys
    • used macos mouse keys which allows us to use keyboard to control the mouse
  • Sample rate issues
    • issues with data streaming in too quickly
    • would process very quickly, so the guitar frequency would be recorded multiple times (due to sound wave resonance)
    • fixed by implementing a while loop that ignored junk values below our threshold.

Accomplishments that we're proud of

- managed to get mouse movement working against minecraft's weird system
- fixed sampling rate error against resonant harmonic frequencies
- WE MADE A FRICKIN GUITAR KEYBOARD CONTROLLER RAHHHHH

What we learned

- all about guitars and harmonic theory
- how pitch analyzers actually work
- deep dive into python automation software

What's next for Keytar

- making it less sensitive to inputs
- finetuning inputs
- accessibility 
- cross platform

Built With

Share this project:

Updates