max with a rotary encoder

OK, I got it. I think I had something a bit different in mind, like this one:

Your link calls this a Rotary DIP Switch, which very accurately describes where you'd use it. Instead of having to toggle binary values on a DIP switch, you can enter the value in decimal with one of those devices. Any sort of configuration setting that's not changed very often.

One can turn it manually (like a rotary "encoder", but connected on an analog pin), or remotely (infrared).

A potentiometer is a very basic electronic component, even radioshack stocks a huge assortment of crappy quality ones. The arduino has 10-bit ADC, so ideally I'd be able to get 1024 different values over 3/4 of a turn of rotation, in practice, these pots aren't very good and have a lot of drift unless I ignore the bottom 2-3 bits. This is useless for my application. I do have some 10-turn pots with very complex knobs that show the value through the 10 rotations that were originally about $300 each and are physically larger than I expect my finished project to be. But they are very impractical for what I'm doing becuase of size and price.

I also have an optical rotary encoder with about 1000 steps/rev that's around the same size and price as the 10 turn pots and gives perfect squarewave outputs. But I can't use it either for the same reason.

A rotary encoder has continuous rotation, which is exactly what I need and are not limited by bits of precision that mean I need a $0.50 device to be stable over 5V/1000 steps = 5mV fluctuations.

If I wanted to use an IR remote, it would be easier to simply take the input from there instead of turning a pot.