At the moment the quality of time stretched audio clips is better with WSOLA than with rubberband when I use a factor of 1.5.
Since modern version of librubberband have a v3 API the quality can be increased. It's a bit confusing that – for example in Debian Bookworm – the lib is called librubberband2 with version 3.1.2 and the actual library is called librubberband.so.2.2.1. But there are 2 CLI tools: rubberband and rubberband-r3. So there is alreade the v3 API available.
I made tests with the command line tools, Qtractor's on-the-fly and Qtractor's function to create a stretched version with Clip->Merge. The version made with rubberband-r3 is the best and has no crackles in it.
Is it possible to use the v3-API in Qtractor?
Qtractor test session: http://suedwestlicht.saar.de/secdnld/stretchtest.qtz
re. Improve time stretching quality...
hi, maybe missing something in this regard...
on my knowledge, it all dependeds onto which rubberband library it is built...
let me say that, from the repos (libs), it's currently the latest v4.0.0 (librubberband3, yes confusing:))... but it really boils down to the above: which librubberband was your qtractor built/linked against, may I ask?
or iow. as I think you're on a ubuntu/debian base system, the question goes to which librubberband-dev version have you installed?
cheers
rubberband-3.3.0
I compiled and installed 3.3.0, the latest v3 before v4. It's the only librubberband on my system and Qtractor on my system is built with this lib as well as I used rubberband and rubberband-r3 CLI.
re. rubberband-3.3.0
ok, understood
please tell the exact parameters to rubberband-r3 (cli) you use to get the better results?
seeya
v2-quality: rubberband -2 …
v2-quality: rubberband -2 -t1.5 a.wav a2.wav
v3-quality: rubberband -3 -t1.5 a.wav a3.wav
The only difference was forcing v3 mode.
I think you don't have to…
I think you don't have to change anything except for using OptionEngineFiner at the constructor.
While you at it: how about…
While you at it: how about making a check box for formant preserving when changing pitch? :D
re. While you at it: how about…
that and the other option will need changes on the main Options and (audio) Clip properties and dialogs, for sure...
not impossible, just takes some more time ;)
re. Improve time stretching quality...
can you tell whether this v1.5.2.7git.5b935a [develop] is a good move?
warning: caveat emptor (as one can read from
rubberband-r3 --help
...);)
I hear no difference
Sounds if it's not using the finer algo. I tried on-the-fly and merging the clip.
double checked
I compared the new merged clip with the old clip in Audacity. When inverting (180° phase flip) the new clip they cancelled out each other perfectly.
re. double checked...
right, nothing really changes if you're still on rubberband v3.3.0, my mistake sorry
later today it will be fine though
stay tuned
I could compile & install v4…
I could compile & install v4 but I think most distributions have v3, so it's worth the effort I think.
re. rubberband finer R3 and formant preserve...
EDITED: all tamed now in qtractor >= 1.5.2.7git.eb92d2
hopefully :)
WARNING: some previous commits have been squashed and fixup (forced update); please do
git reset --hard origin/develop
if you encounter conflicts. thanks.
Unfortunately not. Maybe I…
Unfortunately not. Maybe I am doing it wrong.
Uncheck WSOLA time stretching
Check Rubberband R3 finer engine
Leave Rubberband Formant preserve unchecked
No difference on the fly and no difference when merging the clip.
BTW it's not clear that Rubberband is not used when WSOLA is checked. Shouldn't the Rubberband options be grayed out when WSOLA is checked?
re. Unfortunately not....
no, you're not doing anything wrong :)...
this is yet another mistake of mine, sent the new rubberband-r3 finer option to the void... now fixed: read above.
well, you may have a point, but rubberband is also used for pitch-shifting; only when WSOLA time stretch option is off is that rubberband is also used for time-stretching and pitch-shifting.
as I' am not sure which is used exclusively for one purpose (time-stretching or pitch-shifting) both new options (rubberband formant preserve and R3 finer engine) are there left enabled all the time.
One lil' bug
I tested formant preserve with tuning a clip 2 semitones up with great results when listening to the clip on the fly.
But when merging the clip the option formant preserve isn't applied.
re. One lil' bug...
maybe fixed now?...
qtractor >= 1.5.2.8git.7c192d
thanks
yes
Thanks, Rui.
re. Shouldn't the Rubberband options be grayed
I find this confusing too.
I think the ToolTip would fix it. They currently provide redundant information, but might give clues about the functionality.
_TimeStretchSpinBox_
If WSOLA is not selected the ToolTip might say:
"Stretch with Rubberband algorithm. If you want to use the WSOLA algorithm check it"
If it is selected:
"Stretch with WSOLA algorithm. If you want to use the Rubberband algorithm uncheck WSOLA"
_PitchShiftSpinBox_
The ToolTip might say:
"Pitch operations are always performed with the Rubberband algorithm".
_WsolaTimeStretchCheckBox_
The ToolTip might say:
"On: WSOLA mode / Off: Rubberband mode".
_WsolaQuickSeekCheckBox_
I was never clear on what it does. I guess it's:
"Low CPU usage, poor quality"
_RubberBandFormantCheckBox_
_RubberBandFinerR3CheckBox_
"Always applies to Pitch. Applies to Strech only if in Rubberband mode."
Thanks to both of you for this improvement.
P.S.
You've made me curious about the subject.
Here they do a comparison of Sox VS Rubberband, and to my ear Sox seems to sound better:
https://www.justinsalamon.com/news/sox-vs-rubberband-for-pitch-shifting…
And I think this is the most up-to-date library:
https://codeberg.org/sox_ng/sox_ng
I guess you already knew about it...
This audio thing is an inexhaustible world.
The comparision is from…
The comparision is from April 2020. Rubberband v3 with the finer, much better algorithm came a couple of years later.
Great!
Wow, Rui, that's a big improvement in audio processing quality.
Thanks a lot!
Add new comment