Skip to content

Instantly share code, notes, and snippets.

@eamonnbell
Created May 25, 2014 19:22
Show Gist options
  • Save eamonnbell/df4b689bd837a6a3aff6 to your computer and use it in GitHub Desktop.
Save eamonnbell/df4b689bd837a6a3aff6 to your computer and use it in GitHub Desktop.
RGB pitch/chroma - color mapping after Sapp (2001)
# Chroma - color mapping suggested by Sapp (2001)
# Sapp, Craig. "Harmonic Visualizations of Tonal Music"
# in the Proceedings of the International Computer Music Conference (ICMC) 2001, Havana, Cuba.
# Uses music21 pitch.Names (?)
color_map = {
'A': (127, 31, 255),
'B': (255, 127, 0),
'C': (0, 255, 0),
'D': (63, 95, 255),
'E': (255, 0, 0),
'F': (255, 255, 0),
'G': (63, 191, 255),
'A#': (145, 27, 219),
'B#': (255, 145,0),
'C#': (9, 246, 36),
'D#': (73, 86, 255),
'E#': (255, 18, 0),
'F#': (218, 255, 0),
'G#': (63, 177, 255),
'A-': (118, 41, 255),
'B-': (255, 109, 0),
'C-': (36,255,0),
'D-': ( 63, 109, 255),
'E-': (237, 4, 36),
'F-': (255, 237, 0),
'G-': ( 54, 200, 218)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment