# Is there a good way to phase align samples?



## diggler (Jan 25, 2012)

Does anybody know if there is a good way to phase align sample layers so crossfades are smoother from pp-ff. I would like to know if anybody has a good method of doing this I am stumped. Thanks for your time.


----------



## polypx (Jan 26, 2012)

There is no simple way to phase align two different samples. You don't need to just phase align the beginning or the fundamental, but all the harmonics throughout the sample. Giorgio Tommasini has a method, but it's patented, and I assume, very complicated.


----------



## diggler (Jan 26, 2012)

How about instead of phase alignment a different way to optimize samples for cross-fades or FFT AET filters that is not as complicated?


----------



## paoling (Jan 29, 2012)

Well. There's a way. Pick up Redmatica Keymap: tune the samples to perfection with their Harmonic Resynthesis tool. Then with an editor you can cut the samples in order to have all the waves in phase.

If you then crossfade them you will have no phase cancellation between the samples.

One drawback: if your samples have a vibrato you will lost it (apart for the amplitude component), but you reproduce it with a LFO or something similar acting on the whole group(s).


----------



## Frederick Russ (Jan 29, 2012)

What Paoling said. Its not quite like phase aligning samples but Keymap gets the job done for seamless loops.


----------



## polypx (Jan 29, 2012)

I love Keymap, but I can't get the HR to make crossfades non-chorusy. Is there a trick to it?


----------



## noiseboyuk (Jan 29, 2012)

I know this is overlapping with the other phase thread, but do you guys mean phasing? Chorusing I get, but if the two samples are different recordings of different velocities, I don't think it's phasing you're hearing.

Doubling up though is a real problem. It's worse with a solo instrument. I don''t know how LASS FC works as well as it does, I really don't - the moment you get two or more samples of a solo instrument, you should hear the doubling effect very clearly. Find Andrew K and buy him LOTS of beer....

EDIT - forgot to say that the original question I can definitely see applying to different mics of the same performance. Usually these are edited at the same time, but if you don't do it like that I wonder if you are stuck. Interesting to me that Symphobia's 1 and 2 keep their stage and close mics as either / or alternatives rather than being able to mix between the two positions - perhaps they ran into this problem?


----------



## paoling (Jan 30, 2012)

Well, I can't post my examples, since the samples were from third part libraries but to phase align some thing you need 2 things:

1) A tool to make sure that the tune is steady. 
2) A tool to syncronize the starts of the samples.

