Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Jean-Michel Jarre’s ‘Oxygene 4’ Recreated with 19KB of JavaScript (synthtopia.com)
289 points by LunarAurora on Dec 28, 2022 | hide | past | favorite | 115 comments


Reminds me of Bytebeats [1]. My favorite being

    echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay
It's incredible how much musical variation you can get out of such a relatively small function.

[1] http://canonical.org/~kragen/bytebeat/


I am obliged by HN tradition to bring up A Mind Is Born, which packs a decent piece of music and its video into 256 bytes:

http://linusakesson.net/scene/a-mind-is-born/


So to compare :

19KB JS -> https://dittytoy.net/ditty/24373308b4

Original -> https://www.youtube.com/watch?v=kSIMVnPA994

Soft synths -> https://www.youtube.com/watch?v=8jGvk28zs4g

I added the third one because I'm more familiar with Soft synths as emulations of analog hardware. It is 6 years old though and there are better (vst) plugins nowadays.

The 19KB JS version quality was surprising to me, I’m not versed in music (live) coding. how much do you think the dittytoy engine accounts for this quality ?


The Dittytoy engine is just a tiny layer that calls the code of the ditty 44100 per second. So the whole sound wave synthesis is done in the code of the ditty.


That's pretty impressive. The whoosh sound is just filtered white noise, so I don't think it would be hard to add it.


When talking about programming languages, I use to say Jean-Michel Jarre' songs are for music world as Smalltalk-family languages are for programming language world. Both are over 40 year old but still look futuristic to this day.


Because both of them picked some basic idea (FM synthesis and sequencing, message passing and isolated state), then refined it to an extreme degree of purity, ignoring irrelevant parts of tradition and convention.

It's a rare combination of simplicity and richness.


There’s no FM synthesis in Oxygene though


What is that then? Honestly did not look up yet, but, from the sound of it, what else was available to produce sounds like that at the time?


Analog subtractive synthesis mostly


Was Jarre popular outside of France? I think the first record I ever bought was Oxygen. In France, he used to be super popular in the 80s, the novelty of instrumental electronic music and catchy melodies. For some reasons, he quickly went out of fashion.


I would say so yes, given he's in the Guinness Book of Records for one of the highest attended free concerts of all time (Moscow, 1997 with ~3.5 million people). He's also in 4th and 8th place, with 2.5 million in Paris in 1990 and Houston TX in 1986 with 1.3 million people respectively.

https://en.wikipedia.org/wiki/List_of_highest-attended_conce...


> Houston TX in 1986 with 1.3 million people respectively

The intro to the concert footage has cuts from TV news and interviews, shows the scale of things: https://www.youtube.com/watch?v=GYio7l7B940

Was extra special as one songs was composed for and was intended to be performed live from the space station by one of the Challenger astronauts[1] who died a few months earlier.

I was a young kid here in Norway at the time, but I recall very well the concert being covered by news here. His music was on the radio as well, so he was definitely well known outside of France I'd say.

[1]: https://en.wikipedia.org/wiki/Ronald_McNair#Music_in_space


What's with the 'was'? He's still quite popular and his music is played fairly regularly, not less frequently than other artists of that day except for the likes of Queen & Bowie. Just like Vangelis. Quite a bit of music from that era is simply never played at all, but Jarre's work still features in the same places that it did back then: as background to videos and on the PA of the local supermarket. The latter is quite funny: he had a record called 'Musique pour supermarche', to see it used like that 40 years later ...

NL was a good market for Jarre though, he was extremely popular here back then.


Has anyone happened to hear Brian Eno's Music for Airports played in a real airport?



When I first discovered it, I listened to it in an airport on a Discman, and it worked for me. Calming, and people seemed to move more slowly.


Discman... there's a word I haven't seen in a long time! I had one, one of the very earliest released as payment for a job. It came with one CD, Dire Straits, Brothers in Arms.


He's still releasing albums, mostly collaborations.

Epica Take 2 came out on Apple Music last week.


