Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform
Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform copied to clipboard
AutomaticVocalPitchCorrection in SP v2.6 doesn't work correctly
Hello
Issue is related with "range" property. Default value is WIDE and when using AutomaticVocalPitchCorrection I can heart strange artefacts, but if I set to range TENOR or BASS and after that set WIDE again the voice sounds clear and better, without previous artefacts. Could you please explain what maybe the reason of the artefacts
#include "SuperpoweredAutomaticVocalPitchCorrection.h"
Superpowered::AutomaticVocalPitchCorrection *spVoicetune;
static bool audioProcessing(void *clientdata, float *input, float *output, unsigned int numberOfFrames, unsigned int samplerate, uint64_t hostTime) {
__unsafe_unretained SuperpoweredBridge *self = (__bridge SuperpoweredBridge *)clientdata;
if (self->spVoicetune) {
self->spVoicetune->samplerate = samplerate;
self->spVoicetune->process(input, output, true, numberOfFrames);
}
}
- (void)spVoicetuneEnable: (bool) isEnable {
if (isEnable && !spVoicetune) {
spVoicetune = new Superpowered::AutomaticVocalPitchCorrection();
spVoicetune->range = Superpowered::AutomaticVocalPitchCorrection::TENOR;
} else {
if (spVoicetune) {
delete spVoicetune;
spVoicetune = NULL;
}
}
}
- (void)setSpVoiceTuneRangeWide {
if (spVoicetune) {
spVoicetune->range = Superpowered::AutomaticVocalPitchCorrection::WIDE;
}
}
- (void)setSpVoiceTuneRangeTenor {
if (spVoicetune) {
spVoicetune->range = Superpowered::AutomaticVocalPitchCorrection::TENOR;
}
}
At start, I've used range-property is WIDE by default and output had voice artefacts, after that I set TENOR to range and it works correctly for tenor-range, but it isn't enough for me. But if after 1 second to set WIDE to range-property AutomaticVocalPitchCorrection starts work correctly