An easier solution would be to have distance related to pitch as opposed to distance related to volume.
However, one way to do it your way would be depending on the distance, rout the signal through one of several pins. ie at 10 feet, pin 1, at 5 feet, pin 2, at 2 feet pin 3 etc. Each of these pins would have a different value resistor, increasing as distance increases.
I'm sure there are other ways but this came to mind quickly.