Skip to content

rrherr/banjo-grammar

Repository files navigation

Let's program a banjo grammar!

For my talk at Deconstruct 2018, I made a context-free grammar to transform plain melodies into bluegrass banjo style. Here's an example:

The first 25 minutes of my talk is faux live coding this banjo grammar.

The last 10 minutes is my personal story, “crying in my banjo guru’s bathroom.” It's about how you can learn hard things, like how to be fluent in a language, whether it’s music, code, or speech.

Notebook

Here's the Jupyter Notebook. You can see the Python code, listen to 22 music clips, and read Markdown explanations step by step.

(The notebook file is a 30 MB download, because it has embedded, uncompressed audio. The notebook should be viewed with nbviewer, because GitHub does not render audio in notebooks.)

Installation

If you want to see the code and listen to the music, you don't need to install anything, you can just view the notebook.

If you want to change the code and run it for yourself, please follow these instructions:

  • Clone the repository.
  • Download & install Anaconda distribution, Python 3. (Anaconda includes Jupyter for notebooks, NLTK for context-free grammars, and more.)
  • Download & install these three command line utilities, and add them to your system path. (Binaries are available for Linux, Mac, and Windows.)
  • Download GeneralUser GS v1.471.sf2. (It's a "soundfont", used by fluidsynth.) Put it in the same directory as the repository.

Wiki

Visit the wiki (a work in progress) for links to learn more about related topics.

Contact

I'd love to hear from you! Please contact me at rrherr@gmail.com or on Twitter, @rrherr.

About

Teaching computers to play bluegrass banjo, with context-free grammars

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published