Hacker News new | comments | show | ask | jobs | submit login
Infinite Gangnam Style (echonest.com)
373 points by nickknw 1607 days ago | hide | past | web | 109 comments | favorite



This is really awesome. They cut the entire song into one-beat segments of sound and video, and then categorized each beat by similarity to other beats in the song, and then after each beat there's a random chance that, instead of playing the next beat, the playback will transition to a different but similar-sounding beat from elsewhere in the song.

More info at the author's blogpost: http://musicmachinery.com/2012/10/28/infinite-gangnam-style/


Nice! If you want to explore the structure, you can control-click on a beat and it will only play the related beats.

From what I can tell, the color indicates the number of beats in the jump set. Black: 1, Blue: 2, and then more the redder it gets.

I can't figure out how to get out of that mode, though, other than to stop and restart it.


Just press the right arrow key once, and it will start playback again. Similarly, pressing the left arrow key will cause it to play beats in "reverse", which sounds like a totally different song in some sections.


Use the left and right arrows to navigate the beats. pressing each more than once controls how many beat sections you skip over.


That makes me think of "Scrambled Hackz"[1] in a feedback loop. Very cool stuff but I'm not sure if he ever released the source to the program, sadly.

[1] http://hackaday.com/2006/03/22/scrambled-hackz/


No he didn't.. I've been waiting and waiting, still no joy.


Seems like a similar technique to "motion graphs" in showing motion capture data (http://research.cs.wisc.edu/graphics/Gallery/kovar.vol/MoGra...).


This is fantastic. Steve Reich would be proud.


That might just be the first time Steve Reich has been mentioned in relation to Gangnam Style!

ps To the author/s (if you end up seeing this): was there a reason you didn't center the content on the page? Might look a little better. Just a suggestion :)


magenta - I spent about 10 minutes trying to center it all, but I couldn't get Raphael.js to behave, so since it was a weekend hack, I moved on. But yes, it would look much nicer if it was centered, even more so if a designer did the design ...


body { width: 730px; margin: 0 auto; }

does the trick.


yep, that did it, thanks much yuchi!


Actually you should also correct some internal width that causes the whole page to overflow horizontally, causing a useless scrollbar.


such a simple concept resulting in nearly endless fun :)


This is a very clever hack and I adore it for that, but it's also a sneaky statement about meaning, and I adore that too. It's like the literature world's cut-up/exquisite corpse work: if you can disassemble an original like this and put it back together in a way that we humans are inclined to extract meaning from, does that change the meaning that you perceive in the original work?


What's unique about Gangnam Style is that it's a cultural meme in America that isn't in English. It would be really interesting to see what sort of different sentiment this project would inspire if applied to a song where Americans could actually understand the lyrics and cultural references, or if it was shown to a South Korean audience.


>cultural meme in America that isn't in English

Yep, it would be interesting to read about things we miss - lyrics, and meaning of obvious references we don't get. For example, I think that dude in the elevator is an actor I saw in some movie, but I don't know if I'm correct. Obviously scene in sauna has some humorous meaning, but, again without lyrics it's unclear.


This blog[0] provides excellent context for the song, including subtitles for the song (overlaid on still shots) -- the last several seconds of the video will give you the names of the famous people with cameos.

[0] http://mydearkorea.blogspot.ca/2012/08/korean-music-psys-gan...



que sera sera.

c'est la vie.

There are lots of cultural memes in America that aren't in English. You can restrict to "recent pop culture", but even in straight music, 99 luftballoons was big 25 years ago. I'm sure there are many other examples.


99 red balloons was translated to english. My admittedly-unreliable-recollection is that's the one that received most radio play.

http://www.youtube.com/watch?v=14IRDDnEPR4

Edit: I guess I'm wrong:

per wikipedia:

Having achieved widespread success in Europe and Japan, plans were made for the band to take the song international with an English version by Kevin McAlea, titled "99 Red Balloons". The English version is not a direct translation of the German and contains a somewhat different set of lyrics.[2] The later-released English translation, "99 Red Balloons," was the version that became popular outside of Germany and neighboring countries, with it topping the charts in Canada, the UK, Australia and Ireland. Interestingly, it was the original German version that American audiences preferred, becoming the highest Billboard charting German song in US History, when it peaked at #2 in the US. [3]


