Control buzzer pitch with potentiometer

Hi! Im working in a project that requires a buzzer to outpu a certain frequency, which is decided by the potentiometer.
My idea was "if the potentiometer is in between 0/13% and 1/13% (i need 13 different pitches), buzz at this frequency".

How can thiis be coded? I don't have that much experience in coding. Side question: would I be able to implement an on/off button? Does this require a resistor?

Thank you very much for any help that you can provide and I'm very sorry if I posted it in the wrong category, as I didn't really know where it fit.

Start with the basics. What Arduino? What type of buzzer (a link to it would be good)?

Have you tried anything yet? If so post what you've tried and tell us what it does.E.g. can you read the potentiometer and print the values (IDE example ReadAnalogVoltage will do that), can you get the buzzer to make a sound (IDE example ToneKeyboard is very close to what you need)?

We don't generally just write programs for people, we like you to make an effort first and then we can help you to get it working.

Steve