Mercury is in retrograde

As an Aquarius, of course, I don’t believe in astrology. But sometimes, when things start going wrong in rapid succession, I ask my California friends and learn that Mercury is, indeed, in retrograde. I have no idea what this means as per Mercury’s position relative to the Earth (and certainly have no idea how this could possibly have any measurable effect on the Earth), but in astrology terms, it means things are going to break. It’s a bad time to start new projects. One friend, Polly, who actually worked giving readings, explained that this is actually a good thing in that it helps people weed things out and focus, etc. It’s important to lead a balanced life. So my last week or so has been very balancing.

So I mentioned in my last post that I was moving from CVS to svn (don’t worry, this won’t get too technical, but anyway, the next paragraph will be non-geeky). I was all set to start work on new projects for a new year and so I created the organizational scheme that I would use on one computer and when I tried to get it onto the other one . . . no dice. So I decided enough was enough and switched systems. Which was fraught with all kinds of peril. In brief, it didn’t like my data and wouldn’t work with it. Developers started to recognize my login name and ask if I could submit bug reports. This is not a good thing. I had to add every file to svn, one at a time, trying to figure out which one was the culprit. I never did find out, but this process was not fast. At least it’s all in now, so my data is more or less safe.
While this was going on, I finally realized that none of my classmates were going to volunteer to watch my dog. My supervisor would have offered, but his wife just gave birth on Monday, so I told him no. There’s a pet store near my house, that I’ve talked about before. the owner was the guy who told me that my dog would be stolen from in front of the supermarket. Anyway, he has a chip reader and I wanted to see if Xena’s chip could be read with a standard, English reader and I wanted to get advice about kennels, so I went back to the shop with Xena.
The smell wasn’t very nice when I first went, but this time, it was like the air was soupy with it. The shop is full of birds and rodents and other small animals and a cat and there was a pungent mix of the smells of their food, their bedding, their fur and their feces. They also do dog grooming there, so there was a smell of wet dog and the hairs brown around my the hair dryers wafted through the shop (if only I was exaggerating). There were cases of vegetables on the ground, which I guess were for the rabbits, and clearly some forgotten ones, behind the overly stuffed shelves, had been left to rot. I imagined that a portal had opened to some foul layer of hell and stinking demons entered and left through this shop, whose smell would mask their comings and goings.
The shop guy didn’t have his chip reader with him. As for kennels, there were no good ones in Birmingham. I would get Xena back half starved, with open wounds, if I got her back at all. One of his customers got the wrong dog back. I would have to go at least 50 km out of town to find a decent kennel. I looked dumbfounded and he went on, saying that it was midterm break and all the kennels were already completely booked anyway. And I should give him a ring and make an appointment to get Xena’s chip read.
Right. I like to get all my distress out of the way in one go, so I went in the barber shop a few doors down and asked for a haircut. When I tried this in The Hague, I was refused service. In other places, it’s lead to huge arguments about appropriate haircuts. Etc etc. Well, England wins for least stress place to get a hair cut. They asked me to clarify, but no arguments at all. It just got cut. Alas, not quite as well as my Amsterdam barber, but quite a bit cheaper. The barber was indignant about the kennel situation. “We have animal welfare laws in this country!” she said. “No kennel would treat a dog like that! They would get shut down, maybe go to jail.” Her assistant wrote down some phone numbers from the yellow pages (“Do you have yellow pages in California?”) and later I called them and the first one had space and I booked it. Yay.
So when I got back, I finished up my svn conversion and all seemed well and it was time to write the music that I had due. I approached a high profile blogger about trading a commission for a plug and a banner ad and he said ok, and then my backup thing went totally wrong and I had to email him to ask for an extra week. Yikes. So I went to work on that. There’s a sports theme, so I recorded some football sounds from the TV and then layered them in a sort of interesting manners and then went to record some processed white noise. I thought it would be nice to have it start with very strongly resonant filterings and settle out into plain noise, which could be faded down to sound like crowd noise. This is still my plan, but the nice thing about hardware synths is that you never really know how it’s going to come out. This is why it’s fun.
My synth got kind of battered in the move (always tighten your bolts before shipping!), and this was my first time turning it on and, thank gods, it worked. So I set up my patch and tried to record it and got unfiltered noise. After a lot of head scratching, it became clear that the noise source was my mixer! Arg.
I took it apart and all the solder joints looked ok. I don’t know what I thought I could fix. I put it back together and reattached it and got the sound I was expecting. Yay. So I re-attached it to the computer and got nothing but noise again. Oh. Must be a software problem.
I went to download the manual for the Ardour, which is the mixing software that I use. (It’s free, and quite nice) and noticed both that the manual section I was looking for is not yet written (alas) and there’s a new version out with many improvements for mac users. (Huzzah.) The new version, though, didn’t like my version of Jack, which is an audio library that alot of free software uses. So I got the new version of jack and installed it and it wouldn’t run at all. And it completely blew away my old version. And then, slowly, I remembered that it had taken me over a week to figure out how to custom compile it last time so it would run on my machine. And I had never gotten around to doing the write up of what I changed to get it to work. oh crap.
That’s ok. I have other software. so I fired up Audacity, (which is also free software and very nice) and all it recorded was noise. ( . . . ) I tested my mixer again and it wasn’t working.
So a flaky mixer caused me to blow away my working software.
There’s no way I can finish this project without a mixer. So I have to buy a new one. In the mean time, I’ve missed the second deadline and created a mountain of work. This is not good.
What killed the mixer? It’s not surprising that it’s given up the ghost. It’s spent a lot of time bouncing around in a backpack and I plugged the american transformer into a step-down converter, which meant it was getting 50 Hz when it expected 60. Still, it functioned for 2 years in this manner. I’ve been having odd electrical problems recently. I go to sleep and leave things on (yeah, my carbon footprint, I know) and when I wake up, they’re inexplicably off. Still plugged in and switched on, but not getting electricity. Oh my god, the first time this happened was with my laptop. The battery had drained utterly and the power brick would not spit out juice. I thought the computer had died. But, unplugging and replugging fixes it every time so far. It’s hit my other computer, my speakers, my synths, a power bar (the light-up switch was not lit up). This is really weird. In other countries I’ve lived in, a plug in the wall means either that power is flowing or a fuse or breaker has gone. It doesn’t stop and wait to be replugged.
I think I need a UPS, which is expensive enough in the US. It’s going to cost a month’s rent here. They’re very useful in a studio, though. They suppress surges, they keep voltage steady in dips and brown outs, and, best of all, they tale a lot of noise out of the power and therefore make your gear actually sound better.
And I need to buy a new mixing board, which would be much, much cheaper in New York, where I’ll be on November 1, but stupid power differences and Britian’s odd obsession with grounded, fuse-containing plugs (hm, or not so odd after all), means that I should buy one in this country. Which is probably the most expensive place in all of Europe to buy electronics gear.
So, in summary, I have to spend a fortune housing my dog, replacing my mixer and getting a UPS. If I get my dog back, she’ll be wounded and half-dead. I totally blew it in a really high profile commission. My recording/mixing machine’s software is offline for the foreseeable future. My existing hardware is in danger. I have a meeting with my supervisor on wednesday and I’ve accomplished exactly nothing. Less than nothing, because before I had the potential of accomplishing something. But, to balance things, I don’t have to fight for haircuts. So it’s not all bad. Oh, and I’m moderating the livejournal feminist group again, which could go either way.
Still no social life, but my sanity is staying much more stable that I would have expected. So that’s good too. Really, things can only get better. Unless they don’t.

