request: change tempo?
Would it be possible to add a method for controlling tempo of sound file?
I'm afraid that for the android side this is not possible with the current implementation, but I would be interested of this as well. MediaPlayer does not support it: http://stackoverflow.com/questions/10849961/speed-control-of-mediaplayer-in-android
And then 3 days after my previous comment someone adds the answer that it is now possible from api 23: http://stackoverflow.com/questions/10849961/speed-control-of-mediaplayer-in-android/37094353#37094353
Are there updates here?
PR #63 has been merged, so we have iOS-only support for this. Perhaps a helpful person will make a PR for the Android side - should be pretty straightforward.
I think there is a misunderstanding, tempo is not the note speed (pitch), it's the speed of a sequence of notes, so I don't see the link with the PR 63. Do we have the ability with this implementation to play timely accurate sequence of notes (tempo) ? I do not find how.
Thank you
Any update on this?
The setSpeed function might actually be the solution to this issue.
The setSpeed function allows to play a file faster/slower (at higher/lower tempo) while doing pitch correction so that playing faster does not cause higher pitches.
(now also in the android version as per https://github.com/zmxv/react-native-sound/pull/169)
I found a solution for android but don't know how to add in react native sound. I think this should be able to change the sound to chipmunk sound.
from Set pitch of a song being played in Android MediaPlayer
String recordingPath = recordingDirectory + File.separator + "music.mp3";
MediaPlayer audioPlayer = MediaPlayer.create(getApplicationContext(), Uri.parse(recordingPath));
audioPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
PlaybackParams params = new PlaybackParams();
params.setPitch(0.75f);
audioPlayer.setPlaybackParams(params);
audioPlayer.start();
and another from IOS Change Pitch Rate of Sound in Swift - XCode 6.4 and this Changing Voice Pitch using AVAudioPlayer
hope this can help someone to commit new version with these features
@kkusanagi I just added a PR #466 to support setPitch(float). Maybe a little late for your requirement, but still feel free to check it out.
did pitch get added for iOS too?