Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: AI that produces sheet music for practice?
44 points by unionemployee on Aug 6, 2023 | hide | past | favorite | 30 comments
I’m seeing some products that transcribe songs, but I want to tell an AI to write the exercises I describe for practice purposes. For example: “Write the chromatic 7th intervals from C to B in eighth notes”



Not a criticism of reality or the question, but an unrelated observation:

I find it super interesting that were at a point in time where we would find it faster to ask a computer to randomly generate a short sequence of notes rather than just, like, writing them out.

This is a good example of a class of problem where it would be so much easier for me to describe any of several workflows:

punch it into Dorico directly, write it on some staff paper, put it in logic and have it output notes,

or just stick with Arban/Rabath/Rubank/Dotzaur/et al because, functionally, most useful possible permutations of exercises have been written out somewhere by some one (with the added benefit that they were probably written out by people thinking about speicfic issues like string crossings or the break on a clarinet)

Any of those seems infinitely faster it would be to figure out how to get a LLM to randomly stumble on the exercise based on its training data.

Even if I am a just a musician and not a tech bro, I'm happy that we live in a world where that seems like an easier route to randomly generate that material than to just write it out.


On the flip side, I think we’re gonna lose a ton by not having to actively think when trying to accomplish a task like this.

I had an engineering professor in college who talked about the amount of math he was able to do in his head early in his career before taking a job that needed a calculator. It wasn’t long after he took that job that he noticed he lost most of his advanced mental math skills.

On the music stuff specifically, writing it out (or figuring it out on a piano) is useful because you’re going to need to commit intervals to memory anyway if your goal is to be a serious musician/composer/whatever.


You could create your own music by hand, but presumably someone wants to generate music because they want to target a specific skill like playing on the fly rather than playing something they just spent 15min writing.

Just like you might want to practice reading a foreign language with paragraphs you haven’t seen before, not the paragraphs you just wrote yourself. Certainly a useful skill to be able to write yourself, but not necessarily the skill you want to practice every time you want to practice reading.

I don’t see the problem.


So, as someone who made a living for a time with piano sightreading skills… there’s already a near-endless supply of free sheet music to practice sightreading with. I guess you could use it as an input for some LLM and practice against its outputs… but just… why? Part of the benefit of practicing sightreading (in a non-paid context) is that you’re playing material that you might have to “sightread” for money (quoted here because yes, it may be the second or third time you’ve seen it… sightreading vs. memorizing a piece is a whole spectrum, but customers only really care if you can play things well). I guess, there could be a market for sightreading LLM-generated music (“write me Chopin lines but with Monk chord progressions”)… at a cocktail party… for an audience that was into that? This seems really unnatural and unlikely to me though.


Amateur guitar player here, I feel like sometimes I don't know if my fingers have gotten the concept or if I've just learned a difficult passage by rote.

I'd love to have something that generates the same right hand picking pattern with a different left hand.

Also, I think there are licks that you have to be very precise with fingering or picking pattern. It would be cool to generate those.


