News for hackers. Stuff that matters.
Re:Encoding Data in Dubstep Drops by arilotter on Friday January 15, 2021 @11:48AM (#25792873)
A DC offset, which amplitude-shift keying like this introduces, isn't so nice to your speakers. It might cause them to heat up as the offset waveform holds the magnet out in one direction. I do love the idea of hiding data in "messy" audio, though :)
Re:Encoding Data in Dubstep Drops by magicalhippo on Friday January 15, 2021 @12:13PM (#25793234)
In a traditional amplifier the DC should be blocked by the DC blocking capacitors, but I guess with modern full-bridge class-D amplifiers which don't require those it'll have to be done on the software/digital side?
Re:Encoding Data in Dubstep Drops by analog31 on Friday January 15, 2021 @10:45PM (#25799842)
A switch mode amp is still likely to have the blocking caps.
Re:Encoding Data in Dubstep Drops by magicalhippo on Saturday January 16, 2021 @10:11AM (#25802662)
I'm no expert at all, I just saw that the DAC[1] I picked up for a project specifically states no blocking caps are needed.

I then found upon this application note[2] which states a full-bridge class D shares the benefits of a traditional bridge tied load[3] amplifier, like not requiring DC blocking capacitors.

Not sure how common this is, but clearly blocking caps is not something to be assumed.

[1]: https://www.ti.com/product/PCM5102A#product-details##feature...

[2]: https://www.maximintegrated.com/en/design/technical-document...

[3]: https://en.wikipedia.org/wiki/Bridged_and_paralleled_amplifi...

Re:Encoding Data in Dubstep Drops by analog31 on Saturday January 16, 2021 @11:53AM (#25803427)
Ah, that's a good observation. Looking at the datasheet for that TI chip, it is powered by + 3.3 V, but contains an internal charge pump that generates a - 3.3 V supply. So the output can swing across ground. That's what eliminates the need for blocking caps. And it specifies a DC offset error of +/- 1 millivolt. So they've designed around the need for blocking caps with internal circuitry and a guaranteed maximum output offset.

Now what happens if there is an input offset, such as a constant stream of input words other than zero? That's where the system designer has to take care of things. And there are offsets even when blocking caps are used. The caps only prevent compounding those offsets from one stage to the next.

And a certain amount of offset won't kill your speakers. It just has to be kept within reasonable bounds.

I've noticed when using the audio input of a PC for measurement, that there is a constant offset, which is just an artifact of the ADC. The audio recording software has a function for removing that offset. In fact I would consider an audio recording with a large residual offset to be a poor engineering practice.

Often, switchmode amplifiers with BTL output have a large normal mode offset, so they can be powered by a single supply. And single-supply audio circuits tend to be festooned with blocking caps. ;-)

Re:Encoding Data in Dubstep Drops by tekstar on Friday January 15, 2021 @12:11PM (#25793209)
If it's audio rate how is it different than a squarewave?

Edit: looked closer at the post, the DC offset lasts for over 100ms per cycle.. yeah that's a problem

Re:Encoding Data in Dubstep Drops by mkr-hn on Friday January 15, 2021 @12:15PM (#25793269)
All waves are made of sine waves. DC offset is when the signal is too much one way or another.
Re:Encoding Data in Dubstep Drops by dylan604 on Friday January 15, 2021 @02:20PM (#25795023)
Maybe in analog, but in digital, they are squares and what not type of waves.
Re:Encoding Data in Dubstep Drops by layoutIfNeeded on Friday January 15, 2021 @02:44PM (#25795348)
Sigh... No, digital signals are not “square waves”. https://youtu.be/cIQ9IXSUzuM
Re:Encoding Data in Dubstep Drops by bhj on Friday January 15, 2021 @03:58PM (#25796372)
I always laugh when vinyl is described as more “pure”. There’s nothing more pure than math, and that’s digital PCM audio. Sure, it’s stored as discreet samples, but that’s not how it comes out of speakers. The digital->analog converter will give you 1:1 perfect representation of the original waveform as long as you sample at 2x the highest frequency desired and there’s a low-pass filter in place.
Re:Encoding Data in Dubstep Drops by anamexis on Friday January 15, 2021 @05:45PM (#25797551)
For the record, I don't think vinyl enthusiasts ever describe vinyl audio as more pure. "Pure analog," yes, but that's different (and true). It's generally acknowledged by vinyl enthusiasts and audiophiles that vinyl introduces a lot of imperfections, which some people prefer.

Also worth noting that an ideal D/A converter will give you the exact waveform back, but such a device does not exist (but you can get pretty close).

Re:Encoding Data in Dubstep Drops by grkvlt on Friday January 15, 2021 @05:25PM (#25797351)
Not strictly true, you must sample at 2x the frequency and at sufficient resolution in the amplitude domain, i.e. an ADC that samples at 44 kHz but with only one bit of resolution (outputs a 1 for positive input voltage and 0 for negative, say) would be pretty awful...
Re:Encoding Data in Dubstep Drops by layoutIfNeeded on Friday January 15, 2021 @06:11PM (#25797829)
On the other hand a sigma-delta ADC that samples at 2.8 Mhz with only one bit resolution is pretty good (for audio purposes).

With sigma-delta modulation you can trade sample rate for bit depth and vice versa.

Re:Encoding Data in Dubstep Drops by dylan604 on Friday January 15, 2021 @05:20PM (#25797308)
Have you ever played with an Arduino or similar device? Comparing inputs signals on a digital pin vs an analog pin? Hopefully, you'll agree it's the same concept. If you haven't, I'd encourage you to try one out. They are loads of fun. I am a huge fan of analog, yet digital is just so damn convenient. If you have played with one, you'll understand why your comment makes me smile and chuckle.
Re:Encoding Data in Dubstep Drops by layoutIfNeeded on Friday January 15, 2021 @06:18PM (#25797922)
A digital pin will most likely output a signal using a zero-order hold, which is the simplest type of reconstruction filter.

A zero-order hold is just one possible way of turning a digital signal into an analog one which you can then measure with your oscilloscope. But the output of the zero-order hold is not the digital signal, because the digital signal is only defined at discrete sample points.

Re:Encoding Data in Dubstep Drops by _underfl0w_ on Friday January 15, 2021 @03:38PM (#25796089)
Your comment might be more helpful (i.e. more likely to be read by others who could use the information you're providing) without the snark.
Re:Encoding Data in Dubstep Drops by dylan604 on Friday January 15, 2021 @03:53PM (#25796280)
Sigh... you are wanting to show me that we can do A/D and D/A again? Thanks, I was totally unawares that we could do that. I've never heard an audio signal played back once it was digitized. My life is now complete.

What this guy is showing is not a digital signal. It is an analog signal that has been generated from digital data. Not sure what the point of all of this was, but thanks, I needed a break from finding this bug I've been trying to squash.

Re:Encoding Data in Dubstep Drops by nitrogen on Friday January 15, 2021 @06:15PM (#25797889)
I recommend watching the video again, all the way through -- no skipping. It's pretty great.
Re:Encoding Data in Dubstep Drops by virgil_disgr4ce on Friday January 15, 2021 @12:13PM (#25793240)
The problem is not the waveform, it's the DC offset requiring more constant current to the voice coil.
Re:Encoding Data in Dubstep Drops by arcticbull on Friday January 15, 2021 @12:22PM (#25793354)
Aren't all speakers AC coupled? Should be filtered out by somthing as simple as a blocking capacitor no?
Re:Encoding Data in Dubstep Drops by Unklejoe on Friday January 15, 2021 @01:08PM (#25793965)
Not necessarily. The amplifiers sometimes are though.

In a normal 2 or 3 way speaker cabinet, you'll have an analog crossover which consists of something like a capacitor in series with the tweeter (high pass filter), and an inductor in series with the woofer (low pass filter).

In that case, the tweeter is protected from DC, but the woofer isn't.

Re:Encoding Data in Dubstep Drops by arcticbull on Friday January 15, 2021 @01:35PM (#25794361)
Very cool thank you!
Re:Encoding Data in Dubstep Drops by arilotter on Friday January 15, 2021 @12:38PM (#25793557)
Yes, it's unlikely to cause problems in any real-world setup, but it's theoretically possible :P I've edited my original comment to clarify that it won't always be the case.
Re:Encoding Data in Dubstep Drops by lostlogin on Friday January 15, 2021 @01:41PM (#25794460)
Signal that can damage hardware is something that used to be discussed with CRT monitors back in those ancient times, and rumours existed of a virus that played on this.

Having damaging audio signal is a new one for me.

Re:Encoding Data in Dubstep Drops by userbinator on Friday January 15, 2021 @10:06PM (#25799641)
That reminds me of this curious item from a few years ago: https://news.ycombinator.com/item?id=7205759
Re:Encoding Data in Dubstep Drops by isoprophlex on Friday January 15, 2021 @11:53AM (#25792928)
Also, if the data rate is low enough, compression will probably also remove such dc components?