Guitar-to-Text Controller turns Sound into Code

Guitar-to-Text Controller turns Sound into Code

●1 ●6
calendar_today ago • schedule14 min read

🎵 Welcome to My Musical Universe

Hi, my name is Sam, and I've been playing the guitar for over 15 years. This project starts with a personal necessity: using the guitar as a way to communicate. What if a musical phrase could carry a thought into text, when ordinary typing is not the right path?

The prototype explores that question by treating the guitar as an expressive input. A played note sequence or sustained string can select a text cue. This is a hand-configured vocabulary, not a neural system that reads thoughts or understands arbitrary music.

🎸 Experience Sam Sounds NOW →

Hey there! I'm Sam, the creative technologist passionate about blending art, technology, and innovation.
This project represents my journey of discovering how technology can amplify creative expression, and how the principles of music can reshape the way we code.

Imagine you are a musician with serious chops on the guitar. You might be great at guitar, where every note, every riff, every nuance in this project comes from years of dedication to the craft.

The Recording Process

Here's me playing through a conventional amp, recording audio with the phone mic. Low quality. Great take of playing, but it gets garbled by low quality mic.

Now here's me playing through my Virtual AMP

https://rumble.com/embed/v7ff4mk/?pub=4nnnxw

https://www.instagram.com/reel/Df_Rs2bhJxt/?utm_source=ig_web_copy_link&cnvx=MzRlODBiNWFlZA==&avpt=MzRlODBiNWFlZA==

https://www.instagram.com/reel/DfvmN17CtWl/?utm_source=ig_web_copy_link&knvt=MzRlODBiNWFlZA==&avpt=MzRlODBiNWFlZA==

https://rumble.com/v7hlhk2-sam-guitar-virtuoso-full-band-version-e-major-neoclassical-shred.html?mref=4nnnxw&mc=155b2

https://www.instagram.com/reel/DgLjBlaBcot/?utm_source=ig_web_copy_link&fqnt=MzRlODBiNWFlZA==&avpt=MzRlODBiNWFlZA==

Each guitar track you hear was meticulously recorded and integrated into this experience. I treated the recording process with the same care and attention to detail that I apply to coding. Every bend, every layer, every harmonic was intentional. The guitar isn't an afterthought—it's the heartbeat of this project.


🛠️ Tools for Good: Democratizing Creation

I don't take these tools for granted. Lovable, AI, and modern development frameworks are extraordinary gifts. But they should never be gatekept by developers and tech elites.

Sam's Music Coding is a revolutionary approach to development that brings together three interconnected concepts:

1. Vibration 🌊

At the most fundamental level, everything is vibration. Sound waves are vibrations traveling through air. Electrons vibrate at quantum scales. The rhythm of your heartbeat is a vibration. In coding terms, vibration represents the frequency and rhythm of your development process—the cadence of your commits, the pulse of your deployments, and the oscillation between planning and execution.

2. Music 🎵

Music is organized vibration—it's vibration with intention, structure, and emotion. In development, music represents the harmony in your code. Just as a musical composition has rhythm, melody, and harmony, great software has structure, flow, and elegance. When your code "sings," it means it's intuitive, efficient, and beautiful to read.

3. Vibes ✨

Vibes are the felt experience—the intangible quality that makes something resonate with people. In the context of technology and music, vibes represent the user experience, the emotional connection, and the aesthetic appeal. It's about creating something that not only functions perfectly but also feels right. It's the X-factor that turns good software into great software.

How They Connect

These three concepts form a trinity:

  • Vibration → The foundation (physics, rhythm, patterns)
  • Music → The organization (harmony, structure, arrangement)
  • Vibes → The experience (emotion, intuition, magic)

When you code with vibes in mind, you're thinking about:

  • The rhythm of your development (vibration)
  • The harmony of your codebase (music)
  • The feeling your creation evokes (vibes)

🚀 Building with Care

This website was built using a suite of tools and software tools. This started with chat GPT, the chatbot, lovable.dev, the agentic coding agent, Cursor Pro, the software dev platform, then X AI bought Cursor and Grok Bot merged to create a super-intelligent platform. By divine providence, I had already been building with these platforms so the merge was a major boost to my productivity. This wasn't luck, it was careful choices of tools aimed at the future of engineering. I always stay in the loop, Human in the Loop, I'm the pilot and AI is my co-pilot.

How Lovable Enabled Vibe Coding