Securely Using a Macmini as a remote controlled audio workstation (or media center)

Let’s say you have a mac mini and a laptop and you’re too cheap and/or lazy to buy a screen, keyboard and mouse. You don’t need to! The answer lies with your laptop. It is possible to control a macmini (or any other type of mac) with another computer of nearly any variety. I happen to use a mac, but it is also possible with windows and linux.

VNC

To start off, you will need to borrow some peripherals, so you can do the initial setup. After you register and whatnot, You will want to setup VNC. This allows you access to the minimac’s desktop from your laptop. Open the minimac’s system preferences. Open sharing. Click the “Services” tab. Click the checkbox next to Apple Remote Desktop. After that, you want to set Access Privileges. This should open automatically the first time you turn remote desktop on, but if it doesn’t, click the “Access Privileges…” button.
On the left, you will see a list of users. Select yourself. On the right, you see a list of actions. If you want to allow remote control (which you do), select all of them. Below the line, there is a checkbox which says “VNC viewers may control screen with password:” Check that box and then give it a secure password. Click “ok”
You are back on the sharing – Services window. Check the box next to “Remote Login”. Ok, now click on the firewall tab to make sure your firewall is on. While you’re there, also give your computer a name that’s different from your laptop’s name then quit the user prefs.
Ok, now go to your laptop and get a VNC client. If your laptop is a mac, Chicken of the VNC is perhaps the most popular. It’s what I use. If you’re on another kind of computer, just search the internets to find a VNC client. Download and install to your laptop.

SSH Tunnelling

Ok, now it’s time to test this out. First, open a terminal on your laptop (/Applications/Utilities/Terminal.app). Then type:

sudo ssh -X username@macmini.local -L 5900/127.0.0.1/5900

