Let It Snow

I wanted to make the Carpenter series of posts look ridiculously romantic, so I got the swashiest font I could find.  But it’s not enough: I wanted to make it snow, too.

Now, this blog is on WordPress.com, which adds limitations to what is easy or even possible to do.  I wanted a CSS-only snowing solution that didn’t involve adding any new HTML elements, and that turns out not to be the common thing to do?  There are approximately five hundred thousand blog articles out there about making web pages snow, but they are either snowing in the background, or is a mess of <div> <div> <div>s to make it snow in front of an image.

Looking at this pretty snowing effect, I wanted to do the same, but by just adding a class: snow to the <a> element already surrounding the <img>s in this blog.

Presto:

This, as anybody who’s done CSS knows, took way too long and went down many blind alleys before I got it to work properly.  (So it’s a good thing I did it while I was on holiday.)  Here’s the CSS I ended up with:

.snow {
  display: inline-block;
  position: relative;
}
.snow::after {
  content: '';
  position: absolute;
  display: block;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://lars.ingebrigtsen.no/wp-content/uploads/2017/11/pl2.png'), url('https://lars.ingebrigtsen.no/wp-content/uploads/2017/11/pm2.png'), url('https://lars.ingebrigtsen.no/wp-content/uploads/2017/11/pm2.png'), url('https://lars.ingebrigtsen.no/wp-content/uploads/2017/11/ps2.png'), url('https://lars.ingebrigtsen.no/wp-content/uploads/2017/11/ps2.png');
  animation: snow-fall 5s linear infinite;
}
@keyframes snow-fall {
  0% { background-position: 0 0, 0 0, 30px 40px, 0 0, 10px 0;}
  33% { background-position: 0 137px, 0 70px, 45px 100px, 0 30px, 20px 30px; }
  66% { background-position: 0 274px, 0 140px, 35px 200px, 0 60px, 20px 60px; }
  100% { background-position: 0 413px, 0 200px, 30px 240px, 0 100px, 10px 100px; }
}

So: What’s going on here is that I’m adding an :after element to the <a> element, and that element has en empty content, but several background images.  (Five of them, to be precise.)  These images are mostly transparent, but has snowflakes of various sizes and blurrinesses.  In the original version, all these “layers” are of the same size but animated in different speeds so that the closest layer is fastest.  That’s not possible with the :after thing, because there can only be one :after, and therefore only one animation speed.

So instead I chopped the different layer images into different sizes, and then I can animate one from 0px to 100px while I animate a closer, faster layer from 0px to 200px, and so on.  The important thing is that the animations have to be the same sizes as the images, because otherwise you’ll get a shuddering effect when the animations restart.

And then you can do any number of things, like adding some slight wobble and windiness to the scene.

The more layers you add, the more CPU intensive the result will be.  Depending on whether the user’s browser uses hardware acceleration for the CSS animation, of course.  But think of it this way: It makes the computer nice and toasty warm: Perfect for winter.

(One complication to getting this to work on this blog is that I had called the animation “snow”, so the CSS read “animation: snow 5s linear infinite”.  WordPress.com helpfully auto-translated this to “animation: #fffafa 5s linear infinite”.  Presumably because “snow” is a colour name.  And that doesn’t work.  Thank you, WordPress.com.)

So when I grow up, my job is definitely going to be for restaurants that specialise in weddings in December.  I’ve already got the CSS and the font!

ACW1974: Dark Star

Dark Star. 1974.

Hey! It’s movie time again!

I’m pretty sure I’ve seen this before, but it’s a long long time ago. The context now is very different, because it seems like every other line in the film is familiar from samples in music. I think Meat Beat Manifesto has most of the dialogue on their early-90s albums?

Dark Star is very 70s: Made by hippie nerds for hippie nerds. Which is great! But.

As a sci-fi comedy, it’s more “that sure is wry, man” than “ha ha”. Smoking would probably help, though.

It’s visually very inventive, and probably largely the result of having no money. Plot-wise, it’s probably what some draft dodgers came up with after watching 2001: A Space Odyssey a few too many times.

Yeah, yeah, it’s a cult film. And there are entertaining scenes here. But it’s mainly boring.

This post is part of the A Carpenter Winter series.

A Carpenter Winter

I had planned on re-watching all of Ingmar Bergman’s films starting about right now (we all need cheering up when winter arrives, right?), but the Bergman box set has had its release pushed back two week, so I’m here without any Bergman movies to watch.

So I got all of John Carpenter’s films instead, because that seemed like the most obvious substitution to me.

Join me for a trip back to the fun but scary 70s and 80s!

I’m not really a Carpenter fan: Out of his entire oevre, I think there’s perhaps two films of his that I can remember being impressed with at the time (beyond the “oh, cool” factor): The Thing and They Live.  But perhaps I’m less of a snotty snob now than I was as a teenager, and Carpenter is awesome now?

To accompany these films, I’ll be drinking beer I bought on my recent holiday to Germany and The Netherlands.

Le Guess Who

I went to Le Guess Who in Utrecht, and it was very good. Here’s a festival report.

The festival is spread out all over Utrecht, like here in front of a church where
Le Mystère des Voix Bulgares performed. (The doors closed mysteriously before the huddled throng and nobody let us know what was happening, so we stood there for half an hour until most people decided by themselves that perhaps de kerk is vol.) But the main bulk of the concerts took place either in the enormodome TivoliVredenburg, or 30 minutes south in the De helling/Pastoefabriek/LE:EEN/etc cluster of venues.

Keiji Haino & Han Bennink @ Le Guess Who 2017

So you kinda had to decide whether to do one or the other, because walking back and forth between those would mean missing out on hours of music. The programme was completely packed, though, so you could easily spend an entire evening at either place, but it was an annoyance. And taxis were nowhere to be found at the southern cluster. (Which is by no means unusual for these festivals: It seems like some kind of coordination with the taxi centrals would be beneficial for everybody, but it never happens.)

Oh, and while kvetching about Too Much Walking: The TivoliEnormodome houses a huge number of really great venues (both acoustically and sound-stacky-wise), but oh my emacs the stairs. The stairs. THE STAIRS! Getting from one venue to another usually meant at least walking down two floors and then back up again four floors, and on day four I was kinda looking at the schedule going “eh, I really want to see this but it’s at Cloud Nine and I Just Can’t. Let’s just go to this other thing that’s only one floor down and then two floors up again”.)

