Measure of similarity between two distributions - with variable starting point (wrap-around) I would like to compute the (dis)similarity between two distributions. The first represents tones sung by an experimental subject during a recording. There are different numbers of tones, each with different durations. This histogram shows how much time was spent at each pitch (in Hz) by one subject:

My second distribution always represents the theoretical profile of a major key, as described in the empirical pitch perception literature:

The two distributions are comparable/equivalent if one merely takes the log of the 1st distribution (to transform frequency into equally-spaced pitch as in the 2nd); and if one considers "time spent at each pitch" (y axis in the 1st distribution) to be equivalent to "saliency" or "fit" (y axis in the 2nd).
From browsing past CV questions, I thought I'd try the Kolmogorov-Smirnov distance, the Bhattacharyya distance (second implementation here), and the Kullback–Leibler divergence. I believe all 3 measures can deal with unequal sample sizes, however the Matlab/R packages I found to implement those seem to require different inputs from what I was expecting to be asked, namely two vectors of possibly different length.
Additionally, I'd need this measure of similarity to "wrap around" or "slide", in the sense of considering any of the points in the first histogram (along the x axis) as the "starting point", by rotation, just as the note C is always the starting point in the C-major key profile given in figure 2. This is probably not critical, as I can loop this manually (i.e. compare against all 12 keys for the 2nd distribution).

Since there are still no other answers to this question and several comments by @whuber highlighted flaws in using Pearson's Chi-Square test, here is a second answer that uses the Mann-Whitney U test. Before answering, I'll point out that the question itself includes 3 possible solutions that the author seemed interested in, but abandoned only for coding problems. It may be more reasonable to try to fix the coding problem instead of seeking different methods (which again may not result in data formats that work with whatever implementations you have available).
1. Convert your theoretical distribution from tones to frequencies.
2. Auto-tune your subject's singing to make sure the pitch is correct, then change the frequencies to fit into a single octave (so that it is comparable to your single octave theoretical distribution). I'm assuming here that imperfect pitch is not a part of this study, otherwise this breaks down.
3. You can subdivide into notes as I recommended in #2 of my previous answer. Alternatively, determine the number of milliseconds for each frequency in the subject's singing, then determine the total number of milliseconds.
4. Now, make a new vector to contain sung frequencies. For each frequency sung, repeatedly add that frequency to the vector however many milliseconds it was sung. For example, if 440 hz was sung for 4000 milliseconds, add 440 to the vector 4000 times.
5. Now make the same type of vector using the theoretical distribution. If the subject sang for a total of 10000 milliseconds and the theoretical distribution says that 440 hz should be 40% of the frequencies, then add 440 to the vector $10000\times 0.4=4000$ times.
6. These two vectors now contain the distributions that you'll compare. Run the Mann-Whitney U test to compare them.
7. The data is in a format that allows you to readily visualize where the differences are, if there are any.
Comments: this may not address your circular problem without using a work-around, but I can't think of anything that does address it automatically. Your question explicitly says that you're using a major-key as your theoretical distribution and one of your comments explicitly says that you're comparing the subject's singing to a diatonic scale. If you're specifically interested in comparing to a diatonic major scale, you should be able to pick out the tonal centre of the subject's singing in order to determine which theoretical distribution you need to pick for comparison (i.e. you can hear which key they're singing in).
