# In a line-level audio signal, what function of voltage produces amplitude?

When I record audio from the line-in jack on my laptop, what function of voltage produces recorded amplitude?

followup/example:

Since I've been told "voltage", unqualified: I apply a voltage square wave to a mono cable. (tip-sleeve switches between 0V and +5V every second). Since the voltage as a function of time is a square wave, why is the waveform of the recorded audio not a square wave?

And here's a recording of the same signal at 40Hz:

• Voltage. Units of measurement: [A/D counts]. – Nick Alexeev Oct 28 '13 at 1:57

You are recording voltage (1V p-p for line level) over time. The line signal is high pass filtered before the voltage sampling by the ac coupling capacitor. Ideally it is also low pass filtered by an anti aliasing filter.

If your square wave had higher frequency (say, 440 Hz) then it would show the voltage sampling better without the high pass filtering getting in the way.

• Even higher-frequency square waves show some deformation when recorded. What techniques do circuit designers use to get around this problem? – pje Oct 30 '13 at 17:26
• Do the analysis in the frequency domain, rather than the time domain. It turns out that the eye is very sensitive to phase and frequency response differences when plotted in the time domain, whereas ears are not at all as sensitive in the same way. Or add a lot higher capacitance, which will translate to a lower cut-off frequency. Try a 470 uF capacitor instead of whatever is there now. Or use an inverse filter. Measure the impulse response of the filter that's there, and convolve your input signal with the inverse of that to get the "original "signal. – Jon Watte Oct 31 '13 at 23:43

Between the line-in tip of the socket and the ADC there is a series capacitor which converts the square wave into what you see.

In the One Laptop per Child XO laptop, we added a way to bypass this series capacitor for DC sampling, but on typical computers this is not a design feature. On sheet 13 of the schematic look for C35, and consider the switching element over it. The host can control the mode through software.

• were you a developer on that project?? Love to chat about it for my design class. – Scott Seidman Oct 28 '13 at 18:48
• Yes. But I was not responsible for this part of the design. Contact me at quozl at laptop dot org. – James Cameron Oct 30 '13 at 5:04

The waveform is not a square, because the input of your audio card has a coupling capacitor. The coupling capacitor will suppress the DC component of your signal, it behaves like a derivative function. The derivative of a constant signal is null.

That's why you wee this kind of spikes instead of the square. It's closed to be the derivative of the square:

Look at this image, showing mic input of a Sound Blaster card

If you want to record a square waveform, you must generate a triangle wave.

• So, to summarize: this would mean we're not recording voltage as a function of time, but dv/dt as a function of time. – pje Oct 28 '13 at 15:43
• Yes...and no. No because y-axis is the voltage between the right side of the coupling capacitor and the ground. Yes because the voltage at the right side of the coupling capacitor is roughly equal to the derivative of the left side, dv/dt. It's important to keep that difference in mind because on some hardware you could shunt this coupling capacitor. – RawBean Oct 28 '13 at 15:45
• A triangle wave will not generate a square wave within the frequency range of the input, unless you clip it. – Jon Watte Oct 28 '13 at 19:23

An audio signal is just a waveform. The Y-axis is voltage or amplitude.

The number of times that the waveform is sampled per second is the analog-to-digital converter (ADC) sampling frequency (for example 22kHz or 44kHz, etc.)

• OK, so, as a followup: a constant voltage between tip (+) and sleeve (ground) should correspond to a constant positive amplitude? – pje Oct 28 '13 at 3:33
• Yes, but a constant (unchanging) voltage is the same, acoustically, as zero. Think of the amplitude of an audio waveform as the position of a speaker diaphragm. If the voice coil holds the speaker fixed at any particular position, no sound is produced. – JYelton Oct 28 '13 at 4:05
• An instantaneous value is the value at a particular time. If you have a 20Hz (50ms period) sine wave which is 10V peak to peak, for example, and you measure it exactly 12.5ms after it starts, you will get a value of +5V because it was at the 5V peak at the time. At 25ms, its value will be 0V again. At 37.5ms it will be -5V, and at 50ms it will have completed one cycle and return to 0V. All of these "slices in time" are just the voltage that was measured at that particular moment. – JYelton Oct 28 '13 at 4:14
• resolution is not the same as sampling frequency. – markrages Oct 29 '13 at 18:51
• @Mark Oops I'll correct that. – JYelton Oct 29 '13 at 18:54