- chorrrds is a R package that helps you extract, analyze, and organize music chords
- It’s easy to use, has plenty of examples to get you started, and even comes packaged with several free datasets
- It can be installed directly from CRAN, or from GitHub using the devtools package
Machine learning and music – it may sound like an odd combination at first, but the two fit extremely well together. Music, or audio, generates tons of data points that can be extracted, analyzed, and worked with. That’s what Google did with NSynth, an algorithm that uses a deep neural network technique to generate sound. Artists these days are leaning on ML to generate music, and even create videos.
Music is a universal language, while machine learning is quickly becoming a universally accepted (or at least acknowledged) field of work. So far all the open source codes I have seen or covered for music related ML work have been done in Python which is understandable, given how popular the language has become. Finally, we have a simple-to-use and intuitive package for R that deals with music data.
Called chorrrds, the package scrapes data from the Cifraclub site and extracts it to your machine. The aim of chorrrds is to help R users analyze and organize music chords and it can be considered a music information retrieval (MIR) package. You can check out this article in case you’re wondering what MIR means and how it works. It’s a fairly broad field which encompasses both structured and unstructured data. The package comes pre-loaded with several datasets which
You can install chorrrds directly from CRAN by typing the below command:
If you prefer downloading and installing it from GitHub, use the below code (you need to have the devtools package installed for this):
The package comes pre-loaded with several datasets. The results are long so I’m not listing them here, but you can copy the below code and check it out yourself:
The official documentation of the package can be found here. There are enough details on the page to get you up and running with the code. If you have any ideas or suggestions on how you want to use this package, let us know in the comments section below.
Our take on this
We’ve been waiting for a while for something like to come along in R! As a music buff, it is a pleasure to dig deep into the musical chords and analyze them. You definitely need to have a bit of knowledge about music in order to extract the most out of this package but there surely isn’t a better time to start than now!
Remember the main function of the package is called get_chords() which you can use to extract chords for specific artists. The documentation has excellent examples of how to use it. Be sure to check that out!
Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!