Lovable is different because it understands that code isn't just logic—it's craft. Here's how I used it:

  1. Rapid Prototyping - I described the "vibe" I wanted: a musical, flowing, interactive experience. Lovable translated my vision into code instantly.

  2. Iterative Refinement - Like composing music, I could iterate quickly. "Make the animations more snappy." "Add more rhythm to the interactions." "Feel like a concert should feel." Lovable responded to emotional direction.

  3. Human-AI Collaboration - I didn't abdicate creativity to AI; instead, Lovable became my creative partner. I provided the vision (vibes), and it provided the implementation (vibration organized as music).

  4. Design Philosophy - The resulting website doesn't feel like generic tech. It feels alive. It has rhythm. It has personality. That's the power of prioritizing vibes from the start.

Why Lovable for Vibe Coding?

Most development tools optimize for efficiency. Lovable optimizes for resonance—how well your creation connects with people. By using natural language and understanding intent, Lovable lets developers code more like musicians compose: starting with feeling, then adding structure.


🎼 The Philosophy

Vibe coding rejects the false dichotomy between "art" and "engineering." Great music requires both composition rules (engineering) and emotional authenticity (art). Similarly, great software requires both technical excellence and human-centered design.

When you visit this site, you're experiencing vibe coding in action:

  • The vibrations are the underlying code patterns and animations
  • The music is the logical structure and elegant design
  • The vibes are the feeling you get when you interact with it

Guitar amp

Install on another Linux computer from this folder (PortAudio, ALSA, PipeWire tools, and the Python package):

./install.sh
.venv/bin/samsounds-amp

Open http://127.0.0.1:8790/ on that machine. The same steps are in docs/linux-install.md.

The browser amp is a local control panel for the guitar engine. From the repo root, after ./install.sh:

.venv/bin/python -m amp_ui

Open http://127.0.0.1:8790/ on the same machine. Amp is the tuner, presets, knobs, and touchpad. Practice plays an original backing loop (or a file from your computer) while the guitar still runs through the amp, and shows the key, the chords, scales that fit, and a fretboard. The library includes blues, rock, pop, funk, house, hard rock, strings, bluegrass, and an ambient lydian vamp, with a style filter on the track list.

Playing Guitar to Communicate: Invention Origin Story

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a TV.

Before digging into the technical code, let's talk about music theory. The Circle of Fifths!

Moving clockwise adds seven semitones — a perfect fifth:

×27/12≈1.4983≈3:2×27/12≈1.4983≈3:2. 

Moving counter-clockwise adds five semitones (a fourth). Neighboring keys share six of seven scale tones. Each wedge is a major key (outer ring), its relative minor (inner ring), and the signature — click a wedge to see its seven notes, the seven mode starting notes, and play tonic, fifth, or a triad.

Circle of Fifths

Moving clockwise adds seven semitones — a perfect fifth:

 ×27/12≈1.4983≈3:2×27/12≈1.4983≈3:2. 

neural_guitar_controller

Communicate with guitar to compress guitar frets into keystrokes

This is an INCREDIBLY PROFOUND BREAKTHOUGH!
When you are trying to communicate with someone, you have a thought of "mental songe" that you are tyring to communicate. Its very lossy, limited by what you can talk and what you can type. This is an incredibly profound breakthrough and what it means to be a musician.

Emoji carry the feeling

The guitar is an alternative to typing. Major chords feel bright, minor chords feel heavy, and the emoji typed with each cue lets someone who cannot hear the chord still get its emotion in chat.

Gesture cheat-sheet

Bright chords say positive things, heavy chords say heavy feelings, a held note asks for something.

The physical gestures did not change, only the words.

