Monday, December 11, 2017

Into the labyrinth of remembered music

Some music never leaves you. In the late 70's or very early 80's there was a television advertisement featuring an offshore oil drilling platform. I think it was for BHP or Esso. I don't remember much about it but that the music went something like this (mp3). It stayed with me and I wrote something that used those elements, which is what you hear in the clip.

The music is played in the Dorian mode. That mode was used again in a television show I watched on ABC Television in the eighties and again it stuck with me. I found it in my head last night and finally decided to try to find it.

I seemed to recall that it was written by a Carl, maybe Carl Davis or Carl Vine, but that search returned fruitless. So I dredged up what I could remember and tried:
"1980s English tv series children underground magic kingdom"
Success! It was a series called Into the Labyrinth about three children who travel through time searching for a magical object called "The Nidus" and the music was composed by Sidney Sagar.

Several episodes are available on YouTube.



Now, what I remembered of the music (mp3) is a little different to the actual segment from Sidney Sagar's score (mp3), though it is better developed towards the end of this clip:


I found a few other television shows from my childhood on YouTube. Children of the Dog Star was another whose music has stayed with me.


Such cheesy Amiga graphics from New Zealand! Also from the same New Zealand team was Under the Mountain with the scary Wilberforces.


Finally, Chocky, whose music I had forgotten.


Some of my childhood series, like The Goodies and Monkey Magic, I've managed to share with my son. And some shows from my childhood continue to this day, such as Doctor Who and, on the big screen, Star Wars (the Last Jedi will be released this week). Their music has made a huge impact on my life - witness all the concerts I've attended! But listening back to some of these other shows it's interesting how epic the music is remembered in your mind, but how cheesy it often sounds when listened to in the actual show. Into the Labyrinth was filmed in Cheddar!

Thursday, November 16, 2017

Bare Conductive Arduino MP3 Player

I found the Bare Conductive Touch Board Starter Kit while searching for activities to do with my almost nine year old son over the school holidays. It contains a custom Arduino board with a built in microSD card reader and audio output along with twelve electrode that can be used for touch or proximity sensor input. There is also a jar and tube of black conductive paint, a brush for painting them on alligator clip wires and adhesives, stencils and cardboard cutouts for designing the sensors. A 128 MB microSD card, USB card reader and portable speaker round out the collection.

The idea is that you either paint on the sensors or clip the wires to metallic objects so that when touched it triggers the playing an MP3 track.

It turned out to be a bit too complicated for a 9 year old, but my son likes to fall asleep and wake up to music and I had the idea that I would use the kit to make an interesting MP3 player on Alex's bedhead.

The first thing was to program the Arduino board, something I was now familiar with after the ticket gate project. The code examples provided were only for the triggering of single tracks, whereas I wanted proper player navigation. This included the ability to:

  • Stop, play, pause and skip tracks
  • Shuffle tracks
  • Change the volume
  • Play collections
By default the library used by the code only plays files named in the format TRACKxxx.mp3, where each x is a number 0 to 9. I did see some code for alternative names, but couldn't get it to work so I stuck with that format.

When the shuffle mode is selected random tracks are picked. Each played track is added to a list which is scanned to ensure that it is not repeated. Skipping a track forwards or backwards only moves to the next number and doesn't use random selection.

For playing collections I made a subdirectory, in my case called sleep and placed the relevant tracks in there. I also swapped the 128 MB microSD card for an 2 GB card I'd got with an old phone. This is the largest size supported by the FAT16 library. 

The code, listed at the bottom of the post, is memory intensive and occasionally locks, but it mostly seems to work.


The need to manually copy and rename tracks made the player impractical for use by my son, who also likes current pop. Instead a I got him a portable bluetooth speaker and an old mobile phone with Google Play Music installed.

Still, after all that effort I decided to get my player working anyway and painted up a pre-primed MDF board with the stencil, affixing the Arduino board and speaker at the bottom. Each silhouette corresponds to a control. It's not intuitive, but it is artistic and I might add to the design later. I like the look of the bare white, gold and black Arduino as well, a nice reminder of what is usually hidden inside the designs.


Wednesday, November 15, 2017