For the latter, I’m working on something like this with my app BeatScratch. (Though I’m currently picking it back up and updating to Dart 3 after a hiatus to work on what will be its new backend in place of Reddit…) The notation format is a bit limited but does have a novel way of choosing enharmonics (like F# vs. Gb) to maximize readability. https://beatscratch.io


> I guess you could use it as an input for some LLM and practice against its outputs… but just… why?

The same reason you might want to use an LLM to generate language or a meal plan or anything really: it's interactive and you can customize it arbitrarily on the fly instead of browsing pages of content until something kinda lines up with what you want over and over again.


Is there free sheet music for popular music like there are for guitar tabs? I've tried to find this in the past but not been able.


MuseScore is a good source! But there is absolutely an art (with deeply mathematical influences) to producing pleasant-to-read sheet music. You’re better off paying for even mediocre songbooks, say Hal-Leonard or Alfred press, for musicians or even just genres you like, than sticking purely to free sources. For $5-20 a book (of say, 8-20 songs) I would argue it’s better to pay for it.


Thesession.org, imslp.org


it's a series of notes with the same mathematical relationship to one another. It's like the times tables, you should memorize them and writing them down is another mode to help memorization


A lot of peers in my PhD cohort and myself were always impressed with how much more math the average dissertation seemed to contain 50 years ago when we’d flip through the copies kept in the break room. Even non-theorists had to do a lot more analysis themselves since simulations were non-existent, not accessible, or not good enough for their needs back then.

We always wondered if we were missing out on some insight or intuition by not having to churn through the mathematical analysis they did because simulation was so easy for us. On one hand, the computer can tackle situations we could never come up with a good approximation for to studying analytically. On the other hand, maybe we’d be asking our computers smarter questions if we had to grind through that stuff by hand in our own research for a few years before getting high-quality simulations.


I wrote recently about how much sense of location I've lost by using GPS, but at the same time, it's a huge boon for exploring. Everything in life is a tradeoff.


I'm one of the rare people who are the opposite. But! I always keep my gps in map mode, North up. I also zoom out as much as possible or show the full trip on screen (in units that support it). So gps is a huge noon to me building a mental map of places and their orientation to one another.

(Everybody else in my life uses go's on default "your direction is up" and it's worthless. You follow directions and have no idea which way you're going or how far :-()


TIL there's a "north is up" setting! I always found this frustrating because my mental model is also "north is up", and when zoomed in I can get confused by "your direction is up".


I would like to point out that none of your options are free... the closest would be to print staff paper on paper and hand write the notes. Which a lot of people won't like much because they don't have the skills for even that.


I guess this is a different kind of training altogether, but I’m having fun coming up with exercises to do entirely in my head. Scales don’t need to be practiced at a keyboard.

I’m an amateur and partially self-taught so I don’t know how common that is.


You can ask ChatGPT to output in Lilypond format, and use https://github.com/matthunz/staff to render it; this worked for me on your above example.


I use an app called SightReading factory for this https://www.sightreadingfactory.com/ . It's not exactly as you describe as it generates short, random but musical passages for sight reading, but it has a lot of options. It's good when you want to generate random passages to play through once and then discard.


I think you might have more luck asking it to write a script to do what you'd like. I gave ChatGPT 4 the following input:

"Please give me a python script that writes the chromatic 7th intervals from C to B in eighth notes in a convenient output format like lilypond or musicxml."

The script it gave me worked perfectly, outputting lilypond to stdout and a musicxml file that imported into musescore with no issues.


Everyone is recommending MusicXML which works very well, but for training/generative purposes the issue is that MusicXML has a lot of tags and a recursive structure that severely limits the output length. I have had success with getting ChatGPT to output .ABC files, and even luck training small transformers to output syntactically correct .ABC files. .ABC files also have some data in the header section like the key signature, tempo, and time signature, so you could add that to your prompt as well.

This blog post has some .ABC files you can see as an example:

https://gwern.net/gpt-2-music


Thanks all. Wasn't aware of MusicXML or musescore. I do write out exercises on manuscript paper and find that the time it takes and contemplation is helpful. They're legible bug generally pretty ugly, and I don't always want my notebooks to take up space when traveling. Even when I do use tools to generate certain things, I often still write them out as a way to contemplate the music without my instrument. Also having a bunch of handwritten manuscript paper makes me feel more accomplished than I am.


ChatGPT can generate Lilypond syntax. There's some wrinkles, but the basics like this can be done.


Looks like an interesting idea, but I have no cue about music to help you.

Anyway, anecdote time: My wife used to play random chords in the guitar. She explained me that if you follow some rules it would sound good. I don't remember the details, something like

X -> Y or Z

Y -> X or W

Z -> X

W -> X or Y

where X, Y, Z, W are actually A, B, C, D, E, F or G, but I can't remember which ones. (Did I mention I don't play the guitar?)

So I made a program that played in the speaker 4 notes per chord, and followed those rules to select the next chord. It was surprisingly good for the low effort I made. It was not fantastic or groundbreaking, but not horrible at least.


Music theory covers that. Simple harmonic progressions just work. C, F, G (or I, IV, V) is your basic starter progression. You can insert some other chords, and substitute chords (IV -> ii, V -> iii), etc. It'll sound good, but also predictable.


Why? Can't you just look those things up? Wouldn't this just be a sheet music search engine? Surely all of these exercises have been written down at some point


There are already practice books filled with that kind of thing.


MusicXML is a fairly simple textual format that can be rendered to sheet music for printing by standard tools like say Musescore. Maybe try targetting that.


www.nevertwenty.live is will give you the chords to any song want.


Imslp.org




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: