Using 10-position rotary switch to switch MP3

To interface that knob you need a chain of 1K resistors going from 5V to ground. Then you wire each node of this chain to one of your switch contacts, that includes the 5V and ground. Then you wire the common connector of your switch to an analogue input. In software you read the analogue input and you can work out the switch position from the number you read.

Very crude diagram drawn on my iPad