Skip to content

Instantly share code, notes, and snippets.

@jsundram
Created July 21, 2013 23:44
Show Gist options
  • 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