Skip to content

Instantly share code, notes, and snippets.

@jsundram
Created July 21, 2013 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsundram/6050440 to your computer and use it in GitHub Desktop.
Save jsundram/6050440 to your computer and use it in GitHub Desktop.
get haydn quartets from music21
import music21
haydn = music21.corpus.getWorkList('haydn')
haydn = [h for h in haydn if 'essenFolksong' not in h and 'symphony' not in h]
prefix, _ = haydn[0].split('haydn/')
prefix += 'haydn/'
# now we have a list of all the quartets
haydn_quartets = [h.replace(prefix, '') for h in haydn]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment