I'm wondering if a 10 ms delay between steps is long enough for the motor to respond, especially with a cap across its terminals. Besides that the whole thing is over in 5 seconds.
It seems to me that AnalogWrite generates a PWM signal of about 500hz or about 2ms wave period. So in 10 ms you get 5 pulses of the same amplitude and smoothed by the cap. At low values of "i", say i=10, then the pulse is only 10/255*2ms wide or about 78uS. At low values of i, a 180deg rotation has to occur in the time you apply the pulse for the motor to rotate, well not exactly but close enough.
Most small DC motors are 2 pole, so you're expecting at least one 180degree rotation in 5x78uS or about in 400uS. That would be a full rotation in about 800uS, say 1mS, or 1000 rotations in 1 second, or 60000rpm, from a standing start if the duty cycle was held constant. You have very little power at low "i" so I'd be surprised if there is enough to overcome friction and inertia. On higher values I guess it's still not enough to overcome the inertia.
The motor well may run at the higher values of "i" but then the program immediately counts down again.
So I suggest you start the counter at say 125 or even higher. Also make the delay between counting up and counting back down much longer so you can actually see the effect before it counts down again. I would also want to make the delay between counts higher so there is more time for current to flow in the motor's (inductive) windings. Remember an inductor resists a change in current. Now that I think about it, this is probably more important than the inertia and friction.
So here is a challenge... Change the delay between counts first, and report your results here. Then reset that and change a different parameter, and so on. Eventually make a number of changes together...I'm curious to see the outcome.
By the way, I suspect the sound is from the motor laminations changing shape at high frequency.