Skip to content

Instantly share code, notes, and snippets.

@CalvinLogan
Created December 4, 2018 22:53
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 CalvinLogan/1fd45e0c9a5df16fb823bded2aed10e2 to your computer and use it in GitHub Desktop.
Save CalvinLogan/1fd45e0c9a5df16fb823bded2aed10e2 to your computer and use it in GitHub Desktop.
# Loops through the score, part, and phrase to make a list of all the notes
def getNotes():
global parts, notes, phrases, score
parts = score.getPartList()
for part in parts:
for phrase in part.getPhraseList():
phrases.append(phrase)
for note in phrase.getNoteList():
notes.append(note)
d = note.getDuration()
# Prints all the notes and their attributes
return notes
def noteImage(note):
global notes
for note in notes:
note.getPitch()
if note in a:
#put in this graphic and draw to screen
elif note in aS:
#put in this graphic and draw to screen
elif note in aF:
#etc..
elif note in b:
elif note in bS:
elif note in c:
elif note in cS:
elif note in d:
elif note in dS:
elif note in e:
elif note in eF:
elif note in f:
elif note in fS:
elif note in fF:
elif note in g:
elif note in gS:
else:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment