I have a question about the physics of pitch correction of sound.
My background is physics, I'm mostly active on physics.stackexchange. (Check out my profile.)
The background of my question:
Before computerized recording there was only analog recording of sound. Let's say you are a singer and you have a recording of a piano accompinament, but you want to rehearse it at a lower pitch. Some audio tape players have adjustable tape speed. Adjusting the tape speed means that the pitch of the music and the tempo of the music change in lock-step.
It is my understanding: with the advent of computerized recording: software was developed with the capability of changing pitch and tempo independently. So then it was possible to change pitch whitout change of tempo, or change of tempo without change of pitch, or a desired combination of different shifts of pitch and tempo.
Given my physics background (knowing how sound is a superposition of many frequencies) I am stumped by the existence of software that can change pitch and tempo independently. I know it exists, I have used it, but I can't even begin to guess how it is implemented.
About viewing waveform on a computerscreen:
Years ago I copied music from a bunch of vinyl albums to CD. Some of the records had a bad scratch, causing 10 or 20 loud pops every turn at the location of that damage. Today there is software that can filter out pops like that automatically, but the software I used back then didn't have that. So what I did was: I would zoom in all the way to that spike, and sometimes I could copy an adjacent section, just a couple of miliseconds, and use that to replace a damaged section of that duration. I was never able to make it seamless, the act of pasting would always leave some artifact. That artifact was hardly audible, so it was OK, but I could never make it seamless.
I'm giving this information so that you know at what level you can answer this question.
How is pitch correction implemented? It must be a process that is fundamentally different from how pitch is changed when manipulating an analog recording.
I assume it cannot be a process of cutting up the music an putting it together again; my assumption is that that would create a ton of artifacts.
Response to the answers and comments.
In some ways my expectation has been confirmed in the answers. The original version has to be deconstructed and resynthesized at a very abstract level. Among the requirements for the level of reconstruction/resynthesization is high fidelity pitch detection, but in the real world it can be ambiguous in which octave the pitch is.
My impression is: when it comes to pitch correction there is no entry level understanding that gets you 90% of the way in, while only being 10 % wrong.
My impression is: when it comes to understanding pitch correction algorithms it's a deep dive from the get go.