(Use your username and the mane of your macmini.) It will prompt you for a password (and may quote Spiderman at you.). Type the password for your account on your laptop. (It may ask you if you’re sure you want to connect, etc. Yes, you’re sure.) Then it will ask you for a password again. Type the password for the account on your macmini. You should see a unix-type prompt. Hooray, you are logged into your macmini.
You are logged in securely, which is even better. Don’t dispair, the graphical connection is coming next, but first an optional, brief explanation of the command you just typed: Ssh is a secure way to connect with another computer. In this case, it’s also doing something called port mapping. This makes a secure connection between a port on your computer and a post on a remote computer. If you connect to that port on your local computer, it will actually, really form a secure connection with the remote port. What this means for you is that nobody can eavesdrop over your connection (an issue if you’re wireless). The reason you type sudo is because you need root privileges to tunnel on important ports.

Back to instructions

Ok, open Chicken of the VNC on your laptop. A login window will open and there will be a list of servers, hopefully with your macmini on the list. However, you are not going to click on it. Instead, click on the + button in the lower left. A new server name will come up. Type in something like “secure minimac”. On the right hand side, type in your password. Don’t change any of the other info. You want it to connect to localhost on the default port. You can tell it to remember the password if you feel like your laptop is not going to be “borrowed” by non-trusted people. Don’t click any other checkboxes. Click connect.
A window should open with a view of the screen of your minimac. If this doesn’t happen, try the following:

  1. Do you see the name of your mac in the list of servers? If not, make sure that you’ve turned on Apple Remote desktop on your minimac.
  2. Can you connect to the remote server directly, not via the secure connection? If so, you’ve got weird problems and will need to ask for help from somebody else, like your network administrator.
  3. If you cannot connect at all, the problem may be a firewall. Make sure that the firewall on your LAN allows connections on port 5900. You may need to talk with your network administrator.

Now that you have a window open onto the remote computer, try doing something. Start itunes. Play a tune! Your minimac can be a remote controlled media center. woot.

X Windows

I like free software. Therefore, I want to use Ardour, which is free. My minimac has a large, external disk. Therefore, I want to run it on the mini, but control it with my wimpier laptop. First, you must install X11, which comes on the operating system CD from Apple. Install it on your laptop AND on your macmini. Also, install the developer kit on both (or at least the mini). Then, install Ardour on the macmini.
Ok,you may have noticed that sometimes VNC has a bit of lag. Because Ardour is an Xwindows application, it’s possible to reduce the lag by not using VNC. Instead, you can tell it to run on the macmini and to display on your local machine. However, this requires a smidgen of additional effort.
Apple has a bunch of information on X. It’s a good thing to read if you’re having a problem or just want to understand what’s going on.
First, you need to tell your macmini what you’re up to. Go back to the terminal ssh connection that you made from the laptop to the macmini. (If you closed the connection, reopen it). Then cut and paste the following commands to the terminal window:

sed 's/#X11Forwarding no/X11Forwarding yes/' /etc/sshd_config > /tmp/sshd_config
sudo mv /tmp/sshd_config /etc/.
sudo chown root /etc/sshd_config

You will need to type the password for your account on the macmini. These commands tell the ssh daemon to allow X forwarding. You may need to restart the sshd (or, if you don’t know how to do that, just reboot the whole computer by typing “sudo shutdown -r now” (without the quotes)). It would also probably be a good idea to repair disk permissions at this time.
Now, reconnect to your computer, using the same ssh command above. The -X flag allows X forwarding. That one typed command enables all your secure communications! Open X-windows on your laptop. Type into the terminal connection to the minimac:

/usr/X11R6/bin/xeyes

If all is working, a pair of eyeballs should open on your laptop. If all is not working, you’re going to have to look at some apple documents to figure this out.

Remote Ardour

Ardour, by default,opens windows on the machine that launched it. This means that if you launch it on your macmini, you can control if via VNC right away. But this is not efficient. It’s better to close VNC and just use X for this process. There are a few ways to make this happen. The one I’m describing is not the best, but it does work (hopefully). Note that the following assumes that you put Ardour.app in /Applications. If you put it someplace else, you will have to modify the path below
On your macmini, type:

cd
mkdir bin
cd bin
cat > ardour
#/bin/sh -l

/Applications/Ardour.app/Contents/Resources/bin/exporter

type control-D. Then type:

cd
cat >> .profile

PATH=$PATH:$HOME/bin

export PATH

Type ctrl-d again. What you’ve done is create a tiny executable file that uses the right path to open Ardour and added that path to your shell. You could also do this with an alias.
Logout. (type “exit”). Then log back in (with the long ssh command way above). Open X-windows on your laptop. Type “ardour” (without the quotes) at the terminal prompt. A window should open on your local machine.
Hopefully this all will save somebody else a lot of time.