I have a list of pitch and octave pairs that i would like to sort ascending or descending:
[['G', 2], ['D', 3], ['B', 3], ['A', 3], ['B', 3], ['D', 3], ['B', 3]]
First sorting should be done on the octave values. Thats easy as the octaves are integer values. My problem is that i don't know how to sort by pitch after sorting by octave. The order is (lowest to highest pitch):
C, D, E, F, G, A, B
I think it's possible to do that in one line in python, but i don't even know how to do it in 100 lines ;)
Any help would be appreciated, thanks