Show HN: YouTube Guitar Tab Parser

github.com

107 points by neogenix 1 day ago

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.

gste 22 hours ago

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

BrunkenClaas 1 hour ago

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

adrianh 1 day ago

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. :)

  • neogenix 1 day ago

    It wouldn't work for that type of video. As far as I've seen almost all tutorial videos on Youtube have a fixed tab bar though. I'm using it only for learning guitar (i'm a beginner).

    • dboreham 16 hours ago

      Not to rain on the parade but my (er...considerable) experience has been that the videos you end up watching to figure out non-trivial songs do not have tabs at all. The teacher generally describes finger positions one finger at a time visually, or will describe fingering as "it's a D chord shifted up to the 7th fret" etc. E.g Uncle Stu -- no tabs, 12-Foot Chain guy has a sketchy tab once in a while, Shutup and Play guy -- no tabs, Jon MacLennan, Justin, Marty (cool Marty) puts up pencil tabs here and there, other Marty (hat guy) does not, etc. I haven't heard Rick Beato play in a long time but I don't remember him putting up tabs either.

      Heck I'm going to say it: tabs actually aren't the medium you want anyway. After getting up and running on guitar, players know what all the chords look like so only need the names with perhaps the fret position as a guide to the voicing.

  • mschulkind 23 hours ago

    I don't have an answer, but wanted to say that I started using Soundslice about 9 months ago and I absolutely love it. It does exactly the part of transcribing that I want done for me and nothing more, which is basically none of it except the boring stuff.

    • adrianh 22 hours ago

      Hey, great to hear! Thanks for taking the time to write that. :) Keep transcribing and playing music!

    • devin 22 hours ago

      Care to sell me on it? How dose it compare to musescore?

      • mschulkind 19 hours ago

        For context, I'm not transcribing to distribute sheet music or anything, although I'm sure you could. I write down just enough when transcribing so I don't forget what I just figured out. I do it to practice my ear and learn songs.

        That said, it's the fastest way to get a track into some player, define loop points easily, and then write down what I need to along with the player. I can jot down chords, lyrics, tabs of riffs, etc. I've tried tons of solutions over the years like sooperlooper, ableton live, reaper, winamp, youtube. this is by far the easiest, with just the right set of tools. It also doesn't do any of it automatically, so there's not even a temptation to skip practicing my ear.

      • adrianh 13 hours ago

        Soundslice lets you start with a real recording (MP3 or YouTube) and integrates the audio/video playback directly with a tab/notation editor.

        So as you play the audio (with slowdown, looping, etc.), you can immediately write down what you figured out, and that written notation stays synced with the original recording. This workflow for transcription is fantastic, because otherwise you're juggling multiple apps (audio playback/slowdown, plus notation software).

        Since you asked about MuseScore: MuseScore is purely scoring software, without the ability to sync with real audio. You can also use Soundslice as a pure sheet music editor; the main difference is it's web-based as opposed to being a desktop app like MuseScore. Soundslice also has the philosophy that the music might always be displayed on different devices, so it's engraved on the fly depending on your screen dimensions. (MuseScore sort of assumes the end result will be a fixed-dimension such as paper.)

worldsavior 1 day ago

I don't know how exactly Claude vision works but isn't just using good old computer vision much cheaper?

  • neogenix 1 day ago

    Yes, for sure. You could probably train a specific vision model for this style of image parsing and run it on device for free. However, this was much easer to make :-)

    • bonoboTP 18 hours ago

      Ask Claude to code it up, then it's also easy.

XCSme 23 hours ago

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.

  • motoxpro 22 hours ago

    How would you do this without SOME sort of vision/audio model? Are you saying just not an LLM?

    • XCSme 21 hours ago

      Manually select a rectangle on a video frame, then do basic computer vision to detect notes, or even a simple image processing algorithm to find the lines and notes.

larodi 14 hours ago

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.

  • neogenix 12 hours ago

    This was what I had available, but adding support for other models/providers should be trivial. Adding support for local models is probably a bit harder and I don't have any experience with it. I doubt anything good enough will run on my macbook m1 though.

