Computers

xrayspx's picture

Facebook Hoax Denouement

Music: 

The Clash - Hateful

Of course, according to the natural law of maximum irony, my very next Facebook post resulted in this screenshot.

In my withering defense, I rate anything I read based on the relative historical trustworthiness of the writer. Ebert, Gibson, my wife, rate very high and are near-unimpeachable sources. William Gibson rated a cursory check of Google News to see that, yeah, there are other headlines from other sources telling the same story.

That said, don't do the crime if you can't do the good natured time :-)

Previously

Since Facebook sucks at telling time, the meat all happened within ten minutes of the tweet I read

Fixed Tags:
xrayspx's picture

iTunes Mass Importer

Music: 

Bauhaus - King Volcano

For my own notes, so I don't forget I did this... Big thanks to Doug from Doug's Applescripts for iTunes for convincing me that making iTunes update in this way is possible.

As with all things, I have to make my music library overly complicated. In historical times, I ripped at 128k, then 192k, but even a lot of the 192k mp3s sound like crap, so I've decided that going forward, I'm doing 320k CBR MP3s as well as FLAC.

I'm using Max to do the rip and encode on the Mac. It encodes both sets of files in parallel and saves them in a directory under ~/Music/max-rips/Artist/Title.

Here is a script to sort that and update iTunes. It'll drop the MP3s in my MP3 library directory, then drop the FLACs in a repository for them, finally making iTunes add the new files at the end. If all you want is to make iTunes rescan your library for new files from a script of bash shell, you want the osascript line toward the bottom, just substitute the path to your collection in place of mine.

I'd like to pass $directory and $albumdir to the osascript and have it live inside the inner for loop, but I've not figured out how to use my variables inside the 's that osascript -e requires to run its part. It only takes a few seconds to re-index the whole thing.

This is the utterly fugly 15-minute first draft with crappy variables and whatnot, but it does work.

(Yeah yeah, "find blah blah | while yadda yadda", 15 minutes, works, admittedly fugly, 2000 CDs and nothing has | in the artist or title)
Update #2: Nevermind all that, the script below is a lot clearer and does all that stuff I wanted.

maxmover.sh:


#! /bin/bash

find ./max-rips -depth 1 -type d | awk -F "max-rips/" '{print $2}' | while read artist
  do

    mkdir "/Volumes/Filestore/CDs/$artist"
    mkdir "flac-output/$artist"

    find "./max-rips/$artist" -depth 1 -type d | awk -F "max-rips/$artist/" '{print $2}' | while read album
      do

        mkdir "/Volumes/Filestore/CDs/$artist/$album"
        mv "max-rips/$artist/$album"/*.mp3 "/Volumes/Filestore/CDs/$artist/$album/"
        mv "max-rips/$artist/$album" "flac-output/$artist"

        `/usr/bin/osascript         tell app "iTunes"
        add POSIX file "/Volumes/Filestore/CDs/$artist/$album/"
        end tell
        EOT`

      done

    rm -f "max-rips/$artist"/.DS_Store
    rmdir "max-rips/$artist"

  done

Update:
It looks like there are several ways to skin my osascript cat. These aren't even the most fluid examples I've found.

xrayspx's picture

Fixing an ugly email situation

Music: 

I've been running IMAP services on my mailserver for many years, previously using Courier. I always had a pretty basic but solid-running system. Postfix, doing a Spam Assassin check, then delivers to the user folders, and Courier running IMAP.

xrayspx's picture

OK Monster Cables

Music: 

Where do I sign up?

Yesterday I installed Ubuntu to dual boot with Windows on my HTPC. The idea is that it should boot into Linux by default, and I'll have a "reboot into Windows" button which will do a one-time Windows boot if I really want to run one of my 3 Windows games.

Mainly the machine is used for XBMC and MAME. XBMC works great in Ubuntu now, and with KDE I can tweak the sizes of every font everywhere in the UI, which was one of my big issues with Windows.

My main problem was with MAME and my joystick being all jumpy. For instance, in Ms. Pacman, it would stick "up", so that if you want to go in a different direction, you had to hold the stick the entire time. Games were pretty un-playable.

This only seemed to affect the left stick on my Logitech Dual Action gamepad, and it was driving me nuts. If I used the right hand stick, it seemed to work just fine.

I spent a few hours tweaking dead zones and such, which did work as advertised, but which did not solve the sticking issue. I booted into Windows, since I hadn't really noticed the problem there and wanted to check all my settings against my Windows MAME settings. What I found was that the problem was there, but it was more subtle so I didn't notice it.

So I unplugged my controller from the USB extension cable I was using (did I not mention that, did I not mention that I'm using J. Random USB Extension cable? Oh yeah, slipped my mind...), and plugged straight into the machine.

Rock.

Fucking.

Solid.

I found a shorter extension cable, which doesn't really work for me overall, but which does not have the problem.

Now I think the real solution is to have a powered USB hub screwed to the bottom of my coffee table, and plug joysticks into that (and phones, and tablets, and...and...and...) and then run that back to the PC. Seems like the best way.

What a massive pain in the balls for some 30 year old video games.

xrayspx's picture

Streaming WFNX on Android

Music: 

Front 242 - Welcome to Paradise

UPDATED: I have verified that the process below is absolutely the right thing to do. We drove around for an hour to test and the phone only dropped in the largest of the known cellular dead zones, so buffering is a lot better. The phone also ran a /lot/ cooler than when I was using the flash player. Plus, this will work with our Nexus tablets, since they don't have Flash and Adobe stopped supporting Android

Earlier in the week, WFNX posted a quick and dirty mobile page with options for how to listen on various devices. There is an Android page there, but what happens is it loads a flash player in your Android web browser and streams that way.

This sucks on many levels. 1) It's flash and takes a ton of CPU, B) It doesn't buffer very much if at all, so it tends to drop and re-establish, and third) It's in a browser, and is limited by browsery-behavior stuff like "when the phone locks, it stops playing music", so you can't ever let your phone auto-lock. I get that FNX needs to be generic here, and can't get complicated enough to tell people to go get new software, and they probably don't want to be seen as endorsing a product, so that all makes sense. That said...

The right way to do this is to skip the Android page, and go to the iPhone/iPad page. There they have direct links to an MP3 stream. The MP3 stream is 65kb/sec, so they're not the highest quality things ever, but they'll sound better than whatever Clear Channel does to the air around 101.7.

What you need is a music player capable of playing .pls streams. Head over to the Play Store and get A Online Radio.

Choose the Live button, and scroll down and select Add Channel:

You can either type in all of http://provisioning.streamtheworld.com/pls/WFNXFM.pls, or, if you're on your phone now, click and hold here and choose copy URL. Then paste it into the Add Channel dialog:

Once you do that, it should create a new entry in the Favorites tab, right at the top, click that, let it buffer, and listen:

xrayspx's picture

It's a bad day for ears

Music: 

Big Black - Heart Beat

The other day, I noticed the cover for my headphones was coming off. Don't know how to fix that, but Natalie said she has an idea or two.

Today as I was listening, I started noticing the right speaker wasn't working. I found this insignificant looking notch taken out of that wire, something either fell or sat on it (how, I don't know, given where it is), and so I'm going to have to cut, strip, solder, tape.

Thu, 06/28/2012 - 12:20am -                                csFlickr

xrayspx's picture

Updated Music Collection Browser

Music: 

Nick Cave And The Bad Seeds - The Weeping Song

I've made some much needed updates to my Music Collection Browser, and thought I'd mention it. It now does a case-insensitive sort of artist names, while ignoring leading special characters ( "'",":","(", etc), as well as throwing away leading "The"s for sorting. This was a big deal to me since it annoyed me every time I had to scroll through 50 The Whoevers to get the band I want.

I also fixed the compilations piece, so linked that back in. I just settled for big ugly links for soundtracks/compilations and individual artists at the top of whichever page is loaded. It sucks but there's really not much of a better way to go.

Now I just have to re-tag a few albums and artists to make things consistent, since some artists have both a "The" and "non-The" variant in the list, but at least now they're right next to each other.

Also, I want to vent about Gracenote. Fucking Gracenote. That is all. ... For many artists who have lots of featured guests, it appends all the "feat. whoever"s to the Artist tag. That is wrong. It should be appended, preferably in parentheses, to the song title itself. It's the only way to maintain a reasonable collection.

Of course, iTunes is stupid enough to create different artist folders based on this idiocy, so now I have 15 Bootsy Collins directories on the FS.

The goal list for this project, after 24 hours, now stands at:

  • iTunes XML files
  • Case Insensitivity for sorting
  • Throw away non-alpha/num leading characters to build the list ('Til Tuesday, :wumpscut:, (Cevin) Key, though it would break !!! if we owned any, or else it would just show up first, where 'Til Tuesday is now, which is fine)
  • Throw away leading "The"s for sorting, but only one, so as not to break The The, or Thes One
  • Better handling of compilations
  • Searching
  • Port to PHP?
  • Here's where I justify not crossing the rest of the items off my list:

    (1) I've barely bothered to look at iTunes XML files because every time I open one and try to make sense of it, I end up weeping to myself. I think what it's going to end up being is me taking my iTunes DB and munging into either sqlite3 (probably) or MySQL (unlikely), in a stripped down version of the same form that Amarok built its sqlite3 databases. I can't help but think that all the searches I run against the DB would be slow as hell if I was searching an unindexed XML file every time I do anything. So now I just need to write a perl script to parse the iTunes XML database file and puke out SQLite3 in a schema my site already handles.

    (2) I don't personally care much about searching. The point of this tool is so that when I'm in a record store or otherwise away from my computers I have quick access to an accurate copy of my CD collection, so I don't purchase dupe CDs or whatever. Or if someone asks me if I've heard of some band I can pull it up. Also, helpful links to YouTube, Wikipedia and Amazon searches for each artist. That's pretty useful really. Searching is irrelevant. The only place it would really be handy is if I send the page to someone else and they want to quickly find an artist or song, to which I say "Suck it up and scroll".

    (3) I was thinking of porting it to PHP just because I've written like, 6 lines of PHP and figured I should know it. This thing could stay Perl until Unix time rolls over and I wouldn't care at all.

    xrayspx's picture

    Expedient Potato Clock

    Music: 

    Joe Buck - Muddy Waters

    Today one of our ISPs, Expedient(Warning: Opens annoying talking flash-based woman talking over your music), sent me a potato clock. I think it was to mark the 10 month anniversary of a new circuit we haven't quite been able to turn live yet (fault of another 3rd party vendor, long story) :-)

    You'll notice the sticker on top is not centered, and that made it rest on this like 1/32" lip around the right "potato cup". That was going to drive me mental, so I was able to re-center it, now my inner Monk is happy.

    Aside from that, it works great. It took me 10x as long to set the clock as it did to get it powered by potato, but it's pretty much staying right on time after 30 minutes anyway.

    This is not the first such strange vendor swag they've sent me. The last thing I can remember was an Expedient branded USB hub, that had a keyboard controller in it. The Keyboard controller was so that whenever you plugged it in, it could send "http://www.expedient.com" to your default browser and open their homepage when you attach it. It also had a button on the top that would send you to their site, which is why it needed to be a "keyboard". I can't put my hand on that thing at the moment, but if I ever do, I'll definitely update this entry. It may not have survived my move from my last cubicle.

    Photos:

    xrayspx's picture

    Fix for DSL latency issue

    Music: 

    Siouxsie and the Banshees - Isreal

    Office
    Since upgrading to 7.6Mb/sec DSL, I've had an occasional issue where the Tubes get all slow-like. The modem will say it's connected at full speed, and that things are, highly technically, "GO!". However my latency is horrible. Even to my first upstream router I end up getting like 50+ms ping replies. Pinging my site or 4.2.2.2 or other "Things that are fast on the Internet" ends up well over 100ms.

    Fixed Tags:
    xrayspx's picture

    Once again with security Spam

    Why can't we pay attention to FB hacking warnings?

    People do hack FB profiles, it happens every day. They often do it by inducing the target user into clicking a link that can steal their login information in any number of ways. This happens. It's a Big, Bad Internet, and in all likelihood at some point you will:

    Pages

    Subscribe to RSS - Computers