Categories
Uncategorized

Documentation, and how balanced audio cables work.

I finally had a bit more time this morning to write a bit more in the A/V manual.  There’s lots of bits and pieces of documentation on board, but no comprehensive single getting started manual.  So I’m writing one, bring together bits and pieces from all over the place, sorting out what documentation there is, updating schematics, etc.

Anyway, here’s the rough version on the article I just wrote about how balanced sound cables work.  It’s pretty much my standard explanation of Balanced Audio, and aimed at people coming to A/V from a non-techy musical background, rather than for Electronics Engineers.
You may find it interesting.  Then again, you may not.

—–


Sound is basically vibrations in the air.
TODO: more details, pingpong ball analogy? 

Inside an (SM57) Microphone head.
That is the bit of plastic and the coils!

This translates really easily into an analogue electrical signal: you simply turn the air vibrations into voltage vibrations.  A Dynamic microphone does this by having a small bit of paper (or plastic) which vibrates with the air around it, and pushes against a very small copper coil which, moving inside a magnetic coil itself, generates a very-very-very small amount of electrical current.

 TODO: more pictures.
This gets dumped down a wire, which gets amplified by (you guessed it) an amplifier into a very big amount of electrical current, which then drives a big electromagnet inside a speaker, which pushes another copper coil around, which is attached to another big bit of paper (the speaker cone), which causes the air around the speaker to vibrate – with the same vibrations that the microphone vibrated with, just bigger.
Simple, isn’t it? (well. Kind of.)

Balanced Audio Cabling

The trouble with simply dumping an audio signal down a cable, and picking it up at the other end is that your signal line, and return (usually ground) will pick up noise (say from A/C mains electricity, fluorescent lights, dimmers, mobile phones, etc)  along the way.

Here’s an original signal:


And here’s some noise:

 

 And the result:

This is a Bad Thing™.
So some clever engineers, back in the deep recesses of time figured out the following:  You could take a signal, and before sending down the wire where it could pick up noise, invert it:

If we add the signal to the inverse, you get a grand result of nothing (e.g. -3 + 3 = 0).
Now, if we throw these two signals down a pair of very similar cables twisted round and round each other like crazy, then they’ll both pick up noise pretty much the same as each other:


Note that 3 (the original) + 1 noise = 4,
while -3 (the inverse) + 1 noise = -2. NOT -4!
This is really cool, because if we add these two signals together, we don’t get 0 anymore, we get no original signal, but you do get the noise (doubled).

 

So we’ll use our amazing maths skills again, and divide this doubled noise in half. (2/2 = 1).

And we can subtract this 1 noise from the noisy original signal (4-1=3)

Voila! The original clean signal is back again.

  This is (roughly speaking) how balanced audio works.  And since almost all professional audio equipment runs with balanced circuitry, all we need to do is make sure the cables are in good shape, and then everything works magically with hardly any noise.

This is why for balanced cables (XLR/Mic, or TRS jack) you have 3 pins: +, -, and ground.  The ground is connected to a wire-mesh sheath around the other two, to try and keep as much noise away as possible.
(Technically, you don’t need to invert the signal, you could just use an empty zero, but for various impedance, op-amp, techy reasons, it works better if you do.)
Sometimes the ground wire will pick up noise itself, or due to being connected to different grounds at both ends of the circuit (say a piano on stage, and the A/V room sound desk) it will end up with a bit of random leaked current running down itself.  This can show up as noise, so you often use a Ground-Lift switch to disconnect the ground at one end or the other, which can sometimes help.
A DI box takes an unbalanced signal, and turns it into a balanced one, which means you can send a signal a long way without noise.
Remember how the two wires have to be twisted together like crazy?  This is so that if there is some noisy thing (like a flurescent light) nearby, both wires will be equally effected.  This is so important, that for broadcast audio, sometimes cables with 4 or more wires are used.  The + signal on 1 & 3, the – signal on 2 and 4, and then all of these are twisted together.  There are brand names of these cables such as QuadStar, etc.  Usually this is somewhat overkill for regular live sound though, as the cabling is much stiffer and harder to use day to day.

——–
So, what do you think?
Categories
Uncategorized

A random side story.

HK-SITREP-042.2013.01.10:

An individual with an extremely large head has been seen, dressed in a captains uniform walking around the vicinity of the Hong Kong International Airport.  He seems reasonably calm, although the fixed smile on his face is somewhat disturbing.  We believe he is waiting for some one, or ones, to arrive from destinations unknown.

Please advise.

Plenty of people coming off the plane were very confused.  Still, pretty fun for us.  I was the one with the camera, not the one in the suit, in case you’re wondering.
I think we may have slightly freaked out the bus driver on the way as well…

