



This method has to be reversible since the neural network will output text in the same format.

I do this by extracting all the pertinent information from the guitar pro files and write them to a txt file. To use this model the guitar pro files need to be in text file format. I can use the same recurrent neural network to generate country music lyrics that seems to work pretty well. The scraper grabs 123 songs, which seems pretty good, since there are a total of 151 songs in Metallica's catalog. Mydir = os.path.dirname('out/' +band + '/') Raise ValueError('Could not find a filename')įilename = re.sub('().*?(])', '', os.path.basename(params))Ībs_path = os.path.join(directory, filename) Response = requests.get(url, stream=True) URL is expected to have a Content-Disposition header telling us what '&view_state=advanced&tab_type_group=text&app_name=ugt&order=myweight' # = Helper Functions =įunction to get xml tree given the band name Scraper to get all guitar pro filesīelow is an python script of grabbing guitar pro files from. I scrape the the website for only 5-star rated tabs, and filter for guitar pro files, and choose remove duplicate songs (for example mutliple versions) by choosing the tabs with the most ratings. To obtain the guitar pro files I scraped the website, as it has the most comprehensive repository of guitar tabs on the internet. Guitar pro files are created using specialized software (Guitar Pro), which has a built-in MIDI-editor, so much of the fine data is both available and standardized, and, in general, more accurately resembles the song it is transcripting. The image below may be helpful for understanding, above shows a guitar tablature, and below the corresponding sheet musical. Different frets on diffrent strings can have the same note, so it is a many-to-one mapping, but if we restrict ourselves to the first 4 frets it is a one-to-one mapping. Guitar tabs can be easily converted to sheet music since every fret on each string corresponds to a note. Also, additional data, such as whether the guitar is palm-muted, may often be ommited. While the guitar tab may seem quite orderly, because the tabs are user-submitted, they can differ tab to tab. This is an example of the kind of tabs I scraped in previous work on country music, that can be found here. X 0 2 2 x x 0 2 2 x x x 2 4 4 x x x x x 0 2 3 2 Below is an example of typical guitar tablature from Band- Metallica
