I think the OP may be requesting an audio analysis that gives a value for the estimated key & scale of a given track e.g. key=A, scale=minor
This can be done by analyzing the spectral peaks to create a harmonic pitch class profile (HPCP), the key and scale can then be estimated from the HPCP based on the genre of the music.