On Dec 25, 2022, at 3:37 PM, Sampo Syreeni <de...@iki.fi> wrote:
> On 2022-09-04, brianw wrote:
>> For example, a delay of 1,105 samples at 44.1 kHz would cause a 20 Hz sine 
>> wave to cancel out, even if you guarantee that the delay is positive. A 
>> polarity-inverted delay of that same length would actually reinforce a 20 Hz 
>> sine wave.
> 
> Of course you can have quite a lot of LTI circuitry which does more. Delays, 
> inverted or not, only contribute z^-n -terms to the system equation. Those 
> are interesting in sound DSP mostly because they are so efficient in 
> implementation and clean to produce. Also they can approximate traditional 
> multimodal resonators, like flutes or strings.
> 
> The funkiest thing I've bumped into in my life is the internally unstable but 
> outwardly stable resonator. The discrete rectangular pulse generator. In its 
> first loop, it has a pure summator/discrete integrator. When you give it a 
> unity pulse, it starts counting from zero to infinity. The second part 
> circuit is a differencer/discrete derivator. It takes the difference between 
> subsequent samples, so when it's put into a circuit after the summator, it 
> cancels its out. If you put in a unity pulse to a series of such two 
> circuits, out comes just a pulse. While at the same time both circuits 
> internally run off.
> 
> Finally, you can put in an internal delay line to the circuit. When you wire 
> it right, the first integration doesn't communicate with the second outgoing 
> differencing circuit for a time. You can get a rectangular pulse which lasts 
> for precisely the time of the delay line. And what do you know, since you did 
> it like this, the pulse will be exactly bandlimited. So that this mechanic 
> can be used as part of bandlimited analogue emulation synthesis.

Sounds very interesting. I think I will work with this next time I write some 
synthesis code.


Meanwhile, I like to keep practical matters in mind when discussing phase and 
polarity. All sound requires some kind of transducer before we humans can hear 
it. Those transducers have at least two conductors, and they're usually colored 
red (+) and black (-).

If you connect your speakers with red and black wires swapped, the polarity 
will be reversed, but this will have no effect on the sound - at least not with 
a single speaker. The human hearing system is even largely polarity-deaf, 
except for certain portions of the non-periodic attack of distinct sounds. This 
is what I mean when I saw that polarity is not frequency dependent.

Of course, if you have multiple speakers and only some of them are 
polarity-inverted, then there will be frequency effects. But that is not a 
unique condition, because there will be frequency nulls and reinforcements in a 
room even if all speakers have the "correct" polarity. The result is really due 
to mixing multiple sources acoustically, and not due to the polarity.

In the DSP realm, a simple "negate" operation can change the sign of all 
samples. This operation does not alter the frequency content of any audio 
source. Again, polarity (or inverting the sign of the numbers) is not a 
frequency-dependent change.

Again, if you have multiple audio sources and mix them in the DSP realm, then 
changing the sign of some (but not all) of the signals can have a frequency 
effect, but that is due to the mixing, not the inversion.

In the above senses, I'm not talking about instantaneous "polarity" - which 
changes every cycle of a waveform - but the constant polarity. I suppose it's a 
reference - positive versus negative voltages, or pressure versus vacuum.

Looking at the converse, a 90-degree phase shift cannot be achieved in the 
physical realm of stereo components simply by swapping two wires. It might be 
possible with a very simple circuit, but it would require components with 
time-variant responses.

All of the above, taken together, is why I consider Polarity to be a distinct 
category from Phase.

>> Phase is frequency dependent.
> 
> No it's not. What you probably mean here is that frequency, and so phase, is 
> *time* dependent. But normalizing for time/frequency/wavelength, all of it 
> works the same. Even with multiple frequencies and their phases, at the same 
> time. At least as long as we deal with LTI systems.
> 
>> Polarity is not frequency dependent.
> 
> Sure it is, since polarity is a phase and amplitude phenomenon. Quite 
> certainly any symmetrical wave with a frequency of 50Hz reverses its polarity 
> 100 times a second, and a one with a 60Hz frequency, 120 times. Or if you're 
> dealing with something with a large DC component, like what'd you get from a 
> rectifying bridge, maybe with a capacitor bank to boot, no matter the 
> frequency, you'd not get any polarity change, ever.

Reply via email to