Square wave , how come no distortion?

Natasha Roberts's icon

Hi,

I have been going through Fundamentals tutorial 5 patch,

If a phasor (receiving a 440 freq) is ramping from 0 to 1, and that signal is sent to the object
then that signal is sent

well how is there not distortion due to the abrupt changes between the wave 0 and 1?? Because in all the other tutorials, it has explained how line~ must be used to prevent distortion from these abrupt changes.... or is this dealt with when the wave reaches the line section before the dac~

If someone could clarify this with me, that would be fantastic.

Thanks.

TAsh

justin's icon

it seems you are getting 2 separate concepts mixed up:

1. with line~, the tutorials refer to changes in volume (amplitude). an abrupt change in volume results in a pop / click, which is "usually" undesirable.

2. with a square wave oscillator, the signal "oscillates" from 1 to -1. above the frequency of ~20hz, this tone becomes audible to the human ear as a perceivable pitch rich in overtones (harmonics above the fundamental pitch). below ~20hz it becomes a regular clicking sound with no perceivable pitch.

without delving further into synthesis, its tricky to explain this briefly... this wikipedia entry should help explain the waveforms: http://en.wikipedia.org/wiki/Waveform

hth,

j

Natasha Roberts's icon

right i see where your coming from, although it doesnt say the phasor is ramping from -1 to 1, it says 0 to 1....

so hmmmm

Natasha Roberts's icon

I kinda of am almost understanding it, i think i have been sat here for too long though and have confused myself even more. Im definately getting mixed up between oscillating and amplitude...

Natasha Roberts's icon

infact, what you have said still hasnt answered my question i dont think, as what you have said i already know...

arrrrrgh

Chris Muir's icon

On Aug 21, 2008, at 10:36 AM, Natasha wrote:
> I kinda of am almost understanding it, i think i have been sat here
> for too long though and have confused myself even more. Im
> definately getting mixed up between oscillating and amplitude...

To confuse you even more: oscillating and periodic amplitude changes
are the same thing.

I think where you might be going wrong is that in the case of wanting
to change the amplitude of existing material, any click is annoying,
whereas in something like a square wave, the click-train of the abrupt
amplitude change _is_ the sound.

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

Jay's icon

it's because those 'undesirable' clicks are happening so fast that you hear them as one constant pitch.

Natasha Roberts's icon

right ok, thankyou, i think thats what i was hoping to hear... i kind of sat here knowing that the answer was along those lines, but i still kept asking that same question of how there would be a click through abrupt amplitude change. Sometimes its obviously not worth thinking too much about it!!

cheers :)

Natasha Roberts's icon

Thanks for your response!!

See it wasn't the phasor ramping that 'worried' me, it was the 0 0 0 0 0 and 1 1 1 1 1 coming from the

I was thinking, well how can this work so nicely without clicks.... but you guys have been great in clarifying this so thanks.

Sorry to be so tedious about this, it was just something i needed to get my head round.

kjg's icon

Quote: Natasha Roberts wrote on Thu, 21 August 2008 21:57
----------------------------------------------------
> Thanks for your response!!
>
> See it wasn't the phasor ramping that 'worried' me, it was the 0 0 0 0 0 and 1 1 1 1 1 coming from the
>
> I was thinking, well how can this work so nicely without clicks....

It doesn't.
It's "clicking" multiple times per second and that is its "sound", in this case.
Chris Muir explained it very nicely.

Because you generate the sound through this means, you would consider this its sound - the result of the method you've chosen. If I would be synthesizing a sine wave, and overloading/overdriving the dac or medium at some point, I'd get a similar spectrum (becuase of the waveform being squared off), but in that case I would call it distortion. Because the resulting sound was not caused by the method I've chosen, but because of the waveform resulting from my synthesis being distorted at some point in the signal chain.