I listened to some of it on Youtube but it is pretty far from my comfort zone, it makes me antsy just listening to it. But it's great to see he's still active.

Tomita, Vangelis and Florian Schneider are all gone, we should cherish the ones that are left. Their music was pretty much the backdrop of my teenage years.


Spanish here, in the early 80s he was fairly popular here and would be played in the top pop music stations, although to many adults it felt strange and experimental. I was a little kid when I asked to get The Concerts in China for xmas and my parents were like WTF.


Oh, he was very well known in USSR / Russia in the late 80s / early 90s. My friend was a DJ on a radio station back then, and she once played his music for an entire night -- and got a call from a listener who thanked her and said that it changed his life.

As for his present-day popularity among younger people, it isn't as high as that of, for example, Queen or Pink Floyd -- though I had a ride with a young Uber driver who was entranced with Les Chants Magnétiques that we heard playing on the car radio.

And as for me personally, I currently have three of his songs in my Spotify favorites.


> Was Jarre popular outside of France?

As I recall it Jarre was a semi-god in Japan. He made incredible concert there and had a gigantic following. I think he was bigger in japan than in France.


I can’t speak for America but he was a household name in the U.K.


Maybe not household, in America but I grew up listening to him and I'm American and I was born in the 70s.


US-based commenter here, I first heard JMJ in the soundtrack to the 1988 gaqme "Captain Blood" by ERE Informatique/Exxos which is a clip of Ethnicolor from Zoolook. Oxygene IV was advertised on TV in "Pure Moods" and a lot of other new-age compilations.


> Captain Blood

Forgot about this game. I can't remember the actual game, but I found it very beautiful and intriguing. I think the music play a big part.


I'd never heard of the guy before, but after hearing Captain Blood I bought his back catalogue


Oxygene was part of the sound track for the Peter Weir (Dead Poet's Society, The Truman Show) film Gallipoli (1981); an interesting choice for a movie set in 1915.


If not a household name, at least a weekly household sound for kiwis as Oxygène was used in the title credits of Our World on a Sunday evening.

https://youtu.be/wnPR9IoaTFc


Beat me to it for some NZ perspective, but while we’re here, I was introduced to Jean-Michel Jarre at one of the first Laser Tag places in NZ in the late 80s.

I can’t remember what it was called, but it was next to Leisure land/Footrot Flats theme park in Te Atatu. Laserforce maybe?

It was multi-level, filled with fog and Star Trek style doors that opened when you shot them, and Jean-Michel Jarre played as a constant soundtrack. It was truely magical for a space-and-sci-fi obsessed preteen.

My friends and I only went a couple of times before it turned into paintball, which wasn’t as much fun for 11yr olds!

Subsequently Rendez-vous was one of the first records I ever bought and played over and over again on weekend mornings when my parents were still in bed.

Fourth Rendez-Vous was my favourite.


And in Australia on SBS Chill[0]

[0] https://www.sbs.com.au/radio/chill


I think Jarre was quite popular in ex Yugoslavia. In part because his music was used on TV in the 80s, for intros, background music for education shows, etc. I wouldn't be surprised if it was not fully licensed at that time.


Brazilian here, Rendez-Vous was the first music cassette tape I ever bought.


He was huge in Poland in the eighties, at least in the circles I hang out in. For the more geeky kids he was as well recognized as Michael Jackson among the pop listening crowd. Marek Biliński was a very distant second.


Jarre was definitely popular across Europe in the 1980s.

I was introduced to him around 1987 with Oxygène and Équinoxe, and always loved his 1970s and 80s albums, though I agree that he went out of fashion pretty early. As far as I'm concerned, he probably peaked creatively with Zoolook (1984), and I haven't really cared since Waiting for Cousteau. His later work isn't exactly bad, it's just the exact same formula he's been following for 40+ years.


Didn't grow up in France and he was one of my favourite artists of my youth. I could hear his popular tracks as background music on TV and radio but I doubt people knew the artist behind the music.

More recently in a lot of interviews of djs and producers in European EDM scene, they reported that they were inspired to start a music career by him.


In the late 80's and early 90's, while I was college student in US, I was interested in listening to MOD files with protracker, etc on my Amiga 500, and I discovered his music through it, available via usenet (as this was pre-www days)


Pretty popular in the UK. His Destination Docklands concert had about 100K people (in atrocious weather) and was quite a notable spectacle. Something I remember from my childhood.


Quite popular in Portugal, I have several VHS tapes from his concerts.


In India, Kraftwerk was always more easily available, since the mid 70s.

Jarre was known of, but records weren't easily available. We would swap cassette tapes. That changed in the mid 80s.



I grew up in NZ and was popular there with broad range of listeners. Oxygene was one of the first vinyls I bought.


It seems like a lot of sci-fi shows used to try to copy his music to impress futurism.


He was certainly a thing in the US not long after release.


And another amazing ditty on Dittytoy. This is a vocoder written in javascript and performing (a small part) of the aria "Nessun Dorma" from Puccini's opera "Turandot": https://dittytoy.net/ditty/6f30b0885d


There was a cool Amiga musicdisk featuring Jean-Michel Jarre mods.

Archive.org has the adf image[0], but unfortunately it doesn't seem to work with their builtin emulator. There's a video[1] showcasting it, but only plays the first five modules, yet Oxygene II and IV are the 6th and 7th.

0. https://archive.org/details/Triumph_Music_Collection_10_Jean...

1. https://www.youtube.com/watch?v=f6qwOYQD4bg


Color me impressed to see my favorite musician of all time on HN. Looking forward to get home put some nice headphones and listen to this, see if I can spot the differences


Fun fact: Oxygen part IV was greatly inspired by Popcorn (1969), which Jean-Michel Jarre covered under the Jammie Jeferson pseudonym.


Wonderful, but it may require some optimization as it starts stuttering like crazy on Edge after the first 10 seconds.


Smooth on a 12 year old Mac Mini with Safari - hooked to the living room stereo and powering a little retro party right now. Love it!


Firefox / Fedora / i7-6700HQ @ 8x 3.5GHz also struggles, encountering a problem typical of a high school orchestra:

> Performance error: strings can't keep up.


Infuriatingly stuttery for me on Firefox (on Linux; AMD Ryzen 5900X, so not exactly underpowered; plenty of RAM but very weedy GPU) but perfectly smooth on Chrome. It would be interesting to know whether this is something Chrome does better or whether it's just that Chrome and Firefox are different and whoever made this only tested/optimized it in Chrome.


I experienced the same, but once I enabled JIT (disabled "Advanced Security" for the site), it was smooth.


Huh - I'm on a weedy ThinkPad X1 Nano with a i5-1130G7 on Debian / testing and it's playing fine under Chrome, barely touching 10% of one processor core.


Fair amount of stuttering here too in Safari/Orion on a Xeon W-2140B iMac Pro.


Meanwhile smooth on iPad (no need to specify engine).


Sounds great on M1 Safari.


On my machine, it’s pretty good in Edge, but stutters in Firefox.


Same here, on a quite powerfull Thinkpad graphics workstation.


Same on Firefox, but it does sound good in between stutters.


similar to others, for me stutters like crazy in Firefox but only a tiny bit of stutter in Brave (aka Blink/Chrome)


This runs fine in Safari on a MBA M2


Same on Firefox


For the size that's absolutely amazing. On FF 108 it stutters quite a bit but on Chrome it's flawless and very easy to listen to. As for fidelity: Jarre's is a bit brighter, but if you'd have played this at me on the car stereo or so I wouldn't have picked up on it being a cover for at least a minute. Very well done.


It does not make any sound on my M1 iPad.


My old iPad air2 for some reason makes sound through its own speakers, but won’t airplay it.

(And by “makes sound”, I mean it sort of stutters and jerks it’s way through with just enough going on that I can recognise the melody…)



This is great work. I remember my parents buying Oxygene on vinyl in 1982 at a yard sale when I was nine and I played it nonstop on my “Kiss” record player at the time.


It appears there was little to no attempt to optimize for a small code size. The code could be minified and simplified to a lot less than 19 kB.

I was curious to look at the size of a decent MIDI version of Oxygène IV (https://www.nonstop2k.com/midi-files/4259-jean-michel-jarre-...) and when gzip-compressed it is only 5,690 bytes.


I think the cool thing about this version is that the whole sound wave (including the code for the synthesizers) is generated by one single piece of javascript (<19 kb). So it is more about the code itself than the code size.


It puts the term 'softsynth' to good use. Incredible, really.


The game of reducing code to the minimum to produce an interesting output (e.g. demo scenes) makes me think about Chaitin randomness and entropy measure: https://mindmatters.ai/2021/03/chaitins-discovery-of-a-way-o...


I wish I could study (and explain) those 19KB of javascript (and including the rest of the locked down software stack taken for granted) as the sheet music that I take them to be from a fully academic music-technological standpoint.

but I don't want a bend over backwards to have to do this. oh well.

I wanna bend over backwards as I do it, from the very hardware (intel x86) all the way to the sound and back down the stack again. going through (or across??) the ADC and DAC cards and all that. I would never finish, so I wouldn't be allowed to start in any typical academic programs.

I think within the academia is the only place this could possibly be brought up.


wow that's cool! I like Jean-Michel Jarre and I like seeing music created through code, awesome that it combines the two. Though to be a bit of a pendant I'm not sure it is truly generative music (https://en.wikipedia.org/wiki/Generative_music), as I assume it is looping identically and so isn't "ever-different and changing".

I think of generative music as being stuff like this (copy pasted from the interwebs long ago):

echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay


You probably like this ditty:

let t=0; synth.def(() => (255&(1|63(63&63+8Math.sin(t++/2e5)t/2e5)&100Math.tan(4Math.PIt/2e5)/4Math.sin(4Math.PI[165,220,175,262,196,147,220,165][7&(2t/2e5&12t/2e5^8t/2e5)]t/2e5)|2048(1+(1&t/4/2e5))t/2e5))/127-1).play(0,{env:one});

https://dittytoy.net/ditty/7c700fc1c3


thanks, that's pretty cool!


#SciFiTip If you play the original 33rpm vinyl at 45rpm, the speakers reveal some truly intense intergalactic warfare.


Jarre is fairly notorious about enforcing copyrights and whatnot. He might be having thoughts about sending a letter...


Amusingly, then, I was introduced to Jarre's music through a little C-64 demo[1] that came as an extra on one of my pirated floppy disks back in the '80s, which contained a SID rendition of one of his songs. The whole music lineup on that demo was awesome[2]. It had an unusually large influence on the "tree" of electronic music artists I went on to discover in my youth.

1: https://csdb.dk/release/?id=34955

2: https://www.youtube.com/watch?v=1vSNPCcDAAE


Oh I remember this, except the version I had had a four-way-mirrored parabolic thing growing and shrinking and changing colour. That was a great demo.

The C64 was tremendously influential on my listening. I like a lot of electronic music now probably due on the incredible music that came out of that thing. That, and the electronic music in Doctor Who.


Interesting. You have a reference? Been listening to his music for ~40 years and this is the first I hear that.


He was the chair of the European Artists representative organization. Don't remember the name. He played hardball.

There's still a lot of his stuff I can't get on Apple Music.

But he has been very open to collaborating with folks, and pushing remixes (as long as he gets a cut, I guess).

I've been listening to his stuff since Oxygene.


I want to learn to use that tool to make synth / chours background music. Where can I start?


The last page (ie. earliest submissions) are small examples, take a peek at those.

Edit: there's also a syntax reference mentioned in them: https://dittytoy.net/syntax


This is so cool. I am tempted to do something in this area. Tried Puccini, even better.


Looks and sounds quite like a .STM music tracker, popular in the age of 286/386 PCs. But my phone, with CPU at least two orders of magnitude more powerful, cannot keep up with it(


truly amazing


Stutters quite badly on my laptop (Thinkpad P53 / Ubuntu / Firefox)

So here[0]'s the original as used at the end of Micro Men, featuring Acorn / ARM's Sophie Wilson as the barmaid.

[0] https://www.youtube.com/watch?v=XXBxV6-zamM&t=4882s


Stutters badly on FireFox on my desktop (Win10 Ryzen 4 core), stutters a little on Edge.


That's crazy, it's smooth as butter on my pixel 6.


It stutters for me when I have the tab in focus. What I switch to another tab the stuttering goes away. I guess it's the animations that are bogging down my Intel MBA.


Comment lines 361-394 ("strings"). The message box says that this instrument can not keep up on my machine.


Stutters on my old gaming PC on Firefox as well, but runs smooth on chrome.


and here's the real original on JMJ's channel:

https://www.youtube.com/watch?v=kSIMVnPA994


It's fun to look at but I can't think of a more miserable experience than writing music that way.


There's a vast world of musical programming languages https://en.wikipedia.org/wiki/List_of_audio_programming_lang...

PureData and SuperCollider are some of the bigger "more active" free ones these days. Others like Csound are successors to languages like MUSIC-N, which goes back to the 1950s. The same year that Fortran got started...

Often these aren't 100% typing like other languages and there are things that generates some of this code such as a midi keyboard.

You can use the Linux tool amidi to read from the midi device and various unix tricks to get things into your code. There's many compact cheap midi keyboards and controllers on the market. You can even use a tablet or phone and tap the screen as a virtual music instrument or use the 6DOF sensor to imitate analog inputs.

Some people will sit around and type it all out, but there's some pretty basic ways to avoid that exhaustion.

I personally think the world of musical programming languages with novel interfaces and meta-languages is still very under-explored.


The idea that you can fit music in "16kb" is not really shocking, music notation has achieved the same or better for centuries.


Music notation does not include any information about what the notes should sound like. The actual sound synthesis, not the notes, is the majority of the code size here.


Music notation is a very lossy format though, and getting a way to play it back at all is ludicrously expensive.


It's also highly compressible, with all the repeating patterns and similar permutations.


@dang current URL is blogspam, it should be changed to https://dittytoy.net/ditty/24373308b4


I think 'blogspam' is a bit harsh. This blog entry provides a bit of context and lightly discusses the Dittytoy site and gives credit to the arranger.


Your comment made absolutely no sense to me. Checked my ad-blocker. It was off!


The context and descriptions are very lightweight and almost nonexistent. And as another commenter mentioned, there are tons of ads on that site.


I did not realize that. I opened it in Firefox private mode and didn't notice a single ad.

edit: I checked again and I do see a sidebar ad and a matching ad at the bottom which I don't recall seeing earlier. They are both static and reasonably tasteful.


Without a blocker, I see 10 separate ads.


disagree, the url contextualizes what one's looking at in that other URL.


4kb the notes, 15kb the js code, 40 Mb of other JS libs?

Edit: Oh and 2 Gb of samples.


> Edit: Oh and 2 Gb of samples.

You're just pulling this out of your ass. There are no samples. All the sounds are actually generated by the 19kb of JS + the dittytoy API which provides a pretty low-level set of helpers to build synths and sequence notes.

I can't figure out how big/small the dittytoy API is but 40MB or 2GB are both ridiculous.


The dittytoy API is 57.4kb, so including the source of this ditty, everything fits < 80kb.

No samples or webaudio filters are used. Everything (the whole sound wave) is generated in code.


Where do you see the source of dittytoy? Asking because one of the commentators on the original link mentioned a code size of around 600kb.


GP made dittytoy.


I guess that makes their answer more authoritative then ;)


Where on earth did you get the last two numbers? The total network download for the entire page, including GUI, images, fonts, google tracking BS and everything else, is only 536KB. The track will then play in full, offline.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: