# Pitch Class, Tonal Counterparts, and Camelot Key Equivalents

The tables below show the tonal and Camelot key (alphanumeric) counterparts to pitch classes for major and minor keys.

## Spotify API

In the Spotify API, ‘key’ maps to pitch class and ‘mode’ distinguishes between major (1) and minor (0) key, which can be represented as a Python dictionary thusly:

``````		(0,1):'8B',
(1,1):'3B',
(2,1):'10B',
(3,1):'5B',
(4,1):'12B',
(5,1):'7B',
(6,1):'2B',
(7,1):'9B',
(8,1):'4B',
(9,1):'11B',
(10,1):'6B',
(11,1):'1B',
(0,0):'5A',
(1,0):'12A',
(2,0):'7A',
(3,0):'2A',
(4,0):'9A',
(5,0):'4A',
(6,0):'11A',
(7,0):'6A',
(8,0):'1A',
(9,0):'8A',
(10,0):'3A',
(11,0):'10A',``````

## Python Dictionary

Here’s a Python dictionary that can be used in a function to convert Camelot key values (“8B”) to their tonal counterparts (“C, B♯”).

``````camelot_to_tone = {'8B':'C, B♯','3B':'C♯, D♭','10B':'D','5B':'D♯, E♭','12B':'E','7B':'F','2B':'F♯, G♭','9B':'G','4B':'G♯, A♭','11B':'A','6B':'A♯, B♭','1B':'B','5A':'Cm','12A':'D♭m','7A':'Dm','2A':'E♭m','9A':'Em','4A':'Fm','11A':'G♭m','6A':'Gm','1A':'A♭m','8A':'Am','3':'B♭m','10A':'Bm'}
``````

Special thanks to: 