11 ms·
Jean-Michel Jarre’s ‘Oxygene 4’ Recreated with 19KB of JavaScript
- luckydata 4y agoIt's fun to look at but I can't think of a more miserable experience than writing music that way.
- oceanplexian 4y agoThe idea that you can fit music in "16kb" is not really shocking, music notation has achieved the same or better for centuries.
- HPsquared 4y agoIt's also highly compressible, with all the repeating patterns and similar permutations.
- vintermann 4y agoMusic notation is a very lossy format though, and getting a way to play it back at all is ludicrously expensive.
- skrebbel 4y agoMusic 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.
- kristopolous 4y agoThere's a vast world of musical programming languages https://en.wikipedia.org/wiki/List_of_audio_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.
- deleted 4y ago[deleted]
- worewood 4y agoColor 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
- csdvrx 4y agoWonderful, but it may require some optimization as it starts stuttering like crazy on Edge after the first 10 seconds.
- unnouinceput 4y agoSame on Firefox
- Gordonjcp 4y agoSame on Firefox, but it does sound good in between stutters.
- baggy_trough 4y agoSounds great on M1 Safari.
- kitsunesoba 4y agoFair amount of stuttering here too in Safari/Orion on a Xeon W-2140B iMac Pro.
- Terretta 4y agoMeanwhile smooth on iPad (no need to specify engine).
- Kwpolska 4y agoOn my machine, it’s pretty good in Edge, but stutters in Firefox.
- pjmlp 4y agoSame here, on a quite powerfull Thinkpad graphics workstation.
- yankcrime 4y agoHuh - 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.
- 4y ago
- Joeboy 4y agoStutters 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 https://www.youtube.com/watch?v=XXBxV6-zamM&t=4882s
- virgulino 4y agoStutters badly on FireFox on my desktop (Win10 Ryzen 4 core), stutters a little on Edge.
- valdiorn 4y agoThat's crazy, it's smooth as butter on my pixel 6.
- jlv2 4y agoand here's the real original on JMJ's channel: https://www.youtube.com/watch?v=kSIMVnPA994 https://www.youtube.com/watch?v=kSIMVnPA994
- rzzzt 4y agoComment lines 361-394 ("strings"). The message box says that this instrument can not keep up on my machine.
- hutzlibu 4y agoStutters on my old gaming PC on Firefox as well, but runs smooth on chrome.
- foruhar 4y agoIt 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.
- deleted 4y ago[deleted]
- Kwpolska 4y ago@dang current URL is blogspam, it should be changed to https://dittytoy.net/ditty/24373308b4 https://dittytoy.net/ditty/24373308b4
- kencausey 4y agoI 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.
- nier 4y agoYour comment made absolutely no sense to me. Checked my ad-blocker. It was off!
- Kwpolska 4y agoThe context and descriptions are very lightweight and almost nonexistent. And as another commenter mentioned, there are tons of ads on that site.
- kencausey 4y agoI 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.
- nier 4y agoWithout a blocker, I see 10 separate ads.
- deleted 4y ago[deleted]
- somrand0 4y agodisagree, the url contextualizes what one's looking at in that other URL.
- ChrisMarshallNY 4y agoJarre is fairly notorious about enforcing copyrights and whatnot. He might be having thoughts about sending a letter...
- kyaghmour 4y agoInteresting. You have a reference? Been listening to his music for ~40 years and this is the first I hear that.
- ChrisMarshallNY 4y agoHe 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.
- ryandrake 4y agoAmusingly, 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 https://csdb.dk/release/?id=34955 2: https://www.youtube.com/watch?v=1vSNPCcDAAE https://www.youtube.com/watch?v=1vSNPCcDAAE
- MrVandemar 4y agoOh 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.
- nottorp 4y ago4kb the notes, 15kb the js code, 40 Mb of other JS libs? Edit: Oh and 2 Gb of samples.
- skrebbel 4y ago> 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.
- reindernijhoff 4y agoThe 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.
- detrites 4y agoWhere 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.
- yodsanklai 4y agoWas 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.
- zoom6628 4y agoI grew up in NZ and was popular there with broad range of listeners. Oxygene was one of the first vinyls I bought.
- hnlmorg 4y agoI can’t speak for America but he was a household name in the U.K.
- ncr100 4y agoMaybe not household, in America but I grew up listening to him and I'm American and I was born in the 70s.
- yankcrime 4y agoI 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_concerts#Free_concerts https://en.wikipedia.org/wiki/List_of_highest-attended_conce...
- magicalhippo 4y ago> 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 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 https://en.wikipedia.org/wiki/Ronald_McNair#Music_in_space
- Qem 4y agoWhen 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.
- nine_k 4y agoBecause 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.
- somrand0 4y agoI 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.
- redeyedtreefrog 4y agowow 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 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
- reindernijhoff 4y agoYou 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 https://dittytoy.net/ditty/7c700fc1c3
- redeyedtreefrog 4y agothanks, that's pretty cool!
- snvzz 4y agoThere 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-Michel_Jarre_Live_1990_Triumph https://archive.org/details/Triumph_Music_Collection_10_Jean... 1. https://www.youtube.com/watch?v=f6qwOYQD4bg https://www.youtube.com/watch?v=f6qwOYQD4bg
- wslh 4y agoThe 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-of-describing-true-randomness/ https://mindmatters.ai/2021/03/chaitins-discovery-of-a-way-o...
- mrb 4y agoIt 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-oxygene-4-midi.html https://www.nonstop2k.com/midi-files/4259-jean-michel-jarre-...) and when gzip-compressed it is only 5,690 bytes.
- reindernijhoff 4y agoI 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.
- jacquesm 4y agoIt puts the term 'softsynth' to good use. Incredible, really.
- FpUser 4y agoThis is so cool. I am tempted to do something in this area. Tried Puccini, even better.
- ExMachina73 4y agoThis 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.
- reindernijhoff 4y agoAnd 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 https://dittytoy.net/ditty/6f30b0885d
- LunarAurora 4y agoSo to compare : 19KB JS -> https://dittytoy.net/ditty/24373308b4 https://dittytoy.net/ditty/24373308b4 Original -> https://www.youtube.com/watch?v=kSIMVnPA994 https://www.youtube.com/watch?v=kSIMVnPA994 Soft synths -> https://www.youtube.com/watch?v=8jGvk28zs4g 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 ?
- reindernijhoff 4y agoThe 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.
- deleted 4y ago[deleted]
- TheOtherHobbes 4y agoThat's pretty impressive. The whoosh sound is just filtered white noise, so I don't think it would be hard to add it.
- mimimi31 4y agoReminds 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/ http://canonical.org/~kragen/bytebeat/
- twic 4y agoI 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/ http://linusakesson.net/scene/a-mind-is-born/
- fabricedeville 4y agoFun fact: Oxygen part IV was greatly inspired by Popcorn (1969), which Jean-Michel Jarre covered under the Jammie Jeferson pseudonym.
- jacquesm 4y agoFor 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.
- SomeHacker44 4y agoIt does not make any sound on my M1 iPad.
- bigiain 4y agoMy 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…)
- SergeAx 4y agoLooks 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(
- smitty1e 4y ago#SciFiTip If you play the original 33rpm vinyl at 45rpm, the speakers reveal some truly intense intergalactic warfare.
- mycall 4y agoThis one got to me, great render: https://dittytoy.net/ditty/6f30b0885d https://dittytoy.net/ditty/6f30b0885d Original version: https://www.youtube.com/watch?v=BSPuY-YLe-w https://www.youtube.com/watch?v=BSPuY-YLe-w
- anonymous344 4y agoI want to learn to use that tool to make synth / chours background music. Where can I start?
- rzzzt 4y agoThe 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 https://dittytoy.net/syntax
- wklm 4y agotruly amazing