The tune shuld be perfectly steady, since slight variations of the period can make the waves to go out of sync. Keymap is an example, but you just need a tool to perfectly tune the sample during all its lenght. (I don't know if there are alternatives, the tool should operate at a sample level).

Then when the waves are strictly following the same period you can sync the starts, with an editor or straight in Kontakt, setting the sample start yo the first zero point.

This is, for me the trick and I can't imagine about other kind of methods (apart from narrowing the transition part with an S-Shaped XFade). 

Just make sure that the waves are always adding and never subtracting.
Anyway this is, to me all that is need to know about "morphing". Oh, since phase cancellation even happens in reality, I'm not sure that this method works for ensemble samples. For example HW Strings to me have a totally smooth fade between the various layers and I'm quite sure that is not phase aligned. It even makes no sense to straight tune a whole ensemble sample since every player is playing at a slightly different pitch!

So, in my opinion phase-aligning the samples only works for samples representing a single pitch; and I think this is the secret behind the fact that the most advanced libraries in that sense, SampleModelling and WIVI, covers solo instruments.

Oh, this technique could be a nice way to create some new sounds by morphing different families of instruments.

Paolo


----------



## noiseboyuk (Jan 30, 2012)

Thinking about it, it definitely can't be phasing - with a solo voice, that technique is called double tracking, and that's the exact same effect I'd expect to hear with solo samples, not phasing. Paolo's advice sounds good though - two different pitches, albeit small variations, will sound horrible.


----------



## diggler (Jan 30, 2012)

Redmatica sounds great thanks for the tips guys I really appreciate it.


----------



## Ben H (Feb 14, 2013)

Can anyone suggest some alternative tools to Redmatica Keymap?

Preferably PC-based and still available?


----------



## MacQ (Feb 15, 2013)

Didn't Chris Hein mention in another thread that he'd finally cracked this nut, and was going to make the method available to other developers?

As for a Keymap alternative for PC, there really is none that I'm aware of. A market gap, for sure.


----------



## Nick Batzdorf (Feb 15, 2013)

NBUK, you're talking about the doubling that happens during the crossfade between velocity layer samples.


----------



## Big Bob (Feb 15, 2013)

Hey diggler,

Have you tried using the AET filter? For many situations it does a remarkably convincing job as the' poor man's harmonic alignment' if you use it properly. 

Have you seen the tutorials by David Carpenter and myself? They're titled *AET Tutorial Guide Part 1* and *AET Tutorial Guide Part 2* (although David has never gotten around to finishing Part 2 :( ). You can download these tutorials here:

www.bigbobsmusicworld.com/kontakt-documents

Rejoice,

Bob


----------



## Ben H (Feb 15, 2013)

MacQ @ Sat Feb 16 said:


> As for a Keymap alternative for PC, there really is none that I'm aware of. A market gap, for sure.



Well I'm not really after a WHOLE replacement for Keymap. Just something like the Harmonic Re-synthesis tool.



BigBob @ Sat Feb 16 said:


> Have you tried using the AET filter? For many situations it does a remarkably convincing job as the' poor man's harmonic alignment' if you use it properly.



Kontakt's AET is often described as "the poor man's harmonic alignment."
Translation: it does a pretty ordinary job, but in some cases you can get acceptable/useable results.



MacQ @ Sat Feb 16 said:


> Didn't Chris Hein mention in another thread that he'd finally cracked this nut, and was going to make the method available to other developers?



He did, but I'm not a developer. Also, IDK whether he is asking for a fee and how much he would charge. I seriously doubt he's giving away his knowledge though, seeing as this "morphing voodoo" is what gives him and a few other developers their competative edge.

It mustn't be impossible to figure out how to do. 

The following developers have all solved the problem to varying degrees: Samplemodeling, Chris Hein, Greg Schlaepfer (Orange Tree Samples), Benjamin D, as well as others I have probably missed.

Anyway I just think that it's time the knowledge of these methodologies become available to the common man.


----------



## diggler (Feb 15, 2013)

I know about the AET Morph I am David Carpenter :D :D you are funny Bob. I have found that it does work with some samples. A majority of samples display signs of phasing and artifacts though.

May have found a better way of preparing samples still need to test it more to confirm.


----------



## Big Bob (Feb 16, 2013)

Why David, you little rascal, you mean you expect me to remember something like diggler = David Carpenter ? :roll: I've got all I can do to remember my own name these days. :lol: 



> I have found that it does work with some samples. A majority of samples display signs of phasing and artifacts though.



Maybe that explains why you never finished Part 2 of our tutorial :roll: 
Actually, it has been doing a very good job for almost everything that I have been using it with. But then, my area of interest is rather narrow compared to most of you.



> May have found a better way of preparing samples still need to test it more to confirm.



I hope it works out and of course that you will share it with us one day soon. 

Now I have go write down somewhere that David Carpenter is an alias for diggler :lol: 

God Bless,

Bob


----------



## diggler (Feb 16, 2013)

God bless you Bob the screen name isn't the easiest to remember and I don't post here a whole lot either just thought it was a bit funny. The preparation method I am testing is impossible to do with samples that are already recorded.

Much depends on the initial recording and mic placement I will post back when I can confirm it works with a variety of instruments.

Talk to you soon David.


----------



## Giorgio Tommasini (Feb 20, 2013)

> There is no simple way to phase align two different samples. You don't need to just phase align the beginning or the fundamental, but all the harmonics throughout the sample. Giorgio Tommasini has a method, but it's patented, and I assume, very complicated.



This is exactly what is needed. Necessary, but not sufficient though :wink: 

Giorgio


----------



## mk282 (Feb 20, 2013)

So are we getting that Part 2 of AET tutorial, Dave?


----------



## Jake Johnson (Feb 27, 2013)

A slightly different question about the same general subject:

Has anyone worked with trying to phase-align a convolution sample with samples from the instrument? The start of the convolution sample, in other words, would need to be trimmed to match the starting phase of a set of samples that were themselves already phase aligned.


----------



## polypx (Feb 27, 2013)

I may be mistaken, but as far as I understand convolution ignores phase entirely, as it's a multiplication in the frequency domain. Would love to learn more if anyone has a deep knowledge tho.


----------



## mk282 (Feb 28, 2013)

^^^^ Correct.


----------



## Jake Johnson (Feb 28, 2013)

polypx @ Wed Feb 27 said:


> I may be mistaken, but as far as I understand convolution ignores phase entirely, as it's a multiplication in the frequency domain. Would love to learn more if anyone has a deep knowledge tho.



I'm not sure that I understand what you are saying. My understanding of convolution is limited, as this may reveal: my simplified impression was that convolution, as we hear it when the reverb of one sample is applied to another set of samples, measures the timing and amplitude of the returning waves of a source impulse file and reproduces that timing and amplitude using the waves of the instrument.

Thus, trimming the impulse wave file so that it started in the same phase position as the samples of the instrument would align the initial peak amplitudes of the source file and the instrument's samples. If the two samples instead start at different phase stages, isn't it possible that the greatest amplitude of the impulse wave would be for the lowest amplitude of the instrument\target sample? In other words, the reverb's first impulse could be silence or a reflection of the target's wave when it was at a low amplitude level?

Just explaining what may be my limited understanding here. Can you refer me to a source that explains about convolution and phase?


----------



## mk282 (Mar 1, 2013)

http://en.wikipedia.org/wiki/Convolution


Convolution doesn't measure timing nor amplitude of any "returning waves" or anything. It is just superimposing one function with another. German word "faltung" (folding) sort of explains it.


See those two GIFs on the wiki page, it's pretty much very well displayed what exactly convolution does.


----------



## diggler (Mar 1, 2013)

Still testing a couple different methods mk282. I need more solid results before I can confirm and document. This has hindered completion part 2 of the guide a little. I have to say the proof is in the pudding. 

I am making a couple different sample libraries at the moment one is a flute near completion and the other planned is a clarinet. Once I finish these up I think there will be enough data for me to make some conclusions.

Phase Alignment is not part of the process But recording and editing samples in a specific way is. Not to say that it couldn't be, however I don't like editing the wav too much from it original form. 

Really my experiments with phase alignment were not very functional probably not doing something right.


----------



## Jake Johnson (Mar 1, 2013)

I was referring to the impulse file for a convolution reverb. Before a convolution can take place, the timing and amplitudes of the returning waves in the original source file must be known. My impression is that the cpu does not simply apply them directly to the output. It instead converts them to digits, which is what measuring means, and then imposes the numbers on the output. Even if the amplitudes and timing can be expressed in a function, that function can only be calculated once the amplitudes and intervals are known.


----------



## mk282 (Mar 4, 2013)

There is no "conversion to digits", it's all 0s and 1s - both the original audio and the convolved impulse response. Convolution process is utilizing Fourier Fast Transform to apply the impulse onto audio, which is basically just a stream of 0s and 1s. FFT works in blocks (so, not on one digit individually). However, zero-latency convolution (like in Kontakt) probably works slightly differently.


----------



## bosone (May 18, 2017)

Hi everyone!
i was trying to download AET tutorials from here
http://www.bigbobsmusicworld.com/kontakt-documents
but the dropbox files do not exist anymore!
any idea?


----------



## Leon Willett (May 18, 2017)

If anyone is still interested, try simply "flattening" the pitch of the samples completely using melodyne or similar. Now, without needing to actually phase align the samples, they should crossfade completely smoothly (without sounding like two instruments in the crossfade portion). 

For what it's worth, after many explorations with custom libs, I have found that this kills the spirit of the samples quite a lot, and have gravitated towards single velocity layer instruments that can only "do" one thing well, and suck at everything else. Like, for example, a trumpet patch that is only good at bright and punchy. And if I need lyrical and flowing, I simply use another patch. That way, you can only use one dynamic layer with great results. Maybe a bit of filtering here or there for extra expression, but no actual cross fading. 

Berlin woodwinds expansion B "gets" this concept, and has, for example, the best lyrical oboe out there by far. But it can't really do other playing styles that well (like punchy or whatever). If you can accept that (having lots of tracks basically... one for every playing style), then you can get perfect results much more often. 

So ultimately, to make a long story even longer, I don't recommend crossfades unless its for groups of instruments like strings or ensemble brass :D 

Good luck


----------



## d.healey (May 18, 2017)

bosone said:


> Hi everyone!
> i was trying to download AET tutorials from here
> http://www.bigbobsmusicworld.com/kontakt-documents
> but the dropbox files do not exist anymore!
> any idea?


I'll send you it later today when I'm at my main PC. The AET is really quite a good feature but unfortunately it has been neglected by NI and they haven't fixed some bugs with it (as far as I'm aware) that have been there since the beginning, such as artefacts with 48k samples.


