A simpler answer: You can't double the speed of the audio coming from a microphone as you play it out the speaker, because the microphone only provides 1 second of audio every second. If you doubled the speed you would only have 1/2 second of audio output every second.
You can *totally *double the speed of a sound file, synthesizer or some other non-realtime sound source. You just need to grab twice as much audio before you use your speed-changing algorithm to "resize" to the necessary amount. If you're doing the latter, just ignore all the confusing "it can't be done" responses. If you're trying to change the pitch on mic input, what you need to do is time-stretch (or time-squish) the audio and then use resampling to resize it back to the original length. That will leave you with 1 second per second of audio, just at a different pitch. Make sure the length comes out *exactly *the same or you'll get crackles! – Evan Balster creator of imitone <http://imitone.com> On Wed, Oct 3, 2018 at 3:56 PM Alex Dashevski <[email protected]> wrote: > Hi, > Could you tell me how to use soundTouch API if I want only to do > resampling ? > I mean: convert from 48Khz to 8Khz or 8Khz to 48Khz > I guess that setRate with SETTING_USE_AA_FILTER. What length should put ? > > I talk about > https://gitlab.com/soundtouch/soundtouch/tree/master/source/SoundTouch > > Thanks, > Alex > > בתאריך יום ב׳, 1 באוק׳ 2018 ב-19:46 מאת Nuno Santos < > [email protected]>: > >> Hey Alex, >> >> Have you seen this article before? >> >> https://www.surina.net/article/time-and-pitch-scaling.html >> >> It has a complete and detailed description on how time and pitch scaling >> works. >> >> Hope it helps! >> >> Best regards, >> >> Nuno >> >> On 1 Oct 2018, at 17:30, Alex Dashevski <[email protected]> wrote: >> >> Hi, >> >> I got this answer from Robert: >> WSOLA fundamentally does time-scaling. time compression or time >> stretching without changing pitch. time-scaling is not normally thought of >> as real-time because your input and output buffer pointers will collide. >> >> >> My question is: >> Why buffers will collide ? >> >> Thanks, >> Alex >> _______________________________________________ >> dupswapdrop: music-dsp mailing list >> [email protected] >> https://lists.columbia.edu/mailman/listinfo/music-dsp >> >> >> _______________________________________________ >> dupswapdrop: music-dsp mailing list >> [email protected] >> https://lists.columbia.edu/mailman/listinfo/music-dsp > > _______________________________________________ > dupswapdrop: music-dsp mailing list > [email protected] > https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________ dupswapdrop: music-dsp mailing list [email protected] https://lists.columbia.edu/mailman/listinfo/music-dsp
