I generated a squere wave signal and put it into a wave file, using this code:
import sys, os, wave, random, struct
noise_output = wave.open('noise.wav', 'w')
noise_output.setparams((1, 2, 1000, 0, 'NONE', 'not compressed'))
SAMPLE_LEN = 1000
for i in range(0, SAMPLE_LEN):
value = random.choice([-32000, 32000])
for j in range(100):
packed_value = struct.pack('h', value)
noise_output.writeframes(packed_value)
I was expected to hear some short rattles when listened, because this is not let's say a "valid" audio signal. Instead I could hear some rattles with a tone somehow, cannot describe it.
Then I used an osciloscope to see the output signal from the soundcard, and it looks like this:
The output looks to me something like Gibbs effect. My question is, why does it look like this? I was excepted to see no ringing artifact on osciloscope. How the DAC from the soundcard works and which digital/analog filters are outputing this signal?