The two phenomena are probably more analogous than you think.
Native speakers of languages in which tone conveys semantic content (Mandarin, for example) are more likely to have perfect pitch than speakers of tonally indifferent languages. Similarly, speakers of languages which make distinctions between two colours are more likely to be able to distinguish them than speakers of a language that doesn't. Turkish and Russian split what we call "blue" into two different colours, and as a result their native speakers find it easier distinguishing different shades of blue.
I have actually recently started learning to play the piano, and I told my tutor I could recognise Middle C by ear. She asked me if I had perfect pitch, which was a bit of an awkward question to answer. I'm extremely confident I could train myself to recognise all the tones over seven octaves. I just can't do it right now because I'm still trying to get the fingering right on Twinkle Twinkle Little Star.
Actually, I've read somewhere that there's a difference between genetic perfect pitch and trained perfect pitch. Those with the first find it physically painful to hear off-key music and to transpose known music into different keys (because it jars so much with their memory of what it's supposed to sound like), while people with trained perfect pitch have more tolerance for those things because the association isn't as ingrained. Kind of like the difference between synaesthesia and learned colour-letter combinations I guess.
This post is going to sound like an ad. Sorry about that. I'm not affiliated, etc, etc.
Last Friday I bought a very simple toy: a set of 216 little magnetic metal balls, about the size of ball bearings. Since then I've been completely entranced by it and unable to put the thing down. Here's a Flickr group to show what I mean. The little balls seem to want to come together in symmetrical patterns: you can make square and hexagonal flat patches, curved patches with 3/4/5/6-fold symmetry, stable 3D cubic lattices, fcc and hcp lattices and many hollow and solid polyhedra. So far I've managed to make a tetrahedron, two varieties of cube (1, 2), an octahedron, an icosahedron, and other stuff (my current favorite shape is the solid truncated octahedron). It's like crack for the right type of person.
And there's the rub. Carrying this toy around and showing it to my friends has made me realize with forgotten clarity that I'm special. Practically no one reacts to it the same way as me. The word "aspie" has been uttered, half in jest, half seriously. Even though my intelligence may be pretty average (judging by online tests I have lower IQ than most LW regulars), I seem to have this rare natural ability to get deeply interested in things that "normal" people find boring.
This ability... this instinctive desire to tinker with symmetrical patterns... has shaped my entire life by now, because it's what first attracted me to math and then programming. But how could it ever be environmental, if I remember having it since my earliest childhood? Is it genetic? Is math success genetic, then? What do you think?