I'm making a program that creates music. How it does this is by taking a lot of different classical piano pieces to try to learn the general structure of a piece. I have made the program, but there is only one problem - I need the songs. Now, there is plenty of sheet music for classical piano pieces out there, but my program needs the notes in plaintext. Is there an online repository of these or an easy way through software to get them? The format of the text doesn't matter as long as the format is consistent throughout all of the songs.
there's the .abc format and lilypond format. Those are about the only widely used text only score formats. But geared for making graphical notation, not analyzing scores. There's musicxml, too. But it's not very standardized and is also more geared for notation than analysis.
I kinda suspect you don't know what you're getting into :)
music is not expressed best in text. it's best expressed graphically. the time dimension (rhythm) and the frequency of note dimension almost require 2d graphics at the minimum. (pianoroll format is easiest for a computer - but not human).
so figure out how to load a .midi file. That's the standard way all scores are stored. and there are loads of them everywhere. http://imslp.org is a good spot. I'm not exactly sure how you plan to analyze the "general structure".
That sounds like a "wishful spec" that has not even started to be broken down into an actual spec. You're going to have to start with figuring out what music actually is and go from there. Can you create music by looking at lots of scores' structures manually? Because if you can't do that manually, you have no hope of programming a computer to do so.
I'm not specifically trying to sound negative, just letting you know that you are in for a pretty big learning curve :) But I've been through it. It's a great learning curve to go through. I highly recommend it. You will learn a LOT and enjoy music during the process. It's also a good idea to pick up an instrument, say piano. Best of luck to ya!
Hard-to-formulate search, but they're out there - old Nokia composer code lists.
Check out Humdrum .kern, MusicXML, Guido, or melisma for text-based score formats.
http://kernscores.stanford.edu/ is a great library of over 100,000 music pieces in .kern, which can be converted to many other formats if you prefer.
http://www.musicxml.com/music-in-musicxml/ keeps track of libraries with MusicXML formatted music files.
There's also a paper I stumbled across, "Improving optical music recognition by combining outputs from multiple sources" by Victor Padilla et al, that might help.