(Yes, we were picking up friends from the airport.  No, they didn’t know we were going to bring the Captain.  Yes, it was funny.)

Categories
Uncategorized

So we’ve been on board the Logos Hope for just over a week now.

Kind of hard to believe.  I really should have blogged earlier, saying we’ve arrived, etc.

As well as jet-lag, I picked up a cold, I guess on the plane, so have been totally energyless and wanting to just crash in the evenings rather than do something productive like write.

Sorry.

Anyway.  Logos Hope is a much bigger ship than Doulos.  I’ll try an post comparison pictures at some point.

The A/V systems on board are also quite a bit more complex and bigger.  Similar concepts, and designed by OMNIvision guys, so using equipment I’m either familiar with, or familiar with cousins of.  (I’d never mixed with an LS9, for instance, which is the digital sound desk they have on board – but I know the O1V96, which is kind of similar, and other digital sound desks).

So, we hadn’t quite realised that the ship is still in ‘drydock’ mode, so not really open to the public, wooden boards and paper over much of the carpeting, etc.

The Hope Theatre, the amazing on board venue which they have (*so* much bigger and cooler than Doulos tiny ‘Main Lounge’ had been converted into a mess for the deckies and engine guys, as well as workshop, storage area, dressing room, and general chaos zone. 

Because the Dry-dock had been extended so many times, and they’d thought that initially it would be very short, much of the equipment (lights, sound desk, projectors, etc) didn’t get taken down and covered properly pre-drydock.  So one job we’ve been doing over the last week is cleaning out the lights and projectors as much as we can, and covering them all with plastic bags so that during the cleaning of the rest of the theatre they don’t get any more dusty and dirty.

(We expect a lot more dust to come up when they lift up the floor covering boards and clean up the mess).

It’s pretty funny, seeing so many little bits of Doulos scattered around, like this ‘world’ guitar.

A lot of the equipment is slightly damaged, or very confused.

Like these poor headphones.  A lot of the settings of equipment are set to really weird settings, some of which seem to have been reset to factory settings.  Apparently over drydock a lot of equipment has been un airconditioned for 6 months or so, some of which has been off for that long, some of which has actually been used in that humid dirty state.  I guess that accounts for some of it.

But there are also jobs which have been listed as ‘fixed’ by the previous A/V manager but are obviously done wrong.  It’s kind of irritating.  Apparently there has been very little hand over between managers for a while.  Very little sensible training, and huge amounts of knowledge have been lost.

There really is a vast ammount of work to be done, just to get the systems operational and ready for normal ministry again.  Let alone the teaching side of things.

None of the A/V team really have a lot of experience with running A/V systems, or any theoretical background in what equipment does, or how ‘good’ A/V should look.

They do a lot of stuff by ‘if you press this button, it should work’.  Without really understanding what the button does, or why, or how to trouble shoot it if it doesn’t.

There is one guy who does know a bit more about it all, he’s been on break for a while so I only just met him last night.  He’s been the one basically running stuff for the last few months, but he doesn’t have a huge amount of experience either, (although has been doing an amazing job managing to keep anything going at all).

The team is great though, and really excited to learn more and understand it.

Anyway.  I’ll post more updates later.

Categories
Uncategorized

Déjà vu

So Becky and I have been trying to go back to the ship for a while now.

Not the Doulos, but the Logos Hope.

Somehow, I just don’t seem to have got it out of our blood yet.

We though about going out late January time, perhaps flying with the new recruits from the January Conference.

So, the Déjà vu thing…

We spoke to some people in August at the GO conference, sent some emails around, waited a bit.

Waited some more.  As one does.

Anyway, we got an email last week from our friend Mark, who’s one of the big manager types.

“I’ve spoken to the guys on board. I don’t suppose you could come at the end of the month, could you? I know it’s a bit short notice…”

!!

(Those previous two exclamation points without corresponding lexical complication are in fact, grammatically correct. ‘Self-explanatory punctuation’ I call it.)

 So it looks like we may be back on board in 3 weeks!  Quite exciting, and a perfect excuse to start up this blog again.

Why the ‘deja vu’ comment? Well, it seems awfully reminiscent of my first short term ship back in 2005.  Feel free to find the archive entries if you wish!

The Logos Hope is just coming out of a very long (9 months odd) layup/drydock, and so they’d really like a couple of extra pairs of hands to help in the programmes/events/Audio-Visual stuff sooner rather than later.

More details to come later. 🙂

Categories
Uncategorized

Duel Booting, mapping UIDs for different filesystems

I’m dual booting Debian & OSX on my work machine.

In OSX, users are created starting with UIDs 1000.  So the admin user is 502, I’m 501, and so on.  Also, the ‘staff’ group ID is 20.

On Debian, users are created starting with UIDs 1000.  So I’m 1000, my testing blank account is 1001, and so on.  The ‘staff’ group ID is 50.

This is a bit of a problem when I want to share files.  Since it’s just me on the computer,
technically I could just mount the drive with full read/write permission to me.  But I don’t want that.  I don’t want to be able to muck around with stuff outside my /home (or /Users/) directory without really trying hard.

The way to do it is using FUSE and bindfs.

Debian squeeze comes with FUSE installed, and has bindfs, but the version of bindfs that comes in the repo wasn’t up to date enough, so you may need to compile your own.

sudo aptitude install bindfs libfuse-dev

 Download, compile and install a new bindfs:

http://code.google.com/p/bindfs/

tar -zxvf whicheverfileversion.tar.gz
cd whicheverfileversion
./configure
make
sudo make install


Should now leave you with an up to date /usr/local/bin/bindfs
  
For the sake of example, I’ll show my set up.  /media/OSX is the original.

sudo /usr/local/bin/bindfs –map=501/1000:@20/@50 OSX OSX

Sweet! It works!

There will be quite a big performance hit from using bindfs.  Some benchmarks (linked from the bindfs page) reckon about 80%.  Not a problem for me here, since it’s fast enough.  But to be aware of.

Here’s a script which I put in /etc/init.d/osxfixperms.sh to run this on bootup.

#! /bin/sh
### BEGIN INIT INFO
# Provides:          osxfixperms 
# Required-Start:    fuse
# Required-Stop:
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: remount OSX drive with correct permissions.
# Description:
### END INIT INFO
do_start() {
    /usr/local/bin/bindfs –map=501/1000:@20/@50 /media/OSX /media/OSX
}
case “$1” in
  start|””)
    do_start
    ;;
  restart|reload|force-reload)
    echo “Error: argument ‘$1’ not supported” >&2
    exit 3
    ;;
  stop)
    umount /media/OSX
    ;;
  *)
    echo “Usage: osxfixperms.sh [start|stop]” >&2
    exit 3
    ;;
