October 17, 2023
SCARBEE SUN BASS – FINGER is our 'bass masterpiece'. It's equipped with advanced programming and scripting that automatically handles a lot of the technical work for you.
My colleague, Nils Liberg, an expert in Kontakt scripting, and myself, Thomas Hansen Skarbye, have dedicated numerous years to developing a comprehensive framework for our bass libraries. Our mission was to tackle and solve some of the most challenging issues encountered with virtual instruments. Users of ex. Classical instrument VSTi's have had to struggle with these issues (like having individual negative track delays for not just to get each articulation arrive in same time - but also to control the timing of different dynamics/velocity) - and Im not sure any other developer has been able to solve these annoying challenges. Our first complicated task was:
Automated timing correction of attacks with compensated 'ends' to fill out the 'audio holes':
Our research initially targeted the development of Slap Bass libraries, where techniques like thumbing, plucking, and both upstroke and downstroke with a nail introduce a variety of pre-attack lengths. This groundwork lays the foundation for simplified MIDI programming of these diverse bass lines, including the seamless transition between soft and hard notes.
Without having the various attack peaks consistent - you will have to move the MIDI notes for each articulation manually - making it virtually impossible to change tempo or use groove templates and swing quantization as you will have to re-adjust everything.
A hard velocity has a shorter amount of sound before the first peak than a soft velocity because the finger movement speed is different, and different type of articulations can can also have different length of this 'pre-attack' – ex. A thumb attack will have little 'pre-attack' whereas a pluck or a pick-scrape will be very long. So if you cut all the samples so that the first large peak arrive at the same time for all the samples (so you can avoid having different negative track delay for each articulation type), you get the problem that there will be an 'audio-hole' (silence) between 2 succesive notes:
Let’s say you cut the samples so that the first peak is exactly 50 ms from the sample start point.
If you play ex. a soft note with an audible 50 ms pre-attack followed by a hard note with a 5 ms audible pre-attack + 45 ms silence - you will get and audio hole of 45 ms between the notes. The solution is to fill out the holes by delaying the note-off of the first note based on the audible pre-attack length of the second note. However it turned out to be far more complexed than we first thought as you can end up in situations where a NOTE ON begins before the NOTE OFF ends. That took more than a year of experiments and development to come up with a solution that actually worked.
Automated phase correction when combining articulations:
When you ex. combine a sustained sample with a whole-note pull-off 'tail' sample (cut at the original recorded transition point), you will only get a smooth, lifelike transition if the phase is 100% correct. If you check this by using a lowpass filter you will hear that the note is 'bending' - like if you used a Pitch-bend on th sustained sample. However if the phase is not correct you will instead hear two notes playing after each other. What we discovered was that even imperfect phase of a single ms would create problems.
First we tried to solve it by introducing advanced EQ envelopes to filter away the 'bumps' at the transitions - but the problem was that while it could fix certain bad transitions - it would at the same time destroy the good transitions. What affected the transition was different 'legato-tail' samples starting on different phase position + the time/length of the previous note. So while we could match a perfect phase in an 1/16 note pull-off in tempo 120 - we would get phase-collision if tempo was 119.9...
Since we also recorded vibrating strings we had to compensate for varying pitch and cycle lengths. And we even compensate for the use of Pitch-wheel and modulations - that also affects the phase.
So solution to this was to scan the phase of all samples and then create a system where the Kontakt script knows the exact position of the phase of any sample played - at any time. Then the script automatically moves the second note forward to make a perfect phase. A big challenge was the legato samples as they would consist of 3 parts: the source note, the transition and the target note. All 3 parts would have different phase and we would have to exactly predict the where in the phase cycle our new transition point would appear.
automated timing correction of hammer-ons, pull-offs and short slides up/down - after phase is corrected:
As we solved the first phase issue we realised that we would get a timing issue instead as the legato articulations would not be moved forward in same time. Ex the deep notes could have a phase-cycle that was larger than 30 ms and high notes cycles could be less than 1 ms.
And depending on the position of the first notes phase - the legato note could be moved any ms value. Ex if a sustained note (or any legato articulation used as the attack note) with a 30 ms cycle ended halfway - the next note would have to move 15 ms. If cycle ended 1 ms after start - the next note would have to move 29 ms, etc.
So we had to come up with a system that would compensate for the disturbed timing - meaning that whenever a legato-sample was moved in time - it would be moved back to correct timing. Now how is that possible? Wouldn’t that mean that phase would be bad again? Yes. But not if we created a timing 'headroom' where we could move the transition imperfect phase...
And this is what we did. We measured the natural timing arrival of ex a 1/16 hammer-on and then created timing compensations for all types of articulations. Ex a semi-tone slide has a shorter transition than a whole-note slide so if both samples are cut at the beginning of the transition - the arrival of the target pitch will be different. And that had to be compensated.
So months we were experimenting with time and phase - giving up many times… and then we got obsessed and solved it.