Author Topic: Real Time Pitch Shift and WAVE file advice needed.  (Read 788 times)

0 Members and 2 Guests are viewing this topic.

Offline moffyTopic starter

  • Super Contributor
  • ***
  • Posts: 2005
  • Country: au
Real Time Pitch Shift and WAVE file advice needed.
« on: December 11, 2021, 12:11:52 am »
Hello, and a merry Christmas to all. :)
I have found some pitch shifting code for my SEEED Arch Mix iMXRT1052 board:https://github.com/dbry/audio-stretch
It works surprisingly well in Windows giving good results. It takes in a WAVE file then shifts the pitch and produces a new WAVE file of the same time period. There is just one anomaly with the output file, the data rate is increased by the same proportion as the pitch shift. So if the original sample rate is 44100 Hz and the pitch shift is +10% then the new sample rate is 48510 Hz or exactly 10% faster. I am not so concerned as to why the sample rate is faster as to how Windows successfully plays it back when the sound card sample rate is set at 44100 Hz. If I try playing a 48kHz file back when the card is locked at 44.1kHz, it doesn't play. I know that technically Windows can insert a ASRC(asynchronous sample rate converter) to resample down to the 44.1kHz, but it doesn't seem to do that for the 48kHz file. It's bugging me so any enlightenment would be appreciated.
 

Offline moffyTopic starter

  • Super Contributor
  • ***
  • Posts: 2005
  • Country: au
Re: Real Time Pitch Shift and WAVE file advice needed.
« Reply #1 on: December 11, 2021, 06:20:12 am »
Seems Windows does resample: https://www.thewelltemperedcomputer.com/Intro/SQ/SampleRateConversion.htm
not sure why playing back at 48k didn't work at 44.1k.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf