SSTV is go (sorta)

Luc gave a really good introductory talk about SSTV last night at the radio club. I’d had no luck at all running qsstv on this Ubuntu box, so I thought I’d try MMSSTV under Wine … and it worked!

I picked this image up from N5HIC on 14.230 MHz. Sure, I need to fix the sync, so my images aren’t slanted. I also don’t seem to be able to transmit, since it fails with a “Can’t open sound card (3)” error. But it’s a start!

Generational loss in MP3 re-encoding

Okay, name this tune:

madplay / lame – 1000 iterations

(You’ll have to scroll about half way in before anything starts)

Didn’t get it? Try this:

madplay 24-bit / lame – 1000 iterations

(Again, you’ll have to scroll about half way in before anything starts)

Missed that one? Okay then, how about:

lame / lame – 1000 iterations

(no need to scroll here.)

Unless you’ve been living under a rock, it’s a clip from Adele‘s Someone Like You. Sure, you can’t make out the words too well in the last one, but at least they don’t sound like some dire paen to Cthulhu, like the first two do.

All of the above samples are the same source file re-encoded 1000 times. I’d heard that there was some loss to encoding MP3s, but thought that if you kept about the same bitrate, there wouldn’t be too much loss. I wanted to test out my theory, so I took:

  • LAME β€” a quality mp3 encoder (that can also decode to WAV)
  • madplay β€” a decent mp3 decoder that uses fixed point for speed
  • a shell script (see below) that encodes an MP3 1000 times, feeding the output of the last run as the input of the next.
  • a sample clip; in this case, ganked from Amazon.com: 21: Adele: Music using Audio Hijack Pro.

The original sample looks pretty clean; it’s not the highest quality, but it’s clear:

The first thing that strikes about the multiply-reencoded file is that it’s much longer:

This is because LAME adds padding to the beginning and end of each song. All this padding adds up over 1000 runs.

I’d used madplay extensively before, so I knew it worked reliably. First, I tried it using an intermediate sample size of 16 bits (same as the source) and no dithering. Just after 100 runs, Ms Adkins’ plaintive voice becomes hard to understand:
madplay / lame – 100 iterations

I’d turned dithering off in the first test, as I thought it would overcome the signal. As the signal was pretty much gone, I didn’t think I had much to lose, so I tried it at madplay’s full capability of 24 bit internal processing. Again, 100 runs was where things started to go really sideways:
madplay 24-bit / lame – 100 iterations

LAME can also decode MP3s, and remarkably, the lyrics remained discernable after 1000 interations (so go and see the third sample up top). Sure, it sounds scratchy, but the piano sounds like a piano and not like some underwater harp. LAME is clearly able to recognize its own input, and decode it accordingly. madplay, on the other hand, just treats an MP3 as a generic MP3, hence the over-compression and extra silences.

So really, if you’re going to re-encode music, it matters more what you use to decode your MP3s. If you can use the same tool for both, all the better.

Continue reading

All Day Long In Bliss

Call me a twee-hugger, but I love Trixie’s Big Red Motorbike. They sound like a brother and sister making up silly sweet songs and recording them on a shoebox tape recorder β€” which is (pretty much) what they were. Siblings Mark and Melanie Litten, along with some occasional help on backing vocals and saxophone, caught the ear of John Peel, and for a while they were the soundtrack of everyone’s anorak life.

Mark recently scraped together everything of TBRM and so Lobby Lud Records lives again on Bandcamp. There’s not much else out there, except the John Peel Session. This is good.

rebooting the handwriting

My handwriting is atrocious. It’s scrawly, uneven, with malformed letters (r never recovered from Miss MacFarlane’s ligatures, t usually left unstroked) meandering up and down the line. It’s got blotchy, affected borrowings, too: tailed and stroked 1s and 7s in the European style, and a d that was least seen in a partial differential: 𝛿. In short, a style all my own, wanted by none.

I’d prefer to have my handwriting legible to others, and even by me. I don’t want my notebooks to look like a spider’s hauled its bedraggled carapace out of the inkwell onto the page. Unfortunately, cursive is right out to learn. I can’t read it, in any style. In fact, I find the German SΓΌtterlin to be as logical to learn, as I can’t read that either, but at least it looks badass.

The style I’m trying is pre-cursive. Yes, it’s meant as a transition from printing to cursive, but I like its simple clean italic lines. I imagine I’ll join it up a deal more when I’m writing quickly. The hardest part for me is sticking to the line and stopping my writing wandering off up the page.

We’ll see how this goes …

(and thanks to I want to write right! | Ask MetaFilter for the suggestions.)

Awk day of the week function

Yet another in my series of awk functions no-one but me will ever use:

function dow(year, month, day) {
# Modified from C Snippets "calsupp.c" public domain by Ray McVay 
# http://www8.cs.umu.se/~isak/snippets/calsupp.c
# returns 0-6 where 0 == sunday
# tested over 24000 days in range of unix timestamp, 1970-2035

    day_of_week = 0;

    if (month <= 2) {
        month += 12;
        year--;
    }
    day_of_week = (day + month * 2 + int(((month + 1) * 6) / 10) + year + int(year / 4) - int(year / 100) + int(year / 400) + 2);
    day_of_week = day_of_week % 7;
    return ((day_of_week ? day_of_week : 7) - 1);
}

Basically, all this does is calculate a Julian day number, then take its remainder modulo 7. I’d seen an example that parsed the output of ‘cal’. That’s one way of doing it; not necessarily mine.

Worked All States – by my standards, at least

So I’ve managed to talk to at least one person in every US state. This is Quite A Big Deal for a new(ish) ham. To be more specific, I’ve done this using one mode – PSK31 – which makes it slightly better nerd-tuned.

But you’re going to just have to take my word for it now. In order to get a certificate, I have to get the 50-ish responds to log their details either on eQSL or ARRL’s Logbook of the World. And this is a bit more difficult.

On eQSL, I’m at 49/50. My lone North Dakotan QSO was from someone mobile from out of state, and eQSL doesn’t handle that well. North Dakota is very sparsely populated, and there’s very seldom anyone on the air from there. Every time I look on PSK Reporter, the emptiness of the state glares at me …

LotW is more of a problem. It says I still have ten more states to go. While it’s a very elegant system, the setup process for LotW is just a bit too complex for most people.

So here are my maps:

VA3PID Worked All States

VA3PID Worked All States: West

VA3PID Worked All States: Central

VA3PID Worked All States: East

I’d like to apologise to Vermont, whose presence is rather noted by its absence from the map. I’m actually surprised that more states ended up with all of their QSOs appearing inside, as:

  • Towns tend to be by rivers, so that’s where you’ll find more hams
  • Rivers often mark state boundaries
  • Ham locations are given as grid squares, which are a few kilometres across
  • Rivers are wiggly, and don’t respect arbitrary boundaries.

Absent making a blocky, 8-bit like political map, we’ll have to make do with these failings sometimes.

best fail whale

β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–β–ˆβ–„β–„β–„β–„β–ˆβ–Œ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œβ–„β–Œβ–„β–β–β–Œβ–ˆβ–ˆβ–ˆβ–Œβ–€β–€β–ˆβ–ˆβ–€β–€
β–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–Œβ–„β–Œβ–„β–β–β–Œβ–€β–ˆβ–ˆβ–ˆβ–„β–„β–ˆβ–Œ
β–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€

(nicked from)