AI Jam Sessions
Teach your AI to play piano and guitar. MCP server with six sound engines, interactive guitar tablature, piano roll visualizer, and practice journal.
Ask AI about AI Jam Sessions
Powered by Claude Β· Grounded in docs
I know everything about AI Jam Sessions. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
ζ₯ζ¬θͺ | δΈζ | EspaΓ±ol | FranΓ§ais | ΰ€Ήΰ€Ώΰ€¨ΰ₯ΰ€¦ΰ₯ | Italiano | PortuguΓͺs (BR)
Machine Learning the Old Fashioned Way
An MCP server that teaches AI to play piano and guitar β and sing.
120 songs across 12 genres. Six sound engines. Interactive guitar tablature.
A browser cockpit with vocal synthesizer. A practice journal that remembers everything.
What is this?
A piano and guitar that AI learns to play. Not a synthesizer, not a MIDI library β a teaching instrument.
An LLM can read and write text, but it can't experience music the way we do. No ears, no fingers, no muscle memory. AI Jam Sessions closes that gap by giving the model senses it can actually use:
- Reading β real MIDI sheet music with deep musical annotations. Not hand-written approximations β parsed, analyzed, and explained.
- Hearing β six audio engines (oscillator piano, sample piano, vocal samples, physical vocal tract, additive vocal synth, physically-modeled guitar) that play through your speakers, so the humans in the room become the AI's ears.
- Seeing β a piano roll that renders what was played as SVG the model can read back and verify. An interactive guitar tablature editor. A browser cockpit with a visual keyboard, dual-mode note editor, and tuning lab.
- Remembering β a practice journal that persists across sessions, so learning compounds over time.
- Singing β vocal tract synthesis with 20 voice presets, from operatic soprano to electronic choir. Sing-along mode with solfege, contour, and syllable narration.
Each of the 12 genres has a richly annotated exemplar β a reference piece the AI studies first, with historical context, bar-by-bar structural analysis, key moments, teaching goals, and performance tips. The other 96 songs are raw MIDI, waiting for the AI to absorb the patterns, play the music, and write its own annotations.
The Piano Roll
The piano roll is how the AI sees music. It renders any song as SVG β blue for right hand, coral for left, with beat grids, dynamics, and measure boundaries:
FΓΌr Elise, measures 1β8 β the E5-D#5 trill in blue, bass accompaniment in coral
Two color modes: hand (blue/coral) or pitch-class (chromatic rainbow β every C is red, every F# is cyan). The SVG format means the model can both see the image and read the markup to verify pitch, rhythm, and hand independence.
The Cockpit
A browser-based instrument and vocal studio that opens alongside the MCP server. No plugins, no DAW β just a web page with a piano.
- Dual-mode piano roll β switch between Instrument mode (chromatic pitch-class colors) and Vocal mode (notes colored by vowel shape: /a/ /e/ /i/ /o/ /u/)
- Visual keyboard β two octaves from C4, mapped to your QWERTY keyboard. Click or type.
- 20 voice presets β 15 Kokoro-mapped voices (Aoede, Heart, Jessica, Sky, Eric, Fenrir, Liam, Onyx, Alice, Emma, Isabella, George, Lewis, plus choir and synth-vox), 4 tract-mapped voices, and a synthetic choir section
- 10 instrument presets β the 6 server-side piano voices plus synth-pad, organ, bell, and strings
- Note inspector β click any note to edit velocity, vowel, and breathiness
- 7 tuning systems β Equal temperament, just intonation (major/minor), Pythagorean, quarter-comma meantone, Werckmeister III, or custom cent offsets. Adjustable A4 reference (392β494 Hz).
- Tuning audit β frequency table, interval tester with beat-frequency analysis, and tuning export/import
- Score import/export β serialize the entire score as JSON and load it back
- LLM-facing API β
window.__cockpitexposesexportScore(),importScore(),addNote(),play(),stop(),panic(),setMode(), andgetScore()so an LLM can compose, arrange, and play back programmatically
The Learning Loop
Read Play See Reflect
ββββββββββββ βββββββββββββ ββββββββββββββ ββββββββββββββββ
β Study the β β Play the β β View the β β Write what β
β exemplar β βββΆ β song at β βββΆ β piano roll β βββΆ β you learned β
β analysis β β any speed β β to verify β β in journal β
ββββββββββββ βββββββββββββ ββββββββββββββ ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Next session β
β picks up here β
ββββββββββββββββ
The Song Library
120 songs across 12 genres, built from real MIDI files. Each genre has one deeply annotated exemplar β with historical context, bar-by-bar harmonic analysis, key moments, teaching goals, and performance tips (including vocal guidance). These exemplars serve as templates: the AI studies one, then annotates the rest.
| Genre | Exemplar | Key | What it teaches |
|---|---|---|---|
| Blues | The Thrill Is Gone (B.B. King) | B minor | Minor blues form, call-and-response, playing behind the beat |
| Classical | FΓΌr Elise (Beethoven) | A minor | Rondo form, touch differentiation, pedaling discipline |
| Film | Comptine d'un autre Γ©tΓ© (Tiersen) | E minor | Arpeggiated textures, dynamic architecture without harmonic change |
| Folk | Greensleeves | E minor | 3/4 waltz feel, modal mixture, Renaissance vocal style |
| Jazz | Autumn Leaves (Kosma) | G minor | ii-V-I progressions, guide tones, swing eighths, rootless voicings |
| Latin | The Girl from Ipanema (Jobim) | F major | Bossa nova rhythm, chromatic modulation, vocal restraint |
| New-Age | River Flows in You (Yiruma) | A major | I-V-vi-IV recognition, flowing arpeggios, rubato |
| Pop | Imagine (Lennon) | C major | Arpeggiated accompaniment, restraint, vocal sincerity |
| Ragtime | The Entertainer (Joplin) | C major | Oom-pah bass, syncopation, multi-strain form, tempo discipline |
| R&B | Superstition (Stevie Wonder) | Eb minor | 16th-note funk, percussive keyboard, ghost notes |
| Rock | Your Song (Elton John) | Eb major | Piano ballad voice-leading, inversions, conversational singing |
| Soul | Lean on Me (Bill Withers) | C major | Diatonic melody, gospel accompaniment, call-and-response |
Songs progress from raw (MIDI only) β annotated β ready (fully playable with musical language). The AI promotes songs by studying them and writing annotations with annotate_song.
Sound Engines
Six engines, plus a layered combinator that runs any two simultaneously:
| Engine | Type | What it sounds like |
|---|---|---|
| Oscillator Piano | Additive synthesis | Multi-harmonic piano with hammer noise, inharmonicity, 48-voice polyphony, stereo imaging. Zero dependencies. |
| Sample Piano | WAV playback | Salamander Grand Piano β 480 samples, 16 velocity layers, 88 keys. The real thing. |
| Vocal (Sample) | Pitch-shifted samples | Sustained vowel tones with portamento and legato mode. |
| Vocal Tract | Physical model | Pink Trombone β LF glottal waveform through a 44-cell digital waveguide. Four presets: soprano, alto, tenor, bass. |
| Vocal Synth | Additive synthesis | 15 Kokoro voice presets with formant shaping, breathiness, vibrato. Deterministic (seeded RNG). |
| Guitar | Additive synthesis | Physically-modeled plucked string β 4 presets (steel dreadnought, nylon classical, jazz archtop, twelve-string), 8 tunings, 17 tunable parameters. |
| Layered | Combinator | Wraps two engines and dispatches every MIDI event to both β piano+synth, vocal+synth, etc. |
Keyboard Voices
Six tunable piano voices, each adjustable per-parameter (brightness, decay, hammer hardness, detune, stereo width, and more):
| Voice | Character |
|---|---|
| Concert Grand | Rich, full, classical |
| Upright | Warm, intimate, folk |
| Electric Piano | Silky, jazzy, Fender Rhodes feel |
| Honky-Tonk | Detuned, ragtime, saloon |
| Music Box | Crystalline, ethereal |
| Bright Grand | Cutting, contemporary, pop |
Guitar Voices
Four guitar voice presets with physically-modeled string synthesis, each with 17 tunable parameters (brightness, body resonance, pluck position, string damping, and more):
| Voice | Character |
|---|---|
| Steel Dreadnought | Bright, balanced, classic acoustic |
| Nylon Classical | Warm, soft, rounded |
| Jazz Archtop | Mellow, woody, clean |
| Twelve-String | Shimmering, doubled, chorus-like |
The Practice Journal
After every session, the server captures what happened β which song, what speed, how many measures, how long. The AI adds its own reflections: what it noticed, what patterns it recognized, what to try next.
---
### 14:32 β Autumn Leaves
**jazz** | intermediate | G minor | 69 BPM Γ 0.7 | 32/32 measures | 45s
The ii-V-I in bars 5-8 (Cm7-F7-BbMaj7) is the same gravity as the V-i
in The Thrill Is Gone, just in major. Blues and jazz share more than the
genre labels suggest.
Next: try at full speed. Compare the Ipanema bridge modulation with this.
---
One markdown file per day, stored in ~/.ai-jam-sessions/journal/. Human-readable, append-only. Next session, the AI reads its journal and picks up where it left off.
Install
npm install -g ai-jam-sessions
Requires Node.js 18+. No MIDI drivers, no virtual ports, no external software.
Claude Desktop / Claude Code
{
"mcpServers": {
"ai_jam_sessions": {
"command": "npx",
"args": ["-y", "-p", "ai-jam-sessions", "ai-jam-sessions-mcp"]
}
}
}
MCP Tools
41 tools and 3 prompt templates across six categories:
Learn
| Tool | What it does |
|---|---|
list_songs | Browse by genre, difficulty, or keyword |
song_info | Full musical analysis β structure, key moments, teaching goals, style tips |
registry_stats | Library-wide stats: total songs, genres, difficulties |
list_measures | Every measure's notes, dynamics, and teaching notes |
teaching_note | Deep dive into a single measure β fingering, dynamics, context |
suggest_song | Recommendation based on genre, difficulty, and what you've played |
practice_setup | Recommended speed, mode, voice settings, and CLI command for a song |
compare_songs | Cross-genre pattern recognition β key relationships, pitch/interval similarity, shared forms, teaching connections |
annotation_progress | Track annotation quality across the library β scores, grades, and improvement suggestions |
server_info | Server version, library stats, engine list, active session |
Play
| Tool | What it does |
|---|---|
play_song | Play through speakers β library songs or raw .mid files. Any engine, speed, mode, measure range. |
stop_playback | Stop |
pause_playback | Pause or resume |
set_speed | Change speed mid-playback (0.1Γβ4.0Γ) |
playback_status | Real-time snapshot: current measure, tempo, speed, keyboard voice, state |
view_piano_roll | Render as SVG (hand color or pitch-class chromatic rainbow) |
score_performance | Score a MIDI play-along β pitch accuracy, timing, completeness, with graded feedback |
mute_hand | Mute or unmute left/right hand during practice β isolate one hand at a time |
preview_teaching_cues | See all teaching notes and key moments before playing |
Sing
| Tool | What it does |
|---|---|
sing_along | Singable text β note-names, solfege, contour, or syllables. With or without piano accompaniment. |
ai_jam_sessions | Generate a jam brief β chord progression, melody outline, and style hints for reinterpretation |
Guitar
| Tool | What it does |
|---|---|
view_guitar_tab | Render interactive guitar tablature as HTML β click-to-edit, playback cursor, keyboard shortcuts |
list_guitar_voices | Available guitar voice presets |
list_guitar_tunings | Available guitar tuning systems (standard, drop-D, open G, DADGAD, etc.) |
tune_guitar | Adjust any parameter of any guitar voice. Persists across sessions. |
get_guitar_config | Current guitar voice config vs factory defaults |
reset_guitar | Factory reset a guitar voice |
Build
| Tool | What it does |
|---|---|
add_song | Add a new song as JSON |
import_midi | Import a .mid file with metadata |
annotate_song | Write musical language for a raw song and promote it to ready |
save_practice_note | Journal entry with auto-captured session data |
read_practice_journal | Load recent entries for context |
list_keyboards | Available keyboard voices |
tune_keyboard | Adjust any parameter of any keyboard voice. Persists across sessions. |
get_keyboard_config | Current config vs factory defaults |
reset_keyboard | Factory reset a keyboard voice |
score_annotation | Score annotation quality across 5 dimensions β completeness, depth, specificity, teaching value, vocabulary |
validate_song_entry | Validate a song JSON against the schema before adding |
transpose_song | Transpose a song up or down by semitones β new key, new notes |
list_sections | View structural sections of a song (Intro, Verse, Chorus, etc.) |
add_section | Add a section marker to a song for structural navigation |
MCP Prompts
Three prompt templates for structured teaching workflows:
| Prompt | What it does |
|---|---|
annotate_song | Guided annotation workflow β study an exemplar, write musical language for a raw song |
practice_plan | Build a structured practice plan based on genre, difficulty, and goals |
performance_review | Review a completed session β what went well, what to focus on next |
CLI
ai-jam-sessions list [--genre <genre>] [--difficulty <level>]
ai-jam-sessions play <song-id> [--speed <mult>] [--mode <mode>] [--engine <piano|vocal|tract|synth|guitar|piano+synth|guitar+synth>]
ai-jam-sessions sing <song-id> [--with-piano] [--engine <engine>]
ai-jam-sessions view <song-id> [--measures <start-end>] [--out <file.svg>]
ai-jam-sessions view-guitar <song-id> [--measures <start-end>] [--tuning <tuning>]
ai-jam-sessions info <song-id>
ai-jam-sessions tune <keyboard-id> [--param value ...] [--reset] [--show]
ai-jam-sessions tune-guitar <voice-id> [--param value ...] [--reset] [--show]
ai-jam-sessions keyboards
ai-jam-sessions guitars
ai-jam-sessions stats
ai-jam-sessions library
ai-jam-sessions ports
ai-jam-sessions help
ai-jam-sessions --version
Status
v1.4.0. Six sound engines, 41 MCP tools, 3 prompt templates, 120 songs across 12 genres with deeply annotated exemplars. Song transposition, section markers, per-hand mute/solo for focused practice. Interactive guitar tablature editor. Browser cockpit with 20 vocal presets, 10 instrument voices, 7 tuning systems, and an LLM-facing score API. Piano roll visualization in two color modes. Practice journal for persistent learning. Session state persistence across server restarts. MIDI play-along scoring, annotation quality assessment, and cross-genre pattern recognition. The MIDI is all there β the library grows as the AI learns.
Security & Privacy
Data touched: song library (JSON + MIDI), user songs directory (~/.ai-jam-sessions/songs/), guitar tuning configs, practice journal entries, local audio output device.
Data NOT touched: no cloud APIs, no user credentials, no browsing data, no system files outside the user song directory. No telemetry is collected or sent.
Permissions: MCP server uses stdio transport only (no HTTP). CLI accesses local filesystem and audio devices. See SECURITY.md for the full policy.
License
MIT
