The writeup you linked to doesn't say much useful, but it appears these are bare speaker-type headphones (guessing from the size and shape). That means they are probably small speakers with 4 or 8 Ohms impedance.
You don't want to put a pot in line with speakers. That wastes power, doesn't present the right load to the amplifier, and probably messes up the frequency response due to the impedance change. The best place to put a volume control is in the signal path, not the power path. This means put it at the input of the amplifier that drives the headphones.
Whatever is driving the amplifier input is probably a "line" output. These usually have a few 100 Ohms impedance with a nominal 1V signal. A 1 kΩ logarithmic taper pot would be about right. Nowadays logarithmic tapers are harder to find because old fashioned analog pot volume controls aren't used that much. Nowadays the signal is handled digitally somewhere anyway, so the volume control is done by a digital multiply. If you can't find a logarithmic taper pot, it's not that big a deal. A linear taper will have a lot of change at the low volume end and not much at the high volume end, but for just setting a comfortable headphone volume it's probably good enough.
You can make a linear pot non-linear by putting another resistor accross the output. This doesn't make it logarithmic, but should spread the volume range out a little. Personally I wouldn't bother with this unless you've tried it directly and really didn't like the result.
As for avoiding hum and noise in audio, make sure everything is shielded. If necessary, mount the pot in a small metal box with the box grounded to the bottom lead of the pot, which should also be the ground for the input and output cables.
Are you digitizing a variable voltage produced by an analog potentiometer?
I have used gear like that and seen the jitter and flakiness in the values being read from the pots. In my experience it could be improved substantially by cleaning the potentiometers with compressed air and alcohol.
I suspect what the problem is that DC is naively being sent across the potentiometer, and then the divided voltage is sampled.
Audio designers know that significant DC currents flowing across potentiometers (which also carry audio) will add lots of scratchy, crackling noises when those potentiometers are moved (and maybe even when they aren't).
If I were designing a circuit which digitizes the position of an analog potentiometer (rather than the obvious approach of using a rotary or linear encoder), I would drop strictly an AC signal (from an oscillator) across the pot, with no DC component. This would then be rectified, peak-detected and digitized.
Another consideration is that cheap carbon pots are more noisy than ceramic, conductive plastic or wire wound units.
A very simple software technique to smooth values is exponentially-weighted smoothing. This is a beautiful trick which allows the smoothed value to depend on all prior values, without retaining a history of prior samples. (Familiar analogy: the charging of a capacitor is similarly exponential, and the current value depends on all the past currents. However, the capacitor has no memory, per se.) Looks like there is a Wikipedia page about it.
To implement exponential smoothing, simply keep track of the estimated value \$s\$ of the potentiometer (or whatever parameter \$x\$ you're sampling).
The estimator is initialized with the first sample:
$$s_0 = x_0$$
Therafter, when a new sample is obtained, we replace the estimator with a linear blend of the existing and new value, where \$\alpha\$ is the blending factor (called "smoothing factor" in this situation).
$$s_t = \alpha x_{t-1} + (1 - \alpha) s_{t-1}$$
This can be conveniently rewritten like this:
$$s_t = (s_{t-1} - s_{t-1})^{\rightarrow 0} + \alpha x_{t-1} + (1 - \alpha) s_{t-1}$$
$$s_t = s_{t-1} - s_{t-1} + s_{t-1} + \alpha x_{t-1} - \alpha s_{t-1}$$
$$s_t = s_{t-1} + \alpha x_{t-1} - \alpha s_{t-1}$$
$$s_t = s_{t-1} + \alpha (x_{t-1} - s_{t-1})$$
In other words, the new estimate is the old estimate, plus a fraction of the difference between the new sample value and the old estimate.
If all the quantities are integers and \$\alpha\$ is some power of two constant, this is very easy to implement in code. For instance, suppose we take \$\alpha\$ to be \$1/4\$, so that we blend 25% new value, 75% estimator:
/* C pseudo-code */
s += (sample - s)/4; /* optimizes to s += (sample - s) >> 2; */
/* s returned to caller as the value */
Exponentially-weighted smoothing implemented as one line: subtract, shift right, accumulate.
Best Answer
MAKING YOUR OWN VARIABLE RESISTORS
Anything conductive, accessible, doesn't oxidise, able to be "wiped" with a wiper (resistor pickup) with adequate dying "too quickly".
As this is as much for fun as anything else "too quickly" may be able to be of lower duration in time or cycles than usually.
Resistance values that you generate may be lower than not, depending on material used.
Properly "potentiometer" mans a 3 terminal device with voltage across it and a sliding voltage tap but I'll take it to also just mean 'variable resistor.
Connection to start may be with "crocodile clips or pushed in "drawing pins" / "thumbtacks/other.
Pencil lead.
Select an old (or new) pencil.
Sharpen both ends.
Measure resistance to see what sort of pot resistance you are going to get.
CAREFULLY break open and remove the lead intact.
May need a few pencils to get it right.
Connect clips at either end.
Connect ohmmeter to one end.
Run other ohm-meter along length and note variation in resistance.
If you connect a voltage across length then you can use a slider to puck off variable voltage with position.
Resistance wire
In place of the pencil lead above you can us a length of new or used resistance wire.
Wire can be strethed tight between eg thumbtacks or nail in a piece of wood.
Note that wood becones part of the resistor.
New Nichome or Chomel wire canbe bought for modest cost.
Ohms per metre varies with thickness - thinnest possible is liable to be best.
Around 10 ohms/meter is common but higher R is possible.
Nichrome from old heater or toaster element works.
This may be somewhat oxidised with age and may be brittle.
You can sand surface carefully once stretched in place.
Butyl Rubber and friends
Black rubber used for roofing has carbon black in it.
Take meter and wander round sticking probes in rubber on sale and other material.
When you find a sheet of substance that has some resistance acquire a small sample by best permissible means and cut strips to make a pot.
Paper and salt water.
Lay out a strip of newspaper
Wet well but not until soggy with salt in water solution.
Test pot.
Note how result varies with salt concentration, degree of saturation of paper, passage of time, ...
Try copper-sulphate in place of salt.
Try "Epsom Salts"
Try ... ?
Copper wire
!!!
(1) Get thinnest possible bare copper wire.
Measure resistance.
Low but usable.
(2) Now for a very good trick.
Get thinnest (within reason) enamel or varnish or polyurethane insulated copper wire. Sortthat insulation can be "sanded" off with care.
Find a "former" that is an insulator and that you can wind your copper wire on.
Round or oval cross section is good.
Once you have built one you will get a better feel for shape that is needed. Wind copper carefully and neatly in a long ish coil along formr. Many turns.
Not too too many the first time.
Wind neatly so turns stack against each other neatly. Fasten carefully at both ends.
Now CAREFULLY use fine sand paper to sand along top surcae of coil so you expose copper on each turn BUT DO NOT TAKE OFF SO MUCH THAT COIL TURNS ALL GET SHORTED TOGETHER.
Run a wiper along the bared copper.
You have a wire-wound variable resistor.
"Plastic"
Use epoxy resin and silicone rubber.
Fill with various amounts of carbon black, or pencil graphite or powdered metal etc.
Make a track.
Let set.
Test.
Also silver filled compound used for PCB track repair.
Also ??? - look around you ... .
By now you should have a few other ideas.
Report back :-) !!!!