esac
:

Which I’ve then installed (on debian) with (as root)

update-rc.d osxfixperms.sh defaults

You’ll need to be mounting the OSX drive *BEFORE* this happens.  Generally, that means stuffing it in /etc/fstab in the appropriate way.  You can ask google / debian docs.  It’s fairly well documented.  Unlike using bindfs.

There.
Easy. (ish).

Categories
Uncategorized

SQLite dates and Django

I was getting very confused with my django DB quite happily setting the date in SQLite, but displaying a ” when loading it back from SQLite.

The SQLite field was a DATETIME, and in Django a ‘DateField, which I would have thought should work.

Alas, no.

Apparently the SQLite field must be a varchar(20) (or similar) for a date w/o time.

Strange.

Categories
Uncategorized

Python string concatination speed

I made a quick python script to convert OpenLP song (lyric) databases into the presentation format used by ProPresenter.

https://github.com/danthedeckie/OpenLP-To-ProPresenter5-Converter

is the link.  I put it together in a few hours, it should have been quicker, but I’m still re-acquainting myself with python.

It is a nice language.

One thing I did today, while cleaning up a bit, was wonder about something I remember from doing python years ago – string concatenation.  Joining two strings (texts) together.

“Hello” + “World” -> “HelloWorld”

I remembered something about it being slow, and python recommending using

”.join((“Hello”, “World”))

which seems to me one of the most blatently ugly obscure gotchas I’ve come across in a long while.

Anyway, I refactored my code into that style – converting databases and song lyrics and writing XML stuff is pretty much all Text formatting and concatination.

It made no discernable difference.  So I went back to normal easier to read x += y, and x = y + z type of code.

Categories
Uncategorized

Python string concatination speed

I made a quick python script to convert OpenLP song (lyric) databases into the presentation format used by ProPresenter.

https://github.com/danthedeckie/OpenLP-To-ProPresenter5-Converter

is the link.  I put it together in a few hours, it should have been quicker, but I’m still re-acquainting myself with python.

It is a nice language.

One thing I did today, while cleaning up a bit, was wonder about something I remember from doing python years ago – string concatenation.  Joining two strings (texts) together.

“Hello” + “World” -> “HelloWorld”

I remembered something about it being slow, and python recommending using

”.join((“Hello”, “World”))

which seems to me one of the most blatently ugly obscure gotchas I’ve come across in a long while.

Anyway, I refactored my code into that style – converting databases and song lyrics and writing XML stuff is pretty much all Text formatting and concatination.

It made no discernable difference.  So I went back to normal easier to read x += y, and x = y + z type of code.

Categories
Uncategorized

2 weeks in Cyprus

So Becky and I came over to Cyprus for a couple of weeks.  The last time we visited was almost 2 years ago, so this is our first time here as a married couple.

It’s relaxing, and interesting, and fun, and weird being back in Cyprus.  A few things have changed, many people come and go, which is usual…

We’ve been catching up with loads of people from the local church (various congregations), been sailing with my dad twice, been to a performance at theatre antidote, looked at their lighting system and helped look at the audio stuff they have, played loads of Settlers of Catan & Ticket to Ride with my parents and their usual Catan-Cronies (hi guys! Hope you like your new title…), we visited Nicosia, and went across (briefly) to the North, spent time with the cats (me being somewhat cat-starved), went for walks by the salt-lake, I bought a Cyprus coffee maker, and some other bits of (tasteful) Cypriotness.  Partly because I like Cyprus coffee, and partly because I hope we’ll be heading back towards the ship(s) at some point, and would like to have some stuff from the country to show people.

I can’t figure out how to make the webcam take pictures (I’m writing on mum’s chromebook) so you’ll just have to wait for photos of the coffee maker.

Anyway. (I can’t write a blogpost without at least one paragraph starting with ‘Anyway’.) We’re off to the UK again in a couple days, which will be odd again.

As I mentioned, briefly, we are looking at heading back towards the ship(s) at some point.  Probably for a few months at the end of the year, if we can, and see if maybe we should be going out there for a few years again at some point – when, we don’t know.

I’m looking forward to seeing our friends in the UK again soon,  but not really looking forward to the weather, or work, to be honest.  Seeing live theatre stuff again… I miss it a lot.  And being at sea, even if it is on a little boat.  And warm weather, even if not that warm.    OMNIvision is doing some cool stuff, and the team is amazing, and I’m glad to be part of it.  But documentary-type video production, media-engineering and web development are kind of interesting, but not really exciting any more for me.

Thinking that next week I’ll probably be fixing broken mic cables and fighting stupid Internet Explorer broken-ness makes me very gloomy.

Still.  I’m in Cyprus now, spent the day sailing with my wife, my dad, currently I have a cat purring on my lap, about to play a game of Settlers, and go out for a meal this evening with some old friends, so, I really shouldn’t complain!  This has been a really good fortnight.

Categories
Uncategorized

2 weeks in Cyprus

So Becky and I came over to Cyprus for a couple of weeks.  The last time we visited was almost 2 years ago, so this is our first time here as a married couple.

It’s relaxing, and interesting, and fun, and weird being back in Cyprus.  A few things have changed, many people come and go, which is usual…

We’ve been catching up with loads of people from the local church (various congregations), been sailing with my dad twice, been to a performance at theatre antidote, looked at their lighting system and helped look at the audio stuff they have, played loads of Settlers of Catan & Ticket to Ride with my parents and their usual Catan-Cronies (hi guys! Hope you like your new title…), we visited Nicosia, and went across (briefly) to the North, spent time with the cats (me being somewhat cat-starved), went for walks by the salt-lake, I bought a Cyprus coffee maker, and some other bits of (tasteful) Cypriotness.  Partly because I like Cyprus coffee, and partly because I hope we’ll be heading back towards the ship(s) at some point, and would like to have some stuff from the country to show people.

I can’t figure out how to make the webcam take pictures (I’m writing on mum’s chromebook) so you’ll just have to wait for photos of the coffee maker.

Anyway. (I can’t write a blogpost without at least one paragraph starting with ‘Anyway’.) We’re off to the UK again in a couple days, which will be odd again.

As I mentioned, briefly, we are looking at heading back towards the ship(s) at some point.  Probably for a few months at the end of the year, if we can, and see if maybe we should be going out there for a few years again at some point – when, we don’t know.

I’m looking forward to seeing our friends in the UK again soon,  but not really looking forward to the weather, or work, to be honest.  Seeing live theatre stuff again… I miss it a lot.  And being at sea, even if it is on a little boat.  And warm weather, even if not that warm.    OMNIvision is doing some cool stuff, and the team is amazing, and I’m glad to be part of it.  But documentary-type video production, media-engineering and web development are kind of interesting, but not really exciting any more for me.

Thinking that next week I’ll probably be fixing broken mic cables and fighting stupid Internet Explorer broken-ness makes me very gloomy.

Still.  I’m in Cyprus now, spent the day sailing with my wife, my dad, currently I have a cat purring on my lap, about to play a game of Settlers, and go out for a meal this evening with some old friends, so, I really shouldn’t complain!  This has been a really good fortnight.