Raspberry Pi 5 inch and 3.5 inch touch screens

After making the Arduino ticket gate I've been inspired to play with some of the other "maker" offerings available. I recently purchased a Raspberry Pi 3 and Raspberry Pi Zero W to experiment with. That actually takes the Raspberry Pi in the house to three as I previously bought my son a Kano Computer, which also uses a Pi board.

The Raspberry Pi can be hooked up to a standard HDMI monitor, but I wanted to try something a bit smaller so I obtained an Adafruit 3.5" PiTFT Plus and a 5.0" HDMI touchscreen. The former came with a badly soldered header and I've yet to get it working. Its instructions are also woefully out of date and unsuitable for the current Raspbian Stretch version of the Linux OS. 

For both screens what you need is the LCD-Show code. However, if, like me, you installed Raspbian via NOOBS then you are likely to get a kernel panic after installing. Don't panic!

I found these instructions to be helpful, but in my case I needed to slightly modify the boot partition statement.

  1. You need to edit /boot/cmdline.txt on the SD card, either before your Pi reboots or using a second Linux machine (fortunately I had the other Raspberry Pi Zero and a MicroSD card reader to do this on).
  2. Replace root=/dev/mmcblk0p2 with root=/dev/mmcblk0p7
If editing on a second computer put the MicroSD back in the Pi's slot and reboot.

Everything should now work and you've now got a small Linux device. Not as small as my old Zaurus handheld PC's but a lot more hackable.

Size comparison between the Raspberry Pi with 5" screen and a standard mouse

Friday, October 06, 2017

Harry Potter and the Chamber of Secrets in Concert


I wonder if they intend performing concerts for all the Harry Potter movies. In April we attended the Philosopher's Stone, tonight it was The Chamber of Secrets. Next April, Prisoner of Azkaban, assuming that I can get tickets.

What do all three have in common? Well, apart from being Harry Potter movies, of course.

These were the three movies where the legendary John Williams composed the score.

Williams was rather busy during the production so his music was ably adapted and conducted by William Ross.

For this performance at the Sydney Opera House the Sydney Symphony Orchestra was conducted by the effervescent American Jeffrey Schindler. As with the previous concert he exhorted the audience to cheer at their favourite moments and actors, which they duly did.

The performance was great, though it was sometimes hard to concentrate on the music at times due to the distraction of the movie. Williams' action score really shines through during the live performances and this was no exception, though there was one point I wasn't sure if it was Quiddich or chasing Jango Fett on screen. Williams was busy at the time...

The Chamber of Secrets is Alex's favourite Harry Potter movie out of the first three (all he's seen) and he was rapt the entire time, despite the late hour.


Earlier he and I had caught the expensive lift up Sydney Tower. Though the views were good I've seen them a lot lately out the windows of planes and the large groups of tourists reminded me how much I hate being surrounded by tourists, even when I'm one myself.


I'm looking forward now to John Williams' best Harry Potter score in the Prisoner of Azkaban. Hope I can get good tickets!

Wednesday, October 04, 2017

Arduino ticket gate - part 1

Alex is obsessed with automatic ticket gates and desperately wants one to play with in the house. Don't ask me why.

The mechanisms in automatic paper ticket gates are extraordinarily complicated and not something I could hope or want to recreate at home. However, modern gates tend to use RFID stored value cards to trigger them.

Using parts from an Arduino education kit along with an RFID module I bought at Jaycar I was able to build a simple system that triggers a servo motor when an RFID card is tapped on the sensor. It also changes the red LED to the green and plays a sound. I put a delay in to "hold the gate open".




The cheap RFID module seems a bit dodgy and the system often requires a few reboots to work. This is the first time I've soldered and used a circuit board in years. I haven't used the Arduino much either, just following a few of the examples given in the book. Still, I'm pretty pleased with the result!


Using the Arduino is so much easier than the electronics I did at uni and as a kid.

The next step is to put it in some housing and attach a "gate" to the servo. Going to get Alex's help to do that.

Sketch


/**
 * Ticket gate model
 * Detect RFID chip and trigger a servo
 */

#include  
#include
#include

#define SS_PIN 10
#define RST_PIN 9
#define GREEN_PIN 6
#define RED_PIN 7
#define PIEZO_PIN 8
#define SERVO_PIN 5

