Elektrine lite

← Feed

@jamesholden@universeodon.com

Post #417015

2026-02-26 09:06 UTC

@jrp this isn't quite it - the sampling theorem says that a sample can perfectly capture without ommission or addition (ie noise and distortion) any signal whos frequencies lie in the range 0 to half-samplerate. so a 1khz sine _can_ be perfectly captured and reproduced by sampling at 44k. my tests were about if you try to repitch that sample because it all falls apart when you do.. you did make me think over whether i understand it right tho, here's an attempt to explain the square edges in the picture better, if i'm being really autistic here, apologies. the sample doesn't represent the actual continuous signal, just a series of points on it. so the jaggy waveform would maybe be better represented by a series of dots - each in the middle of each sample. the DAC output filter is called a reconstruction filter because it reconstructs the original continuous signal from that series of discrete points. imagine i'm wrong and when playing the screenshotted wave you posted the DAC output voltage or speaker position actually did accurately follow the rectangular lines on the screen. think about how a square wave can be broken down into / synthesised from a series of sine harmonics. the steep up and down edges can only be made if you find a sine harmonic who's frequency gives you that steep upward angle - the steeper the edge, the higher the harmonic you need to make it. so the frequencies contained in those sharp edges are very high. but the output range of the DAC is 0-22k or whatever - it has a filter, it can't output those higher harmonics, so what comes out of the speaker is just the ones that fit in range, which is the original sine signal. (imagine applying a very steep filter at 1khz to a 1khz square wave - all that's left is its first harmonic)

Replies (1)

  • @jrp@hub.kliklak.net 2026-02-26 11:55

    @jamesholden Good reminder about the sample theorem. I need to learn more about the details of DACs, filtering going on in them, besides hi-q cutting right under the Nyquist frequency. I can't wrap my head around how to smoothen all these different stepped waveforms, when goign back to analog. One can't just operate with one slew rate there... On another note the audible difference of a 1KHz sinus versus a stepped wave is still noticeable. At 10 KHz then our ears already interpret a square almoist like a sinus, though, besides for those 3 humans, that have dog or bat hearing.

    Open ##1396973