Social (major triads — arpeggios, root first)

  • (E, A, D) — hello 👋 warm
  • (G, B, E) — thank you 🙏 grateful
  • (D, F#, A) — good morning ☀️ cheerful
  • (C, E, G) — let's go 🚀 excited
  • (G, B, D) — good job 👍 proud
  • (A, C#, E) — I love it ❤️ joyful
  • (E, G#, B) — we did it 🎉 triumphant

Feelings (minor triads — arpeggios, root first)

  • (A, C, E) — I'm sad 🌧️ sad
  • (E, G, B) — I'm tired 😴 tired
  • (D, F, A) — I don't understand 🤔 confused
  • (B, D, F#) — I'm frustrated 😤 frustrated

Needs (held single notes, ~1.5 s)

  • E2 — help me 🆘 urgent
  • A2 — please 🥺 asking
  • D3 — say that again 🔁 patient
  • G3 — slow down 🐢 too fast
  • B3 — take a break 🌙 resting
  • E4 — I'm here 📍 present

Yes/No (same note picked 3x)

  • E x3 — yes ✅ glad
  • B x3 — no ✋ firm

With the amp

Start the amp with bash scripts/start-amp-ui.sh in SamSoundsVibes, then start this controller with python3 riff_control.py. The amp page shows the latest cue plus the gesture map. The controller still types with --type. The amp owns the headphones. This process still only listens to the Scarlett and never saves audio.

Windows MVP support (WASAPI input + SendInput Unicode typing) is included in riff_control.py.

Moving counter-clockwise adds five semitones (a fourth). Neighboring keys share six of seven scale tones. Each wedge is a major key (outer ring), its relative minor (inner ring), and the signature — click a wedge to see its seven notes, the seven mode starting notes, and play tonic, fifth, etc.

Dorian

Minor with a lift.

Minor, with the sixth left raised, so the line has some air in it. In the C example it starts on D. Sam uses it on a minor vamp that should still move, a groove that stays minor and does not turn heavy.

Formula:

W H W W W H W · Color: Natural 6 (raised vs Aeolian) · D3 146.8 Hz · E3 164.8 Hz · F3 174.6 Hz · G3 196.0 Hz · A3 220.0 Hz · B3 246.9 Hz · C4 261.6 Hz · D4 293.7 Hz

Phrygian

Dark.

The second is lowered, a fret from the root, and that closeness is the color. In the C example it starts on E. Sam uses it for a dark riff, or a Spanish sound, sitting on one chord.

Formula: H W W W H W W · Color:

Flat 2 · E2 82.4 Hz · F2 87.3 Hz · G2 98.0 Hz · A2 110.0 Hz · B2 123.5 Hz · C3 130.8 Hz · D3 146.8 Hz · E3 164.8 Hz

Lydian

Bright, with a sharp 4.

Major, with the fourth raised. That one note opens the chord up. In the C example it starts on F. Sam uses it for a floating major line, when a plain major chord would feel too settled.

Formula:

W W W H W W H · Color: Sharp 4 (#11) · F2 87.3 Hz · G2 98.0 Hz · A2 110.0 Hz · B2 123.5 Hz · C3 130.8 Hz · D3 146.8 Hz · E3 164.8 Hz · F3 174.6 Hz

Mixolydian

Dominant.

Major with a lowered seventh, the note that makes a dominant seventh chord. In the C example it starts on G. Sam uses it for rock and blues, any major chord that wants to lean forward.

Formula:

W W H W W H W · Color: Flat 7 · G2 98.0 Hz · A2 110.0 Hz · B2 123.5 Hz · C3 130.8 Hz · D3 146.8 Hz · E3 164.8 Hz · F3 174.6 Hz · G3 196.0 Hz

Aeolian

Natural minor.

The plain minor scale: flat three, flat six, flat seven. In the C example it starts on A. Sam uses it for a straight minor song, a ballad or a minor rock tune.

Formula:

W H W W H W W · Color: Natural minor (b6, b7) · A2 110.0 Hz · B2 123.5 Hz · C3 130.8 Hz · D3 146.8 Hz · E3 164.8 Hz · F3 174.6 Hz · G3 196.0 Hz · A3 220.0 Hz

Locrian

Unstable.

The fifth is lowered, so the chord on the root is diminished and will not sit still. In the C example it starts on B. Sam uses it for a short tense pass, then he gets off it. He does not park a whole song there.

Formula:

H W W H W W W · Color: Flat 5 · B2 123.5 Hz · C3 130.8 Hz · D3 146.8 Hz · E3 164.8 Hz · F3 174.6 Hz · G3 196.0 Hz · A3 220.0 Hz · B3 246.9 Hz

Clone & install the Guitar Amp

I ship the amp UI and effects in SamSoundsVibes on GitHub. On Linux, clone the repo and run the installer:

git clone https://github.com/sdcastillo/SamSoundsVibes
cd SamSoundsVibes
bash scripts/install-linux.sh

install-linux.sh checks that python3, python3-pip, and libportaudio2 are available. If anything is missing, it prints the apt-get line you can run, then installs Python dependencies from requirements-amp-ui.txt with pip --user so the amp UI can start without a system-wide override.

Guitar-to-Text Controller

The gesture engine lives in neural_guitar_controller. Clone it once on your machine (I keep mine in ~/guitar_controller):

git clone https://github.com/sdcastillo/neural_guitar_controller ~/guitar_controller

When you run bash scripts/start-amp-ui.sh inside SamSoundsVibes and press Start amp, the amp automatically launches riff_control.py as well. On the amp page, tick "Type gestures at my cursor" if you want text cues and emoji typed straight into whatever chat window is focused.

Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik.

Song Studio holds Sunrise Redline and Neo-Classical, with tab for each part.

Smart pickup listens while I play. A scream, a pick scrape, or a 24th-fret high E latches high gain. An open low E brings the tone back to clean.

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A analog-to-digital music interface, i.e., Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a PA system or amp.

Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik.

Song Studio holds Sunrise Redline and Neo-Classical, with tab for each part.

Smart pickup listens while I play. A scream, a pick scrape, or a 24th-fret high E latches high gain. An open low E brings the tone back to clean.

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a TV.

Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik. etc, etc. Disclaimer: I do not pirate or copy music note-for-note, these are public domain works from dead artists.

Smart pickup listens while I play. A scream, a pick scrape, or a 24th-fret high E latches high gain. An open low E brings the tone back to clean.

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a TV.

Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik.

Song Studio holds Sunrise Redline and Neo-Classical, with tab for each part.
Browser amp and practice studio

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a TV. Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik.

Pitch-Mapping to Macros

Smart pickup listens while I play. A scream, a pick scrape, or a 24th-fret high E latches high gain. An open low E brings the tone back to clean. Browser amp and practice studio

Recording

I built a guitar amp and practice studio that runs in the browser on my computer. Live amp tones and cabinet IRs sit on the same screen as the knobs. A Focusrite Scarlett Solo takes the guitar in, and the sound plays out to speakers or a TV.

Practice plays backing tracks with guitar tab. New classical excerpts include Bourrée in E minor, Canon in D, Für Elise, Minuet in G, Lágrima, and Eine kleine Nachtmusik.

LASER INFINITE SUSTAIN

A held note lives on a discrete grid of harmonics. Real signals—transients, noise, a pick attack, a decaying string—are not periodic. The continuous Fourier transform trades the discrete sum for an integral over every frequency.
In plain words: The Fourier series asks “which harmonics make this repeating note?” The Fourier transform asks “how much of every frequency is in this sound, even if it never repeats?” Forward transform goes time → frequency; inverse brings the spectrum back to a wave you can play. Filtering is just editing that spectrum and transforming back.

Signal analysis with the Fourier transform

A held note lives on a discrete grid of harmonics. Real signals—transients, noise, a pick attack, a decaying string—are not periodic. The continuous Fourier transform trades the discrete sum for an integral over every frequency.
In plain words: The Fourier series asks “which harmonics make this repeating note?” The Fourier transform asks “how much of every frequency is in this sound, even if it never repeats?” Forward transform goes time → frequency; inverse brings the spectrum back to a wave you can play. Filtering is just editing that spectrum and transforming back.

My Philosophy on Tools

Tools should liberate, not restrict. Here's what I believe:

  1. Tools Should Empower Non-Coders - Artists, musicians, creators, and visionaries shouldn't need to learn Python or JavaScript to bring their ideas to life. That's a barrier to human creativity.

  2. Community First - These powerful tools should be used by the community to help artists showcase their talents. A musician with a vision but no coding experience deserves the same platform as a seasoned developer.

  3. Accessibility is Revolutionary - When tools like Lovable exist, we have a responsibility to use them ethically and share their power. I built Sam Sounds not just as a portfolio piece, but as proof that non-technical artists can create stunning digital experiences.

  4. Amplify Talent, Not Gatekeep Skills - The music world doesn't require you to be a mixing engineer to share your gift. Technology should work the same way. If you're talented, you deserve a stage.

My Commitment

I'm committed to using my technical skills to help musicians, artists, and creators build platforms that showcase their work. If you're an artist with a vision, I want to help you build it. Because at the end of the day, technology is just a tool—and the real magic comes from the humans wielding it.

Want more #python & #code deep dives?

Join 6,138+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

1 Comment

0 votes

More Posts

What Is SARIF and How Does It Help Security Tools Work Together?

Ganesh Kumar - Jul 4

StarlingX 13.0 Turns Two Edge Upgrades Into One Reboot. Test the Targets Yourself.

Tom Smithverified - Nov 24

Stop trusting verdicts your policy no longer supports

VEACESLAV - Dec 1

When One Python Process Fails, You Need to See All of Them

Tom Smithverified - Nov 23

Dashboard Operasional Armada Rental Mobil dengan Python + FastAPI

Masbadar - Mar 12
chevron_left
139 Points • 7 Badges
United States • t.co/L9uhqs2Ey9
1Posts
0Comments
I am builder, guitarist, and founder of Predictive Insights AI. Massachusetts roots, UMass Amherst, ... Show more

Commenters (This Week)

2 comments

Contribute meaningful comments to climb the leaderboard and earn badges!