Servo gateServo;
int openTime = 5000;

MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance.

void setup() {
  Serial.begin(9600); // Initialize serial communications with the PC
  gateServo.attach(SERVO_PIN);
  gateServo.write(90);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(RED_PIN, OUTPUT);
  pinMode(PIEZO_PIN, OUTPUT);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(RED_PIN, HIGH);
  
  SPI.begin();      // Init SPI bus
  mfrc522.PCD_Init(); // Init MFRC522 card
}

void loop() {
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
  }

  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;
  }

  gateServo.write(180);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(RED_PIN, LOW);
  tone(PIEZO_PIN, 261, 100);
  delay(100);
  tone(PIEZO_PIN, 392, 200);
  delay(openTime);
  gateServo.write(90);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(RED_PIN, HIGH);
  mfrc522.PICC_HaltA();
}

Wednesday, September 06, 2017

Sun sets, but Oracle didn't predict it

Sun microsystems
Oracle has quietly shut down the remnants of Sun's Sparc processor and Solaris operating system lines. Both Sun and Oracle have made a huge impact on my life.

Back in 1992 I had my first encounter with Unix in a numerical mathematics course at the ANU. A number of our lessons were held in the university's computer labs housing Sun Sparc terminals. I marvelled at the huge high resolution greyscale CRT screens, opening terminals and text editors to edit and run Matlab scripts on the Solaris server. They looked so much nicer than the PCs and Macs we used elsewhere. Long before they were readily available for PCs these terminals used laser mice, though they required a special mouse mat to operate.

A year later, when I bought my first modem, I would connect into a Solaris Unix server via the terminal and access my email and play IRC. I met my wife over Solaris.

As a result of my Internet obsession I drifted into the role of web developer, eventually gaining employment at CSIRO's Australia Telescope National Facility managing their website. The site ran on a Solaris 2.6 server and for a time I even had a Sparc terminal to access it.

It was here that Oracle came into the picture. I built some web applications utilising the Oracle database, the only one available to me.