I'm not surprised. The English lyrics are, frankly, a little awkward. Nena's accent could be seen as endearing, but at the same time, it sounds a tad stilted, and nowhere near as fluid as the original German. It's a dance tune, and once you know what the song is about, it's just much more fun to hear it in the language that sounds more polished and lets you tune out the words so you can, well, dance.

At the end of the day, lyrics are a much smaller part of the musical experience than people give them credit for.

Then again, I have a very easy time dissociating lyrics (and their meaning) from the rest of the music, so maybe that's just me. This doesn't always happen, but it's not unusual for me to listen to a song enough times to internalize the syllables and sing along, and still not stop and think about what the words actually mean (even in English). It may sound odd at first, but when you think about it, you probably have the same experience when you go to the opera - try and make out the words of Handel's "The Messiah", an English opera, and you'll see what I mean[1]!

(And now that I think about it, how many people know what the verses of 'Born in the USA' are really about?)

Also, I did already know that the German version was more popular, so it's hard to be sure I'm not just rationalizing that knowledge after-the-fact! :-)

[1] http://www.youtube.com/watch?v=x5jeelU1Vb4


You are not the only one who does this: http://www.youtube.com/watch?v=FQt-h753jHI


Haha, thanks for that - now I know what I probably sound like whenever I sing along to 'Dragostea Din Tei'!


Likewise, I'm sure we all recall Jimi Hendrix singing, "Excuse me while I kiss this guy."


I don't care what the liner notes say, I'm still convinced that Ian Curtis sings, 'I've been waiting for a guy to come and take me by the hand / Could these sensations make me feel the pleasures of a normal man?'[1]

[1] https://www.youtube.com/watch?v=PldpBJEn4vQ


I'm Canadian and I remember the English version getting more radio play than the German version. Learning now that the German version was more popular in the USA, I feel like a bit of a philistine. :)


Macarena, Las Ketchup and Numa Numa are three other recent ones (some contain English elements but the main catchy parts are in other languages).


http://static.echonest.com/InfiniteGangnamStyle/faq.html

Infinite Gangnam Style - Frequently Asked Questions

What is this?

- Infinite Gangnam Style is a web app that dynamically generates an ever changing and never ending version of the song 'Gangnam Style' by Psy.

It never stops?

- That's right. It will play forever.

How does it work?

- We use the Echo Nest analyzer to break the song into beats. We play the song beat by beat, but at every beat there's a chance that we will jump to a different part of song that happens to sound very similar to the current beat. For beat similarity we look at pitch, timbre, loudness, duration and the position of the beat within a bar.

How come this doesn't work in my browser?

The app requires the web audio APIs which are currently best supported in Chrome and Safari

What does Psy think about this?

I don't know. I hope he doesn't mind that we are using his music and images. We hope you check out his official video and his web site too (but really you probably already have).

Who made this?

Paul Lamere at Music Hack Day Reykyavik on October 28, 2012


Infinite Gangnam Style was built this weekend at Music Hack Day Reykjavik in Iceland. Check out the full list of hacks here:

http://wiki.musichackday.org/index.php?title=Reykjav%C3%ADk_...


I would be interested to see what happens when you do this to other types of music.


I did a university project in Clojure that fed Final Fantasy midi tracks into a Markov chain.

https://github.com/IsaacLewis/MidiMarkov

The crystal theme worked the best (it's basically some scales on the piano that go up and down).

With a first order Markov chain, the output was a random walk of notes going higher and lower. With a second order chain, the notes went up and down fairly steadily, but with scales peaking at odd points. With a third-order chain, you get close to the original song out.

(It's hard to explain in text, without knowing the correct music vocabulary, but I hope you get the idea).


Markov models work well for almost every genre-- recompositions of classical or modal jazz tunes are particularly awesome.


This isn't exactly a Markov model, although I reckon you could draw a mathematical connection.


It seems to me that it is. Please explain how the markov property is violated?


I'd guess each section is unique so there is no frequency analysis; the next section is picked at random instead of saying "Whoop whoop" is followed by "gundam style" 20% of the time, by "hey sexy lady" 50% of the time and by another "whoop whoop" 20% of the time.


Surely in a Markov process the next state is picked at random with some probability distribution, which may be uniform.


Yeah, thinking about it some more, that seems to be correct. It isn't what people usually think about when they think about Markov models, but it qualifies.

Actually, I think this kind of Markov model might be a better introduction than some of the others I've seen, since it's extremely simple to understand.


I clicked through to his blog, and apparently, it was inspired by "James Brown Forever"

http://nest.echonest.com/post/526547218/james-brown-forever-...

I don't know his music well enough to tell it's a mix. Maybe you can.


My team built something similar at a recent hackathon. It attempts to automatically do this to an arbitrary WAV file (break up into waveforms) and generate a new piece of music: https://github.com/osnr/markov-music


Just tried it on a music I liked, and wanted to create an "inifinite" version for some time: http://soundcloud.com/college/college-teenage-color (echonest track id: SOGUHNN12A8C13E7DD)

It doesn't work as well as in gangnam style.

I didn't take time to try to understand why. Either this is because echonest's analyzed mp3 isn't the same as mine. Or the function to compute distance between beats isn't generic enough.


Analyze your own, it'll be much better when you're doing synchronous stuff like this. Our canonical audio is likely very different in bitrate or time to start.


Madlibs for music. Peter Langston, whom I met at Sun while he was consulting on the *7 project, did an interesting paper in infinite music [1]. We built something akin to the Casio "smart beats" feature from their all-in-one keyboard products into the application so that we'd always have musical accompaniment in the UI. Of course that was before we realized that many (most?) people insanely hate UIs that make ambient noise :-)

The Echonest stuff, done over the selected works of an artist could make for some interesting mashups of their work.

[1] http://www.langston.com/Papers/amc.pdf


My 4 year old sat and watched and sung along with this in delight for about 30 minutes (when we turned it off, cause like, enough already...)

Someone should analyze why this song is so catchy.


The electronic music and sugary pop beat. Also the irreverent fun on the video. Compare lady gaga music.


And it has its own dance. The Macarena, Cupid Shuffle, etc. are as popular for their dance as they are for the music.


It helps that the dance is both unique and easy to copy.


Actually, this is a fairly unusual song, in music theoretical terms. Almost all pop songs use the I, ii, IV, V, and VI chords, with popular progressions including I-IV-V, ii-V-I, and I-V-VI-IV. Since this is tonal music, it obviously includes the I chord. It does use only four chords, but they are uncommon. Most of the song uses the I chord (G major in this case), but during the buildup, it uses an surprising I-II-III-I-II-vii progression. The II and III chords aren't strictly in the key of the rest of the song, although they still blend well with the in-key chords. vii is just F# minor here, but it is not in the key of the rest of the song either. vii is not often seen in pop/rock/classical music; you often see vii° instead, since it is in-key. I can't argue with Psy's choices, though, since that little riff builds a lot of tension.


You're close but not quite there. The build up is VI-natural VII-I-VI-natural VII-V7b9. So you have the chords right but the root note wrong.

The major I for the third chord is the really key piece of that chord progression. Shifting up and down chords by step is pretty common in pop music, but shifting into major I the first time then the flat 9 dominant the second time (especially with the natural 7 right before it!) is a powerful harmonic one-two punch.

I don't want to be 'that guy', but the other guy responding to you has it totally wrong. Try to plunk out chords on the piano with the music and see for yourself.


Your build up progression is exactly the same as mine, only I interpret it as based on the major key III. I agree we're not talking about modulation in the usual sense, but I think it makes sense to think of it as a key change. It reminds my ears of the common IV-V-vi progression, only with a suprising major VI.


I have to disagree again... I don't think a III chord is anywhere in the entire song. The build up is in the parallel major.


Right, the key III is the parallel major. I'm shifting the base of the notation for this passage. When I say III ends the build up, I mean III in the parallel major key, i.e. V(7) in the original key.


III is the relative major. I is the parallel major. As I said, I believe there is no III anywhere in the song.


You're absolutely right. In my native language, the relative key is called the parallel key. Sorry for causing confusion.

So, to clarify, I'm not claiming there is a III in the original key, I'm referring to the III chord of the relative major key.


Thanks for the reply; I was wondering what key that it shifted to, since everything sounded weird when I tried it. I just do this stuff by ear and guess the key, but I've never had any music theory training. How do you recognize the key once you have the chords?


Pop songs rarely modulate, and if they do, usually modulate by step, so just find the root note and you have the key. Gangnam Style doesn't have any modulations unless you count the major I as a modulation. It definitely jumps out to the ear as something unusual.

For classical music the working key is constantly changing and often two theorists would disagree on the "harmonic meaning" of a passage. One telltale sign of a key change is an x-V-I progression (in the new key) where x is any secondary chord that leads naturally into the V. Bonus points if the x or the V don't work in the old key; if you're in C major and you hear a D7, you know something's up.


I think I have to a disagree with your analysis. The verse is in a minor key judging by the looping riff. This is interrupted once in a while by a iv-v-i cadence, and then the verse continues. Then the build-up, which happens in the parallel key III: IV-V-VI-VI IV-V-III-III-III and then back to the minor key for the chorus.


I know it's a bit borderline, but thinking about how this was done was pretty interesting for me, and I thought others might appreciate it too.

I also like the helpful visualization below that shows which part of the song it is currently using.


No one else noticed that this doesn't work on Firefox?

  Sorry, this app needs advanced web audio. Your browser doesn't support it. Try the latest version of Chrome


Yup that's normal. They even explain why. That's normal for tech demos using bleeding edge APIs.


Clever. I wonder if the illusion is broken if you actually speak Korean. I would definitely notice if someone chopped and reassembled random words in English.


I have trouble when I'm in American and I order water. I need to soften the t to a d, and drawl the word.

I almost always understand Americans, apart from a few movies where they speak rapidly with background noise.

Here's an example of what it's like: (http://youtu.be/q-cAnFbEXY0) - it's almost recognisable, but not quite.

So, mashing together sounds to create fake words can create something tantalisingly close to what I'm expecting to hear. Mashing a bunch of random words together usually doesn't work, but putting a Markov chain in the again creates something that gives the initial feeling of "this is not nonsense".

And for most songs you probably could sting random words together without so many people noticing; random sentences would probably be fine.


Here's another (extremely catchy) "What American English sounds like to non-English speakers" attempt.

http://www.youtube.com/watch?v=BZXcRqFmFa8


> I have trouble when I'm in American and I order water. I need to soften the t to a d, and drawl the word.

Where are you from? (i.e. What kind of accent do you have?) I find it strange that you'd have to enunciate less to be understood ordering water. If you pronounce "water" with a British accent (http://en.wiktionary.org/wiki/water#English), Americans should generally not have trouble understanding you.


I'm English, with a reasonable English accent.

I'm not kidding, "water" is never understood, across a lot of California.


Interesting. I've never seen that before, but I can't imagine why you'd make something like that up, so this must just be a gap in my experience.


It looks like the black squares always pass through to the right, which means the actual verses just play out in full. You do get into weird loops of "Oppa Gangnam Style" and "Hey Sexy Lady", but you could do the same thing with any hook.


I have a habit of listening to a single song over and over again. I am able to do so for about 3 hours. Using such randomizer technology, this time will be dramatically prolonged...


I recoil at the thought of that—how can you stand it? Is there something behind it that would make you want to prolong it even further?


As someone that does the same I think it's to do with "ignoring" the music. I can listen to the same song for ~3 days at a time (and the same artist for longer, up to a week) but I will often find myself not realising I have music on or be sitting in silence and not notice.

For example from October 20th to October 22nd I listened to Kanye West 200 times in a row and I've listened to "Bob Dylan – All Along The Watchtower" 717 times in total. Music directly reflects my mood so if I'm happy for 6 hours and find a song that I find to be happy then I have no problem with it on for that entire time.

Here's a graph of my listening habits from lastgraph[1] that will show big patches of a specific artist: http://lastgraph3.aeracode.org/static/graphs/graph_228708.pd...

[1] http://lastgraph3.aeracode.org


Sort of relevant to the HN crowd, MIT Gangnam Style: http://www.youtube.com/watch?v=lJtHNEDnrnY


I'm a native speaker of Korean, and the song doesn't sound bizarre.


Seems like we're going back to "Built for Internet Explorer" days.


It's a fun hack done for no money.

With that in mind, do you really expect the author(s) to tackle the vagaries of cross-browser bugs in bleeding edge web-audio API's?


Why would you say that? The author said them self that this works best in Safari and Chrome.

http://static.echonest.com/InfiniteGangnamStyle/faq.html


People used to build websites and tweak them for a particular browser. They'd use tags that only worked with one browser, or attributes that worked better with one browser than another.

They'd then stick a little graphic on the page saying "This site works best in [Browser name]"; often with a download link.

When Nux says "Seems like we're going back to "Built for Internet Explorer" days." I guess they're saying "It seems that we're going back to a time when people tweaked their websites to work with a particular browser, rather than concentrating on standards compliant code and cross browser compatibility".


Well, these days, I write a website using web standards, it works great in Chrome, Firefox, and IE10, except for one CSS style that IE doesn't support, ruining it for IE10 users. And so I unintentionally end up creating something only usable in Chrome or Firefox.


Except Web Audio API is a W3C standard.


Done with bigger squares and optimized for a tablet, this would be a compelling UI for a live DJ performance.


This is how Ableton Live works (and Renoise introduced a similar live view a while ago), although of course it doesn't take any random audio file but rather your own compositions, written in Ableton.


you can use any audio in Ableton. a big draw is it's time warping tools which makes it easy to manipulate songs like this.

the real difference is Ableton doesn't have the ability to automatically chop the song into logical parts. Maschine can do this, but it doesn't automatically play subsequent parts based on properties on the current one.


Celemony Melodyne does some interesting things with audio as well. Ableton Live 9 has some nifty features where it converts Audio to Midi, which you can then assign to any other sound. Nifty


hornbaker - for a live DJ performance check out this similar app - http://static.echonest.com/BeatDriver/


On Chrome 22.0.1229.94 m on Windows 7 64-bit, it freezes then crashes the tab instantly, every time I open it. I can't play it.


Check your extensions. It works here on 22.0.1229.94 m Windows 7 64-bit.



Anybody else hate these jumps in commercials to fit the 30s or whatever budget they have? Always makes me wonder if they think noone would notice? Duh, of course people do! :)

Btw, quick bug report: doesn't work for me if open in non-active tab in Chrome 22.0.1229.94 on Mac OS X 10.8.

Good fun and now do an automated version where ppl can paste their youtube links. Greetings, lx


doesn't work for me if open in non-active tab in Chrome 22.0.1229.94 on Mac OS X 10.8

I can confirm this bug too.


That's just because Chrome throttles JS execution in background tabs to a crawl.


Thanks. Is there a fix?


Just drag the tab out to its own window. Then you can minimize it and Chrome doesn't consider it to be in the background.

Random aside: I just noticed that after you drag the Gangnam tab out to its own window, then you can open other tabs in that same window, and it doesn't put the Gangnam tab in the background anymore. But if you put the tab/window back in the original set of Chrome tabs, then it will.


Man, this is more complicated than Google Wave!


When I minimize the window, the music becomes choppy. Anyone else has this?


If you focus another tab in Chrome/Linux yes (not on minimize).


yes, i'm using Chrome on Win7.


Imagine this being done not with one song, but with an entire library of electronic music.

You would have to improve the program a little bit, but this concept being realized with a vast music library?

Sounds quite interesting...


The audio becomes very laggy when I switch to other tab in chrome. It is fine if I switch to other application so I guess it's chrome itself throttling the background tabs.

Anyone else experiencing this?


Browsers slow down background javascript execution.


Si it's probably the constant switching of audio clips that is causing the stutter. My first thought was that the audio itself was laggy.


So I guess this works best because most of us can't understand the lyrics so if we did this with an english song or any song the native listener understands you might end up with nonsense lyrics. It doesn't sound like it's jump around making nonsense sounds, but it might string words together that are really bizarre as it bounces around the lyrics.


I took some time and transliterated the lyrics into English, but also to match the video and what goes on in it. This is almost as fantastic as that.

Warning: if you watch it, the lyrics will get stuck in your head. http://www.facebook.com/photo.php?v=10101449851143489


It bugs and you can get trapped int the 40 boxes segment loop over and over again. (the last straight)


You can "escape" the loop the by clicking on any of the cubes if you get sick of the segment.


Ah some more chrome only stuff :)


My favourite thing about this is that you can basically make your own remix by clicking about the squares below, and you get an amusing chopped up video for free.


Hm... do they have a way to automatically do this to any song?


Yes: you can use Echo Nest Remix in python or do what paul did and pre-load the analysis and do the playback via webaudio. Remix takes care of the chopping at the right bits for you: http://echonest.github.com/remix/


Interesting, that site crashed safari on my iPod.


cf. "You've been watching this for 0:00:37. Have another beer!" http://lalalalalalalalalalalalalalalalalala.com




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: