3

I have problem with changing pitch of audio keeping its duration. I want to change pitch of audio and simultaneously don't change its speed.

I compiled this code but setPitch() method is empty..

Can anyone give me a solution or some hints how to do it using OpenSL ES or other C/C++ code?

I know that java isn't good to do this so I want to do it using C/C++ code.

Sorry for my English! Thanks!

Community
  • 1
  • 1
  • 2
    This is a very big question, and possibly more suited to dsp stack exchange. You're looking for a pitchshifter – Colin Jan 20 '17 at 10:41
  • Thanks for your reply! I asked there. But if there is anyone who know answer, I would appreciate if I get the soution. – Sylwester Muzyka Jan 20 '17 at 23:00

1 Answers1

2

The SoundTouch Audio Processing Library has been developped for that purpose.

It is a great library, but online examples (or documentation) are hard to find. You may have to read the source files to find out how to use it.

This is how it works internally.

You can see the results of a song processed with their library, performing various pitch alterations without altering the tempo here.


EDIT

As of today, I prefer using RubberBand: it usually gives more qualitative results.

Mathieu Rodic
  • 6,637
  • 2
  • 43
  • 49
  • Yes, I saw this library but I tried meny times to add this to my existing project and it didn't work.. Maybe you know how to add this to exusting Android Studio project? – Sylwester Muzyka Feb 20 '17 at 10:27
  • Found this related question on SO, tell me if it works: http://stackoverflow.com/questions/11289145/android-help-in-compiling-soundtouch-lib-in-android – Mathieu Rodic Feb 20 '17 at 17:13