By this stage I was not a fan of either Solaris or Oracle (or 'Orrible as called by some). Much of the open internet ran on open source solutions like Linux and MySQL and, as expensive commercial products, the Oracle database and Solaris operating system often required custom compilations of libraries and custom rewrites of code. Our version of Solaris only supported 256 colours, meaning that images supplied by our users were often of too poor quality to use on the web.

A lot of time that could have been spent developing practical applications was instead wasted just wrangling the systems to work in the first place.

Eventually that job finished and I ended up writing PHP scripts on a Windows IIS box, which was a whole new set of pain.

Today I am still writing PHP, but running it on a Ubuntu Linux server, which is an extremely popular and well supported combination meaning that it's easy to find answers to problems online. But I haven't escaped Oracle, which acquired Sun in 2009, entirely. We use the very popular MySQL as our database and that was purchased by Oracle as well.

By all accounts the marriage between Sun and Oracle was not a happy one (it certainly wasn't on our servers) and I'm sad to see the disappearance of the former. Farewell!

Saturday, August 05, 2017

School dances and a cushion concert

Last night we finally had our first taste as parents of a combined schools performance when we attended the Sutherland Shire Schools Music Festival. Alex had joined the boy's hip hop group at school and they, along with a number of other schools, were performing dances at the festival.

Having seen the boys and senior girls performing the past few days at the local shopping centre and school open day I must say my expectations were low. Right from the start I was blown away by the talent and energy of many of the student dancers in a real performing environment.



It helps that they started with some John Williams music from Harry Potter. Though what was the idea playing the opening to Star Wars for a dance named "Borg" (and yes there were sound grabs of Locutus)? Obviously a proper education in scifi is lacking in our public schools!

Speaking of John Williams, I woke up this morning and spotted an Instagram advertisement for the Sydney Symphony Orchestra playing Star Wars live in concert early next year. A dream come true! I immediately snapped up some tickets.

The music continued with an afternoon concert today in Petersham Town Hall listening to The Metropolitan Orchestra performing music from movies and a couple of original compositions. This was a cushion concert for families, with patrons encouraged to bring rugs and cushions and sit on the floor up close to the orchestra. One of Alex's school friends joined us.

I'd heard the Metropolitan Orchestra perform the Doctor Who Symphonic Spectacular at the Sydney Opera House back in 2012 and was impressed with their professionalism. Being so familiar with film music as I am it is difficult for me to listen to it being played poorly.

No such problem here. The Metropolitan Orchestra were magnificent with a fantastic sound. Sitting up close we could feel every note, every percussion. More than that, they looked like they were having fun.

Every orchestra member was dressed up in some superhero or movie costume. There were Minions on Double Bass, Dorothy Vader on violin and Indiana Jones on the drums, to name just a few. All lead by their conductor, Princess Else, aka Sarah-Grace Williams.



They played Superman, the Raiders March, the Flying Theme from ET, Batman, Star Trek: The Motion Picture and a medley from Frozen. Of special note was the soloist in Gabriel's Oboe from The Mission. He played with exquisite precision, beautiful.

There were also premieres of two original compositions. The Vikings, composed and performed by one of the orchestra's French horn players was very easy to listen to and I could easily imagine it accompanying a television documentary on the warriors. Bedtime Stories was more classical in nature, with hints of Holst.

The concert ended with the Star Wars main theme, reminding me just how exciting next year will be.

Wednesday, May 17, 2017

Another car through the garden


It was about a quarter to eleven and we were just getting ready to sleep after watching some Highway Patrol repeats earlier in the night. Then we heard the sound of cars hooning around. Then a screech and a loud crash.

Not again.

Almost to the month, four years after a young drunk driver had crashed into the shrubs between our neighbour and us another driver had passed through the same space and crashed into our neighbour's house.

Along the way he demolished our letter box, hedge and most of the shrubs planted after the first incident, then down a retaining wall to land on top of our neighbour's trailer, his car just touching the lower brick wall of the house.


Fortunately the 23 year old driver was just shaken and the house survived unscathed but for a broken window and ruined flowerpots.

It could have been much worse. A couple of weeks ago another young driver in Illawong died after losing control of his car, rolling it and being flung out.

Our driver, from a house just down the street, was undoubtedly speeding in his Volkswagen Golf, as do many on this stretch of road. His brother had been just behind in his Alfa Romeo. Their specialist auto insurer Shannons was indicative of their likely revhead nature.

On the back of the car was an Apple computers sticker. Don't believe them when they say they don't crash.


A crowd of neighbours gathered around the accident. I called the police, but it was the tow trucks that arrived first, then the fire brigade, the cops and the ambulance. The freelance journalists. Then more tow trucks.




The police collected statements, the paramedics gave him a once over and presumably tested for alcohol and drugs. The fireman had little to do. For most of the time it was standing around watching the tow truck drivers attempt to haul the car back up the way it came.


By the way, don't trust any insurance advice tow truck drivers give. They just want your money. The emergency services, on the other hand, were great.

Gradually the crowds drifted away. The freelancers collared me for an interview on camera. I misstated some facts but it was way past midnight by now and I wasn't thinking straight.

The story actually featured on the Channel 9 and Channel 7 morning news, surprisingly.





So now we've got no letterbox, our beautiful hedge has been trimmed far more than I intended (granted it needed trimming) and a pair of lovely callistemon and lilli pilli shrubs is probably gone. Insurance won't pay for the garden and we are wondering if someday a car will plough into Alex's bedroom.


It's not just us. Apparently the house at the corner has had three cars in their yard and the are lamp posts and street signs suffering frequent damage. All because the idiots in this area (like most others) think they have the right to show off their non-existent driving "skills" and put everyone else in danger. I am tired of people bitching about speed limits in residential areas like this when the evidence is in - they aren't the great drivers they think they are.

They are murderous f'ing idiots.

Saturday, April 29, 2017

Harry Potter and the Philosopher's Stone in Concert


I think we just witnessed some real life Harry Potter magic in action with a flawless performance of the score by the Sydney Symphony Orchestra at the Opera House.

Wow!

Much as I enjoyed both the book and the movie, John Williams' score to Harry Potter and the Philosopher's Stone is not one that I frequently listen to. I suspect it is because it fits the movie so well and my life, unlike that of my eight year old son, is far from that of an 11 year old student wizard.

That should taken as a complement and not a criticism of the score and my favourite composer.

The magic of the score was unleashed from the moment that the film began and the orchestra played their first notes. Williams' music danced between delicate melodies to rich orchestral textures utilising the full orchestra. His score is such an important element of the movie that it was rarely overshadowed by the on-screen dialogue and action.

If there was one tiny criticism it's that it was almost impossible to hear the 15 minutes pre-concert featurette with composer interviews over the noise of entering patrons. The folk at the sound desk were too busy chatting and reading to notice until half way through.

American conductor Jeffrey Schindler engaged the audience and encouraged them to feel free to loudly celebrate the on-screen action and heroes. I don't know whether it was him or a shared love of Harry Potter but the orchestra were also at their very best performance wise. I heard no mistakes, especially from the brass section. Haven't heard the SSO play film music this well since their artistic director David Robertson conducted John Williams music back in 2014.

It was magic. Pure magic.

The Chamber of Secrets is coming out later this year. I hope Williams' score, his last of the series, to the Prisoner of Azkhaban will also be performed as it is by far my favourite (and favourite movie of the series too, if you must know).

Perhaps if I wave that wand we took to the concert...

Best not, it did belong to He-who-must-not-be-named...

Saturday, March 04, 2017

Jurassic Park in Concert with the MSO



I had no real intention of watching Jurassic Park at the cinema. I was a second year maths and physics student at the ANU and was busy trying to organise my presentation to the CSIRO Double Helix Science Club about fractals and chaos. I got a call from the Canberra Times to interview me about the presentation and the journalist asked me what I thought about Jeff Goldblum's character, a "chaotican".

Not having seen the movie I couldn't answer, so I resolved to see the Steven Spielberg film before my presentation.

I don't think I'll ever forget that moment in Jurassic Park where Alan Grant and Ellie Sattler see their first dinosaur. Like the characters on the screen my jaw dropped in amazement at the sight of these extinct giants brought to life on the big screen.

The scene was made even more special by John Williams' elegant background score, so I could not pass up the opportunity to relive that moment with a live orchestra. That meant a lightning trip down to Melbourne to hear the Melbourne Symphony Orchestra perform live in front of the movie at Hamer Hall.

The MSO is my favourite Australian orchestra and has always, in my experience, performed film music with enthusiasm and the utmost respect (unlike a certain other orchestra more local to me).

I have been to a number of these concerts now at the Sydney Opera House with the Sydney Symphony Orchestra playing to a screened movie. This was my first in Melbourne with the MSO, in fact my first visit to Hamer Hall. The venue was certainly more modern than its internationally famous northern cousin.


Media personality Myf Warhurst introduced the show, exhorting the audience to whoop and holler along to the movie. Then conductor Ben Northey took to the podium and the concert screening began.

If I was ever to create my own John Williams concert I would start with "Journey to the Island," beginning with a playful and adventurous music as they approach Isla Nublar by helicopter and then moving on to the elegant Jurassic Park theme as they catch their first sight of the dinosaurs.

I'm not a huge fan of screening the movie and dialogue at the same time as performing the music as I'm there for the latter. I can always watch the movie at home. But something I liked about this performance was that the music took priority over the dialogue, making it much easier to focus on.

There were some surprisingly long passages without any music and others where it consisted of frenetic action. These are often less enjoyable pieces to listen to at home, but it was thrilling to watch the percussion and strings go at it live.

I noticed the brass section made a few mistakes and it was a pity that a live choir wasn’t used, but overall the performances were very impressive.

Alex the eight year old complained that he was tired and wanted to go back to the hotel for much of the movie, but by the end of it he was transfixed. When they finished playing the final credits he was clapping as hard as anyone in the hall.

We had been warned there would be an encore and I was delighted (though not surprised) that it was the Flying theme from another Spielberg/Williams collaboration ET. When I was stuck living in Central Queensland the soundtrack, my favourite, always made me think of my home in Melbourne. To hear it played there was very special.

All in all I was very glad we made the long trip down from Sydney to this performance of Jurassic Park. Next up is Harry Potter with the SSO - should be no complaints from Alex about that one!

Tuesday, February 28, 2017

Clouds and red jackets

I woke this morning from a horrible nightmare where our team had been taken over by an extroverted marketing type whose idea of an introduction was to make us wear glittery red jackets and sing company songs. Uggh!

The day was filled with spectacular clouds as an offshore low sent huge cumulonimbus formations our way. I watched aircraft fly around these white and grey terrors which towered over the Sydney skyline.









All they needed was some thunder and lightning.

Late tonight, as I took the dog out, there were still clouds around the horizons. I saw a bright orange meteor fall relatively slowly down towards the west.



Eyes open in my dreams and reality. It's an amazing world!

Friday, January 06, 2017

Out of gas


The Summer school holidays are traditionally a quiet time at work when, with so many on leave, one can focus on those small personal projects that you never have a chance to do during the rest of the year. You take things a little slower and wind down after the usually hectic period leading up to Christmas.

I am fortunate enough to be able to work from home over the Summer holidays, allowing me to keep an eye on Alex whilst still doing work. The lack of a four hour daily transit to work and the need to worry about school lunches and homework means there are more hours in the day to both work and play.

That's the theory. So why am I so bloody knackered?

After dithering for most of the year a certain fracking (and I use that as an epithet) group demanded that we make their website for them by the end of January. And I am off on holidays for most of January.

I never wanted to do this site. We should be decarbonising, making this research redundant. Plus it's industry funded so they can pay for an external site and developer. It's not like energy companies pay their fair share of taxes.

The only consolation is that at least much of the research is focused on mitigation and preventing damage to the environment from the operations.

But they didn't listen to me. Nor did they employ people with web experience to manage the project. So not only do I have to develop the site, but I also have to handhold the authors. And I and the rest of the team already have a lot of work on my plate.

We have a new graphic designer replacing the one I worked with on last year's fantastic Utopia project. This new guy is perfect for the organisation as he has a tendency to overcomplicate everything. I try to use WordPress' inbuilt functionality and structure as much as possible, allowing users flexibility at the expense of centralised control. Simplicity and flexibility are my mottoes.

It's one reason why our WordPress sites are far more popular for authors than our Sitecore websites.

User flexibility and control is an anathema to corporate operations.

So I'm presented with the need for a large number of templates, custom post types and fields (using Advanced Custom Fields). And there's no time to argue because they've been approved and the graphic designer is off on leave. And our front end developer has only a short time available too.

Naturally a lot of the elements and styles don't fit into WordPress' default generated HTML. So that means things like custom menu walkers and archive pages.

I find I have to do almost no training to get users up to speed with vanilla WordPress but customisation means additional training and the people responsible are on leave.

There's no way I can do everything in time, no time to train a contractor up and get them permissions, so I tell them they'll only have a subset of pages available for the initial launch lose the fancy searches for now.

And I begin working flat out before and after Christmas. I give them some custom page types so the authors can start entering content while I work on listing pages. I solve problems and churn code out. What I did was petty awesome, even if I do say so myself. Not just reusing other people's themes and plugins like some commercial developers do (because my clients are "special needs" so virtually nothing works out of the box).

I'd like to work on this on the evenings and spend time during the day looking after Alex. But no, in come the phone calls. Sometimes every ten minutes or so. Help entering content, changes to be made to templates, the odd bug discovered. One day I counted to ten and was about to open the door on a hiding Alex playing a game of hide and seek when the phone rang. Again.

You see, when a manager or communicator signs off on something it means very little. They want changes. Limitations are unacceptable.

But I want to spend some time with my kid. The year is too busy and he grows up so fast that any time together is precious.

I finally made the site live today. More bugs/changes. Eventually, at 4 pm (and if you think that's skiing off early I'd had 10 minutes off for lunch), when I was supposed to go and pick up Alex from a friend's place another change request came in and I lost it. Privately. My head was so exhausted that I couldn’t cope with any more changes. I told them no. That any further changes ran the risk of further bugs. They apologised, said thank you, and I fixed the last known bug.

Then I found this floating in our swimming pool and fished him out...


Another giant bug fixed!


Popular Posts