shermantanktop 22 hours ago

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.

  • tzs 20 hours ago

    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?

    • shermantanktop 20 hours ago

      Check out Amazing SlowDowner. And AnyTune Pro. Plus lots of yt player websites that allow for looping.

    • bonoboTP 18 hours ago

      VLC has it. And Youtube looper wrapper sites too.

    • adrianh 13 hours ago

      Check out Soundslice for exactly this. It's great audio/video playback (with slowdown, looping, etc.), with an integrated tab and sheet music editor. So you can write down what you've figured out, and it remains synced with the original audio.

deckar01 21 hours ago

I’ve been working on a tool to help me discover chord inversions and find fingerings I can comfortably play. https://music.shademaps.com/

  • tzs 20 hours ago

    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

nickstinemates 18 hours ago

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/

dieselgate 23 hours ago

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?

  • simonok 22 hours ago

    Using computer vision to read the existing tab from the page would be more efficient and precise than trying to use audio processing to isolate individual notes from a single instrument in a potentially busy audio track. The existing tabs also nail down which string and fret is used for each note, which would be a difficult task for audio processing because there are multiple combinations of string and fret for any given note. For example, an open G can also be played on the 5th fret of the D string, or the 10th fret of the A string, or the 15th fret of the E string.

    • dieselgate 21 hours ago

      I understand but would assume it could be solved by chord/positional groupings or similar. Manual/human tab transcription need to infer positional assumptions anyway; some artists will play the same songs different ways too ala Bob Weir

      > the existing tab from the page would be more efficient and precise

      But what about songs that aren't made into a YT video?

  • gcy 21 hours ago

    As far as I know, there still isn’t a tool that can reliably produce usable transcriptions out of the box, although the results for solo piano can be reasonably good. A lack of high-quality labeled training data, especially for instruments other than piano, is probably part of the reason. But the problem is also more complicated than it might initially seem: you have to handle polyphony, overlapping harmonics, timing and articulation. And in the case of guitar tabs, it's even more complicated as one needs to determine what tuning is used (if not standard), which string and fret produced each note. Or separately rearrange the tab.

  • lokar 21 hours ago

    Reddit r/guitar gets a lot of questions about AI generated tabs that are unplayable (the fingering is just crazy).

    You need to both work out the chords and also decide on fingerings a human could perform. Seems possible, but more then just audio processing

    • dboreham 16 hours ago

      But you can play them if you have 6-finger AI hands.

omoikane 20 hours ago

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.

readme 17 hours ago

i love it

ai can't shred

ai will never get chicks

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

Diogenesian 23 hours ago

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.

  • breaker-kind 23 hours ago

    counterargument -- these people are making money off of transcribing other people's parts, with no profits shared with the composers.

    • Diogenesian 23 hours ago

      That's a bad counterargument. Transcribing is transformative. Copying a video into a PDF is not.

      • akramachamarei 23 hours ago

        As an occasional amateur music transcriber I'd say the goal of transcription is not transformation. If I'm transforming, I've failed :)

        Inevitably the transcriber makes decisions in how to deviate from the reference recording, be it omission of instruments, microchanges in tempo and pitch or articulation. In theory a good transcription is an exact graphical representation of the abstract sonic intent of the artist.

        Of course, if you are combining voices, changing chords, it approaches an arrangement which is a more creative endeavor.

      • dahart 21 hours ago

        > Transcribing is transformative.

        Not under US Copyright Law, it isn’t. Transcribing is derivative, not transformative.

        BTW, if it was transformative, it’d be fair use and legal, and you’d be contradicting yourself.

    • shermantanktop 22 hours ago

      No.

      In some cases, the composer makes the video, and is sharing their own work.

      In other cases, the transcribed part is not a composed part, and the composer who is listed (Lennon/McCartney) did not write or perform it (e.g. Ringo's drums).

      In yet other cases, the composer was long dead before the recording was made, and the melody being transcribed is meaningfully different than the one they composed. Common in jazz.

      "Composer" is a 19th century idea, enshrined in copyright law in the 1920's in order to protect the people who made sheet music for piano players to play in their parlor. Musical expression deserves attribution and protection, but let's not pretend the name on the liner notes is a Beethoven with a long quill creating a work of genius out of their solo effort.

  • rc5150 23 hours ago

    "you don't deserve your guitar if you steal tabs from working musicians"

    the same "working" musicians who didn't write the music they're making tabs for, didn't get any permission from the original artists, and in many cases aren't actually playing/tabbing the parts as originally written.

    A "working" musician is someone who doesn't monetize someone else's work, regardless of how super hard it must be to write a PDF.

    I'd say someone should take your guitar away but I'd bet money you're not doing anything groundbreaking with it anyway.

    • earthnail 23 hours ago

      But then the solution is to just ignore these musicians.

      But if you do find that they made something valuable that you can’t find elsewhere, then you should compensate them for that. Because yes, it is a lot of work.

      • rc5150 20 hours ago

        The solution? Put in the work to learn how to play by ear, build chords from the tonic by identifying intervals and scale degrees. So when Youtube, on a whim, decides to DMCA all these "musicians" churning out tabs of popular songs, you wont be beholden to them.

        But I know, its easier to just pull up a tab.

  • altmanaltman 17 hours ago

    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

  • garbagepatch 16 hours ago

    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.

rc5150 23 hours ago

Give me a tool that scrapes tabs from Ultimate-Guitar and I'll be a happy camper :)

  • smalltorch 22 hours ago

    This is one i could get behind. I mean, all the tabs are crowdsourced anyway so why can you throw up the paywall only after all the tabs are made.

    I only need the clean tab and transposing would be nice.

    TerminalTabs anyone?

    • bstsb 22 hours ago

      as far as i remember only the Pro tabs are paywalled (the ones created professionally)? the community tabs are all freely available on web, and carry little restrictions on mobile

      • smalltorch 22 hours ago

        Exactly why I can get behind a scrape here. They are already freely accessable.

        I don't like having to switch to desktop mode to transpose though. They want you to get the app to do it on mobile which is enough of a reason to make a special program to do exactly what I want.

        Also, scraping chord charts is in a different catagory from tabs. I can't even actually read tabs but with a chord chart you can get close enough to noodle around and emulate. Good enough for my needs.

        • thorncorona 20 hours ago

          > Exactly why I can get behind a scrape here. They are already freely accessable.

          I think in most cases it is the effort that is the gate. Ex. you can DDOS most public facing services simply by spamming AI.

  • mrln 22 hours ago

    Let me introduce you to freetar! It currently has issues due to cloudflare blocking, however I have already created a pull request that fixes this [0]. Given the code is pretty straightforward, turning it into a scraper shouldn't be too hard of a task!

    Here's a working version: https://freetar.sievers.dev

    [0] https://github.com/kmille/freetar/pull/90

  • asdff 22 hours ago

    There are examples on github from the beforetimes (preai). I made my own little version with a basic ui in python a couple years ago. Works pretty good. Best to pull the powertab or guitar pro tab versions though and open in tuxguitar.

    Here is what I was cribbing from with my own version. Seems they updated it since.

    https://github.com/jabbey1/UGDownloader

  • dboreham 18 hours ago

    But the tabs would be wrong (since they're invariably wrong in UG).

kiaansaraiya 1 day ago

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!

  • neogenix 1 day ago

    I had exactly the same issue. I'm learning to play guitar and don't want to pay 8,50 per tab. I simply want to learn something new and discard it. I noticed I'm learning faster if it's printed then on-screen.

  • rc5150 23 hours ago

    learn by ear! It's free and you don't need youtube!

    • sublinear 23 hours ago

      This is very true. Tabs can help in niche cases where the precision really matters, but most tabs are not that good unless written by the original artist (rare).

      If I had spent my first year learning the instrument properly, I wouldn't have wasted the next decade after that fumbling around so much.

    • RyanOD 23 hours ago

      This is absolutely true...but it takes a LOT of time. Fortunately, I first picked up a guitar when I was 13.

      I can't imagine getting started with any instrument as an adult. Actually, I'm trying to improve my piano playing right now and it's nearly impossible.

    • neogenix 15 hours ago

      I'd love to. I'm 40+, never played an instrument in my life or did anything with music. I tried several approaches to improve my ability to recognize chords by ear or even individual notes, but it is incredibly hard for me to the point it feels impossible even for a couple of notes.