Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Encoding data into dubstep drops (benjojo.co.uk)
171 points by benjojo12 on April 12, 2018 | hide | past | favorite | 35 comments


Neat, it's always really cool to see folks get their feet wet in the DSP field! (Props to the author for trying to get through the dense Wikipedia pages.)

Minor correction for the author: this isn't amplitude-shift keying, and the way to tell is to look at how demodulation works. The detection code asks if a sample is negative or positive, but "how large is this sample?" is never asked. An ASK demodulator effectively thresholds the signal on amplitude and in the simplest case this boils down to "is there a signal or not?"

The implemented code has some flavor of phase-shift keying (the inversion of a sine wave flips the phase 180 degrees), but since there isn't guaranteed to be a steady carrier, it seems like it'd be hard to decode as a pure PSK. The all-sample offset (constant above or below zero) can also be treated in a way as a PSK process, with the carrier being DC (0Hz).


Check Aphex Twin - Equation if you haven't already https://www.youtube.com/watch?v=M9xMuPWAZW8


For the impatient, skip towards the end (zinger at 5:20):

https://youtu.be/M9xMuPWAZW8?t=295


Since the data is being encoded with a signal processing trick that is inaudible to human ears this could work in any song with 0-100hz frequencies, right?

I was little disappointed when I didn't hear intense dialup-modem-like sounds encoding data I'm the midrange


It's not inaudible. Human hearing extends down to around 20Hz but also some speakers have terrible frequency response down that low so it might mask it better but the tone isn't low enough to be completely inaudible.


Comparing the before and after samples, there is definitely an audible difference for this pair of ears.

To be fair, I listened to the after sample first and it sounded like regular old Skrillex to me.

I scrolled up and listened to the before sample and noticed that the bass was deeper and more harmonious with the higher end frequencies. Basically, the original sample has a "subsonic" vibrations that resonate in time and "harmony" with the higher end sounds. (Also, I'm using higher-end earphones with custom ear canal sleeves to listen.)

So, I probably wouldn't have noticed anything unusual if I'd only listened to the modified bass drop, but I can hear the difference when comparing the two.


> I was little disappointed when I didn't hear intense dialup-modem-like sounds encoding data I'm the midrange

Me too(although of course cool nonetheless). For dubstep to fulfill it's "alien communication" meme we need that.


I expected it to be similar to typedrummer [1], but with dubstep snippets.

[1] http://typedrummer.com/


I'm pretty sure that this would drop the volume of the 0-100hz range to half the volume since we dropped the amplitude to 1/2 and shifted. Any sound system with loud subwoofers would be able to detect the difference, but woofer only systems would probably leave the modification mostly undetectable.


spot on. also there's likely to be some phase issues in some mixes

aside: seems to be a smooth enough lerp between bits so as not to destroy speakers, but might cause a record needle to jump (can anyone more versed weigh in here?)


Great article about encoding; this is similar to the DRM the PS3 uses on video content. It's a low bit rate signal, but after enough time of the movie playing enough bits are generated to trigger the DRM flag and stop playback.


Cinavia is similar: https://en.wikipedia.org/wiki/Cinavia

Can't find stuff about Digital Restriction Management for the PS3, you sure there was something inside the video stream?


Pretty sure they're talking about Cinavia, as the PS3 was one of the most well-known implementors of it.


Yes, but that's in the audio signal.


Very cool. I suspect there is something unique going on with dubstep "drops" and dopamine release. There is a reason it engages peoples basest systems.


"drops" have their equivalent in every other form of music. Breakdowns in hardcore, choruses in pop music, it's just a catchy part of any tune that people easily grab onto.


Drops certainly have equivalents in other music, but I don't think those are good comparisons.

I don't think the defining feature of drops is their catchiness, but the slowly building tension and sudden release.


> Drops certainly have equivalents in other music, but I don't think those are good comparisons.

seriously?

dubstep is just 'another' form of eletctronic dance music..

and, to be opinionated, basically rhythmically dumbed-down drum&bass which itself is rhythmically dumbed down jungle which itself is rhythmically more complicated hardcore techno minus the 4-to-the-floor bass drums of the 'main' tune...

also: get off my lawn. :b


I wasn't making any value judgments about dubstep or anything else, I was discussing the definition and semantics of what a 'drop' is.


That's exactly what breakdowns in hardcore do.


It felt very strange reading this, as it was nearly identical to a project I did in college for a class about discrete time signal analysis. We had to decipher encoded messages embedded within Crawling in the Dark by Hoobastank. The sound clip was: "is there something more than what I've been handed?" Funny professor.


We miss you over at Facepunch, Ben. Good to see WAYWO on HN, though. Hope you're doing well! :)


does the hive mind know what the commandline tool is that he used for displaying audio spectrum?

(or @benjojo12 if you're watching... your setup has inspired me, and I want to play)


While reading the post I kept thinking "this would be a really cool project to present at RC." Then I saw the end :)

Cool project!


This is super cool! I really enjoyed the animations in your writeup as well. Thanks for sharing!


How about mp3 (or other) compression? Would not the information be lost?


I checked, it survives MP3 compression


the codecs in most lossy compression formats usually nuke the phase information so here in this example as ASK is being used there isnt any lost of information. If he tried to encode phase changes in the sound then you wouldnt recover it since the decoder regenerates the audio with 0 deg phase.


What do you mean by "nuke the phase information"?


Probably just that mp3 compression loses phase information? As it indeed does.


Can you elaborate? What specifically about mp3 compression causes the phase information to be lost? Clearly, if you simply take IDCT(DCT(s)) for some signal s, you don't lose phase information, because the DCT is invertible. So are you saying that quantization causes the phase information to be lost? If so, why do binaural recordings still work fine when compressed as mp3s, given that they depend heavily on phase differences between the sounds reaching each ear?


> If so, why do binaural recordings still work fine when compressed as mp3s, given that they depend heavily on phase differences between the sounds reaching each ear?

That's a very good point. If phase information is lost, low frequency stereo sound localization should indeed suffer.

Also discrete cosine transformation indeed keeps phase.

I guess mp3 shouldn't be losing phase information after all.


worth noting that causing a speaker to vibrate around .5 and -.5 for a bit and then quickly swapping might mess with high end hardware. super cool though.


Surely it's more likely to mess with low-end speakers?

Wouldn't high-end speakers be built to withstand anything within their operating range?


They're built to create sound, not hold themselves in one direction for an extended period of time




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: