Show HN: YouTube Guitar Tab Parser (github.com)

108 points by neogenix ↗ HN
I created a simple CLI that turns a YouTube guitar-lesson video into a PDF of the guitar tab.

There are services that transcribe music from Youtube videos into tabs, but they never work well enough for me. Instead I'm taking a simpler approach. It downloads the video, samples frames, uses Claude vision to locate the tab region, crops every frame to that region, de-duplicates the crops by the bar number printed on each line of the score, and stitches the distinct tab lines vertically into a PDF.

I didn't test it on a lot of different Youtube videos yet, so problem will arise for sure.

30 comments

[ 3.2 ms ] story [ 49.0 ms ] thread
i've actually been looking for something like this for so long. all the online transcribers make me pay and i just wanna learn how play songs from a video. this is a great idea!
I'm curious how it works for videos that contain moving tab (as in, the playhead stays in the center while the tab moves behind it). Seems like that sort of tab wouldn't work with this approach...?

Kudos from one of the Soundslice guys — we've been making web-based tab and sheet music stuff since 2012. :)

I don't know how exactly Claude vision works but isn't just using good old computer vision much cheaper?
Almost all those people charge for the PDFs. They know the PDF is more useful, that's why the video is free.

I don't think your software is (or should be) illegal. But it's a form of theft, and incredibly unethical. These people worked very hard on these tabs and don't make much money. You (and kiaansaraiya and neogenix) should be ashamed of yourselves. You don't deserve your guitar if you steal tabs from working musicians.

It's much more simple than that. You are not stealing their tabs, you are stealing/downloading their youtube videos which falls under copyright. Forget about the tabs, the first step is illegal and theft already. It doesn't matter how much money or work the creator does, you should not steal other people's work like this and I am sure youtube doesn't allow this on their tos
The people making the video are already making the information public, you are just making it more convenient. This strikes me as similar to downloading public court documents from a government site to make them available outside of their for-profit service.
Are there technical hurdles around just programmatically generating a tab from any song or audio recording itself?

This is interesting and all but seems to use computer vision rather than audio processing?

Give me a tool that scrapes tabs from Ultimate-Guitar and I'll be a happy camper :)
But the tabs would be wrong (since they're invariably wrong in UG).
I was excited to use it, as I really wanted something like this, then I realized it needs AI/Claude (?)

That sounds like it can get quite costly. Probably there are ways to do it without AI, I would rather manually annotate the tab area with a visual editor.

I learned this one:

https://m.youtube.com/watch?v=07N4VVSmYLU&list=RD07N4VVSmYLU...

…exactly the way you described. Pause, screenshot, adjust color/contrast, assemble in a pdf. Super annoying.

Learning music from recordings (video or just audio) would be so much easy if modern video and audio playback software would bring back the AB repeat function that used to be common on CD players, DVD players, LaserDisc players, and MP3 players.

Why the heck did this largely go away?

So I'm a bass guitarist, and I've made some of these exact videos.

I link to a Patreon in my videos that lets you pay a membership to download the full tabs in PDFs.

Here I was thinking AI might soon replace my painstakingly slow tab transcription efforts altogether. But I never thought about someone just ripping it from the video...

Let me know if it works ;-)

https://www.youtube.com/watch?v=c2i-Lwoe2Ow

I’ve been working on a tool to help me discover chord inversions and find fingerings I can comfortably play. https://music.shademaps.com/
That kind of tool is indeed helpful. I wrote a kind of similar command line version that does a subset of what your's does in C around 1985 for my Mac, running in the terminal-like window my compiler's runtime provided for running command line programs.

Your's looks nicer :-)

Here's the output of mine for a C chord.

  C:  C E G
  <3>|-----|-----|-<5>-|-----|-----|-----|-----|-<1>-|-----|-----|-----|-<3>-|
     |-<1>-|-----|-----|-----|-<3>-|-----|-----|-<5>-|-----|-----|-----|-----|
  <5>|-----|-----|-----|-----|-<1>-|-----|-----|-----|-<3>-|-----|-----|-<5>-|
     |-----|-<3>-|-----|-----|-<5>-|-----|-----|-----|-----|-<1>-|-----|-----|
     |-----|-----|-<1>-|-----|-----|-----|-<3>-|-----|-----|-<5>-|-----|-----|
  <3>|-----|-----|-<5>-|-----|-----|-----|-----|-<1>-|-----|-----|-----|-<3>-|
and here it is if I toss in the narrow switch:

  C:  C E G
   3 |---|---|-5-|---|---|---|---|-1-|---|---|---|-3-|---|---|-5-|
     |-1-|---|---|---|-3-|---|---|-5-|---|---|---|---|-1-|---|---|
   5 |---|---|---|---|-1-|---|---|---|-3-|---|---|-5-|---|---|---|
     |---|-3-|---|---|-5-|---|---|---|---|-1-|---|---|---|-3-|---|
     |---|---|-1-|---|---|---|-3-|---|---|-5-|---|---|---|---|-1-|
   3 |---|---|-5-|---|---|---|---|-1-|---|---|---|-3-|---|---|-5-|
Here's the source [1], minimally updated to compile with current C compilers and to not depend on any quirks of the runtime of whatever C development system I was using on my Mac back then (Megamax C, I think).

I was pretty shaky on chord theory back then so not sure I'd trust it for fancy chords. I have no idea why the heck I made the D tuning flag tune both the 1st and 6th strings down to D. I'm 100% certain every piece of sheet music I had that called for for D tuning only wanted the 6th string tuned down.

[1] https://pastebin.com/HKyKWHip

(comment deleted)
This is an interesting tool and maybe it works for the songs you need, but for classical guitar songs where printed scores are generally available, I would rather just buy those from some reputable publisher (e.g. Zen-On or Doremi).

It has happened quite a few times where I compare tabs in youtube videos with printed scores, and the youtube version turned out to be unique arrangements. It's the same with PDFs on certain sites, especially those that accept user contributed content.

I would rather pay money to get printed scores than to find out later that I have been practicing the wrong thing.

Brings me back to learning guitar using a version of TabIt[1] that I hacked and then ultimately paid for. They had an incredible community where people uploaded tabs of your favorite songs. Then you could use TabIt to learn how to play.

1: https://www.tabit.net/

i love it

ai can't shred

ai will never get chicks

i will use YouTube Guitar Tab Parser to shred and get chicks

Claude vision seems like a massively overpriced VLM choice given Gemini has great VLM tower since 2.4 and my gut feeling is this is a task that local Qwen’s would handle easily.

Disclaimer: my daily workflows include millions of Claude and Gemini tokens spent on dev and video vision intelligence.

I used to play a the guitar a lot back in the day. Would have loved it. Though with 240p videos back then it was hard to make out anything. :D
Does anyone know if something like this exists for piano?