Greg Fox @ Le Guess Who 2017

Oh, but the music. The programme was so full that I missed more than half of the shows I really wanted to see, but I prioritised people I hadn’t seen before, so there was less jazz for me than I had expected. Standouts for me included:

Sudan Archives (so much fun with the sampling and violin/guitar playing; I got her album and t-shirt); The Residents (in cow costumes: they were the “surprise guest” of one evening; you have to pay attention to the Le Guess Who twitter feed to find out who’s playing in those spots; kids today why I oughtta, but they were really fun); Stella Chiweshe (only caught the trailing end of her show, but it was really amusing seeing her trying to make a Dutch audience participate in a call-and-response sing-a-long (the Dutch don’t seem to be much of the participating type)); Pharaoh Sanders (probably the main reason for me to go to the festival, and he was amazing, and spryer for his age than I would have guessed (he shimmied and shook his ass to the general bemusement of the audience)); Juana Molina (who I’ve seen before, but this time she had a full band and it was so rocking (but in a good way)); Peter Brötzmann & Han Bennink (who I’ve seen separately a bunch of times, but they’re really wonderful together, too); Tiny Vipers (really pretty mysic and I wanted to buy her album, but she only had vinyl so I guess I’ll have to buy a CD from somewhere); Sun Ra Arkestra (fun, as always); and Mary Margaret O’Hara (again, I caught only the last bit of her set, but it was totes kooky, and sometimes very beautiful).

Mary Margaret O'Hara @ Le Guess Who 2017

Shows that made less of an impression included Keiji Haino & Han Bennink (it was fun, with Keiji Haino stepping up the playfulness as a response to Bennink (Haino played his guitar for part of the show with a baseball)); Thurston Moore & Han Bennink (initially I really got into this, but Moore’s wash of sound got boring fast and Bennink didn’t seem to know how to respond); Prurient (it was Prurient); Greg Fox (which was OK but not really thrilling), Klein (I don’t remember what happened at that concert); Moor Mother (and she started at 2AM, I think?), Keiji Haino (and old-fashioned noise set; it was fine); Les Amazones d’Afrique (zzz); ICP Orchestra (they’re really really good players, but I didn’t really get into it), Perfume Genius (it started off great and very dramatic, but then turned all boring); and Linda Sharrock (the idea I guess was to pair her off with very young Dutch improvisors, but with the exception of the bassist, I disliked them all (especially the guitarist; see for yourself)).

Linda Sharrock @ Le Guess Who 2017

*phew*

And then somebody accidentally (or in a rage of anti-non-Apple-fury) crushed my computer:

But oh well.

Oh! While driving through Germany to get to Utrecht, the most German thing ever happened: We were at a narrow one-way street, with no traffic, but we had a red light and were waiting for the green man to appear, and a (like) 14-year-old boy decided to just go ahead and cross anyway. So a bit later the light turned to green, and we all crossed the street, and the father of the boy rushed ahead and screamed (to the boy) “YOU COULDN’T WAIT TWO SECONDS? YOU COULD HAVE BEEN KILLED!” I didn’t see what happened after that, but I would assume that either the boy became the most well-adjusted German man ever or he joined Baader-Meinhof 2023.

ANYWAY!

It was a nice vacation and a very good festival.