Manipulate Incoming Audio ??? (SEMITONES)

Hey all,

I would like to make a device that take a microphone as input, and feeds that signal top am Arduino and the Arduino spits out that audio in real time to a dedicated audio jack output,

sounds simple enough, but here's the tricky (for me) part, which is, when a button is pressed it takes that same audio signal and bends the pitch of the signal up or down X amount of semitones.

Does anyone know how this can be done?
I'm not too interested in the actual pitch frequency of the signal being created in real time, only taking the WHOLE overall signal and increasing our decreasing the SEMITONES however amount (for example, a certain button should take the signal UP 1 SEMITONES, another button could take it DOWN two semis, another button takes it UP/DOWN 12 SEMITONES, etc)

If anyone knows any knowledge on this, it would help a lot! I'd like to know the code of it cause the hardware side of it is pretty straightforward.




Bless you.

Please note that I have not tested that code yet, so it might not work as expected. Also note there has been no feedback either way.