----------



## bosone (May 18, 2017)

thanks!


----------



## tonaliszt (May 18, 2017)

Leon Willett said:


> If anyone is still interested, try simply "flattening" the pitch of the samples completely using melodyne or similar. Now, without needing to actually phase align the samples, they should crossfade completely smoothly (without sounding like two instruments in the crossfade portion).
> 
> For what it's worth, after many explorations with custom libs, I have found that this kills the spirit of the samples quite a lot, and have gravitated towards single velocity layer instruments that can only "do" one thing well, and suck at everything else. Like, for example, a trumpet patch that is only good at bright and punchy. And if I need lyrical and flowing, I simply use another patch. That way, you can only use one dynamic layer with great results. Maybe a bit of filtering here or there for extra expression, but no actual cross fading.
> 
> ...


This is exactly the conclusion I've reached as well.


----------



## d.healey (May 18, 2017)

bosone said:


> Hi everyone!
> i was trying to download AET tutorials from here
> http://www.bigbobsmusicworld.com/kontakt-documents
> but the dropbox files do not exist anymore!
> any idea?


Here you go 
http://s000.tinyupload.com/index.php?file_id=06791767218079942041


----------



## Phryq (May 18, 2017)

Leon Willett said:


> If anyone is still interested, try simply "flattening" the pitch of the samples completely using melodyne or similar. Now, without needing to actually phase align the samples, they should crossfade completely smoothly (without sounding like two instruments in the crossfade portion).
> 
> For what it's worth, after many explorations with custom libs, I have found that this kills the spirit of the samples quite a lot, and have gravitated towards single velocity layer instruments that can only "do" one thing well, and suck at everything else. Like, for example, a trumpet patch that is only good at bright and punchy. And if I need lyrical and flowing, I simply use another patch. That way, you can only use one dynamic layer with great results. Maybe a bit of filtering here or there for extra expression, but no actual cross fading.
> 
> ...



Hmmm, good point. I hate xfading sounds - maybe better to just collect samples that are good at one thing.


----------



## airflamesred (May 18, 2017)

Phryq said:


> Hmmm, good point. I hate xfading sounds - maybe better to just collect samples that are good at one thing.


I agree, Xfading is kind of 'this', but in an easily digestable portion. Phase alignment, to my tinitus ridden ears, feels a bit like pasturisation.


----------



## Phryq (May 18, 2017)

airflamesred said:


> I agree, Xfading is kind of 'this', but in an easily digestible portion. Phase alignment, to my tinitus ridden ears, feels a bit like pasturisation.



Well, I think the phase-alignment on Embertone / Chris Hein instruments sounds great. I haven't heard it done on anything else.

Sometimes though, I wish I could get an ultra-quiet, whisper breathy sound. I wonder if there's some kind of EQ magic for accomplishing that.

Recently with Berlin Strings, I'm simply disabling all layers except 1, and working with that.

I wish I could key-switch to different velocity layers, instead of x-fading.


----------

