title: Increasing the pitch of audio using a varied value
body: <p>Okay, this a bit of maths and DSP question. </p>
  
  <p>Let us say I have 20,000 samples which I want to resample at a different pitch. Twice the normal rate for example. Using an <a href="https://stackoverflow.com/questions/1125666/how-do-you-do-bicubic-or-other-non-linear-interpolation-of-re-sampled-audio-dat">Interpolate cubic method found here</a> I would set my new array index values by multiplying the i variable in an iteration by the new pitch (in this case 2.0). This would also set my new array of samples to total 10,000. As the interpolation is going double the speed it only needs half the amount of time to finish. </p>
  
  <p>But what if I want my pitch to vary throughout the recording? Basically I would like it to slowly increase from a normal rate to 8 times faster (at the 10,000 sample mark) and then back to 1.0. It would be an arc. My questions are this:</p>
  
  <p>How do I calculate how many samples would the final audio track be? </p>
  
  <p>How to create an array of pitch values that would represent this increase from 1.0 to 8.0 back to 1.0</p>
  
  <p>Mind you this is not for live audio output, but for transforming recorded sound. I mainly work in C, but I don't know if that is relevant. </p>
  
  <p>I know this probably is complicated, so please feel free to ask for clarifications. </p>