Direction of phase shift when rotating sound source clockwise

DSP, Plug-in and Host development discussion.
User avatar
vortico
KVRist
198 posts since 19 Jul, 2008

Post Mon Jun 25, 2018 6:37 am

I think you need to describe your problem and use case rather than your attempted solution, as kryptonaut suggested. (See http://xyproblem.info/.)

"there's no distance difference between the sound source and the recepting (mic) side"

As I said above, this means there is no phase change. You can move the source around freely on the sphere around your microphone, and it will be impossible to determine the angles based on the sound, because the sound is unchanged (ignoring polar patterns and room ambiance).
VCV Rack open-source virtual modular synthesizer

User avatar
Aleksey Vaneev
KVRAF
3540 posts since 7 Sep, 2002

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 6:43 am

vortico wrote:I think you need to describe your problem and use case rather than your attempted solution, as kryptonaut suggested. (See http://xyproblem.info/.)

"there's no distance difference between the sound source and the recepting (mic) side"

As I said above, this means there is no phase change. You can move the source around freely on the sphere around your microphone, and it will be impossible to determine the angles based on the sound, because the sound is unchanged (ignoring polar patterns and room ambiance).
But that's not what happens in reality. Signal phase flips in real microphones depending on the angle.
Image

User avatar
vortico
KVRist
198 posts since 19 Jul, 2008

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 6:50 am

You said you haven't tested this in practice, so perhaps it would be a good time to do that. Attach a tiny speaker and a microphone on a stick and wave it around in the air. The phase/timing of your sine wave will not be affected by the angles. This is a result of relativity of reference frames.
VCV Rack open-source virtual modular synthesizer

User avatar
Aleksey Vaneev
KVRAF
3540 posts since 7 Sep, 2002

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:05 am

vortico wrote:You said you haven't tested this in practice, so perhaps it would be a good time to do that. Attach a tiny speaker and a microphone on a stick and wave it around in the air. The phase/timing of your sine wave will not be affected by the angles. This is a result of relativity of reference frames.
OK, so you insist phase inversion does not happen. Maybe, have not checked it with all mics out there. I did multi-mic drum sound recording in the past and used PHA-979 plugin for phase alignment, there was a clear distinction between incidence angles. But that wasn't a scientific evaluation, just a practical observation.
Image

mtytel
KVRist
55 posts since 28 Jan, 2013 from Oakland

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:11 am

Aleksey Vaneev wrote: But that's not what happens in reality. Signal phase flips in real microphones depending on the angle.
I think this depends on the type of microphone. I don't think microphones with air entering one side will flip e.g. cardioid mic.

User avatar
Aleksey Vaneev
KVRAF
3540 posts since 7 Sep, 2002

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:12 am

mtytel wrote:
Aleksey Vaneev wrote: But that's not what happens in reality. Signal phase flips in real microphones depending on the angle.
I think this depends on the type of microphone. I don't think microphones with air entering one side will flip e.g. cardioid mic.
Cardioid is not a good reference as it attenuates backside signal. Omni and figure-8 mics are better references to my "problem". But with cardioid, e.g. -30 to 30 degree incidence phase is also an interesting question.
Image

User avatar
vortico
KVRist
198 posts since 19 Jul, 2008

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:17 am

Yes, inversion does not happen if the source and mic are both omnidirectional, or if they are rotated relatively to each other. Do not confuse the term "phase inversion" (which is a misnomer in this industry for the term "inversion" or "a gain of -1") with the time inversion of the signal that can be continuously shifted to arbitrary phases. This is the source of your confusion.

"there was a clear distinction between incidence angles"

That's because your microphones were not omnidirectional. mtytel is right. If your mic looks symmetrical and looks like you can flip it around, it's probably figure-8. If only one opening, it's cardoid or omni or something else. But if you wanted to model figure-8 mics, you would have said something like "I want to emulate the transfer function of a ribbon mic for a VST I'm making", but if not, it would be a weird/unusual feature to add to a generic panning/localization plugin.
Last edited by vortico on Mon Jun 25, 2018 7:23 am, edited 1 time in total.
VCV Rack open-source virtual modular synthesizer

User avatar
Aleksey Vaneev
KVRAF
3540 posts since 7 Sep, 2002

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:22 am

vortico wrote:Yes, inversion does not happen if the source and mic are both omnidirectional, or if they are rotated relatively to each other. Do not confuse the term "phase inversion" (which is a misnomer in this industry for the term "inversion" or "a gain of -1") with the time inversion of the signal that can be continuously shifted to arbitrary phases. This is the source of your confusion.
I do not have confusion. Mic positioning is continuous, it does not instantly "flip" phase, the phase change is continuous from 12 hours when it's unchanged to 6 hours when its inverted. Consider a figure-8 mic with its polar pattern turned into omni.
Image

User avatar
vortico
KVRist
198 posts since 19 Jul, 2008

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 7:29 am

Look at this equation of a sine wave.

y(t) = A * sin(2*pi*f*t + phi)

When you spin a figure-8 microphone around, A is what changes (most ribbon mics are approximately A = cos(theta), where theta is the angle from the front of the mic). Phi is constant.

"Consider a figure-8 mic with its polar pattern turned into omni."

I have no idea what you mean by this.
VCV Rack open-source virtual modular synthesizer

User avatar
Aleksey Vaneev
KVRAF
3540 posts since 7 Sep, 2002

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 8:14 am

vortico wrote:y(t) = A * sin(2*pi*f*t + phi)
Phi is constant.
OK, maybe phase flips instantly when you go over 90 degrees. But do you have a source which confirms the claim that "phi" is constant with figure-8 mics? My practice say a different thing, when I record a sound source with e.g. 2 mics placed at equal distances from sound source, but different angles, to align the mics I have to apply phase shift. If "phi" did not change I would not notice a difference and life would be a lot easier.
Image

User avatar
vortico
KVRist
198 posts since 19 Jul, 2008

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 8:36 am

Remember from basic trigonometry that sin(theta) = -sin(theta + pi). This means that although you can think of a signal inversion as phi=pi, you should not and instead understand that the gain is being multiplied by -1. Perhaps I'm being a bit too math-y. Could you describe your math background/level?
VCV Rack open-source virtual modular synthesizer

JCJR
KVRAF
2360 posts since 17 Apr, 2005 from S.E. TN

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 10:35 am

Maybe not a relevant case, but consider an omni point-source and an omni mic in a free field (no significant room reflections).

Typical omni mics such as measurement mics, the diaphragm is fitted over a sealed back plane or back cavity. Which is what "makes it omni". A pressure increase on the outside of the diaphragm will push the diaphragm inward regardless the direction of the pressure wave. And pressure decrease will "pull the diaphragm outward" regardless of the pressure wave's direction.

The omni point source is like throwing a stone into a pond or a vibrating stimulator in a wave tank. Circular wavefronts radiating all directions.

So in that situation, "theoretically" I don't think the phase would change according to angle so long as distance remains constant. Because physical instruments are never perfect, the real world would probably measure some amount of variance.

Consider if the point source is a wave tank vibrating stimulator (often a tiny little ball hooked to a buzzer, suspended above the water just touching the water surface). Consider the omni mic a little float hooked to a transducer so we get a signal output when the float bounces up and down. With constant distance, the float will bob up and down in the same phase relationship (time delay according to distance) with the stimulator regardless of the angle.

Directional mics, cardioid, figure 8 etc, are usually constructed with back vents or sometimes with back-to-back capsules or whatever. They would typically behave different according to angle even with an omni source in a free field, according to frequency, because it is technically near-impossible to make a near-ruler-flat (in amplitude and phase) directional mic. But in that case the phase change according to angle might be in the category of "microphone modeling" rather than "one size fits all theory"?

stratum
KVRAF
2115 posts since 29 May, 2012

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 2:09 pm

Just curious, is an omni-point source actually possible in practice? For example, how could a 0.1 mm diameter stone can produce a sound with a frequency of 0.1Hz with adequate power? If we increase the size instead of decreasing, at which size limit may we say that a given speaker cannot be assumed to be point source? Assuming a large speaker, say 15", and the speed of sound to be 331 metres/second, to me it seems like there is roughly 1.15ms difference between one side of the speaker to the other (if I haven't calculated incorrectly, and for a listener that is exactly in the right or left of the speaker)
~stratum~

JCJR
KVRAF
2360 posts since 17 Apr, 2005 from S.E. TN

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 2:49 pm

stratum wrote:Just curious, is an omni-point source actually possible in practice? For example, how could a 0.1 mm diameter stone can produce a sound with a frequency of 0.1Hz with adequate power?
Hi Stratum. I'm ignorant of acoustics as everything else. It depends on circumstances.

With speaker systems directionality can depend on the size of transducer vs the wavelength of the audio. If the audio wavelength is short relative to transducer size it tends to be more directional. As the wavelength becomes long relative to the size of the transducer it tends to become less directional, more omni.

A midrange-freq "practical" example-- If you are playing guitar on-stage with a band, lets say in sealed cabs for simplicity but works similar in open-back or vented cabs. Lets also posit it is just "stage sound" with no PA mics to reinforce the instrument levels.

Small speakers, 10 inch or smaller, you can turn up so it is painfully loud on-stage but maybe the audience still has trouble hearing your guitar. If you use 12 inch speakers the audience will hear you without sounding so obnoxious loud on-stage. With 15 inch or 18 inch speakers for midrange guitar, you will have trouble hearing yourself on-stage, and the audience to the left and right will have trouble hearing you, and you will deafen the unfortunate small part of the audience that your speaker is aimed at.

Angle of dispersion is related to when people talk of "long throw" vs "medium throw" or "short throw" speakers. If you want to reach out to an arena, you need an array of narrow-angle-dispersion speakers aimed to cover the entire wide area way back in the crowd. (there are different theories about accomplishing that). And then to cover the people closer to the stage you want medium or short-throw speakers, which typically generate maybe the same SPL but have a wider dispersion angle, Because of the inverse-square law, you don't need as many short-throw speakers because you don't have to throw very far for the near audience.

Because bass frequencies have such long wavelengths, it is generally difficult to intentionally design a strongly directional bass speaker. Even 18 inch or 21 inch subwoofers are so much smaller than the low bass wavelengths. Bass will tend toward being omni. Also the ear has difficulty localizing low frequencies.

On the other hand, it can be a technical challenge to make an omni tweeter. The very high frequencies have such short wavelength that it is difficult to keep them from "beaming". Difficult to properly spray the high frequencies over a wide angle.

Some crazy home theater experimenters have made "linear wave" bass in basement-sized home theater rooms by building numerous 18 inch woofers in grid arrays covering the entire front and back walls. That "overkill" supposedly makes very nice well-behaved linear bass wavefronts traveling linear front-to-back in the room. But they have to go to great expense and trouble to get such "directional coherent" bass.

kamalmanzukie
KVRist
145 posts since 12 May, 2012

Re: Direction of phase shift when rotating sound source clockwise

Post Mon Jun 25, 2018 3:23 pm

vortico wrote:Remember from basic trigonometry that sin(theta) = -sin(theta + pi). This means that although you can think of a signal inversion as phi=pi, you should not and instead understand that the gain is being multiplied by -1. Perhaps I'm being a bit too math-y. Could you describe your math background/level?

i recommend experimenting with phase cancellation/amplitude inversion with the output sawtooth oscillator. a lot of people dont know there is a difference, to many who do its sort of a 'who cares' thing, but theres really no replacement for getting a sense of how they are different and why, and how plays out in different situations

Return to “DSP and Plug-in Development”