Cuemaster

My main client went into Administration last week, leaving me with very little work to do until I can find another contract, which is proving a little difficult.

This has, however, given me the chance to get on with writing Cuemaster. This is a Windows program that Trevor Learoyd recently bought the rights to. After looking over the code I decided it needed a complete rewrite, which I have almost completed.

Cuemaster is a program for handling playing sound files during theatre performances. The old version displayed 2 decks, each of which had a playlist of sound files, and various controls around them for handling volume, cross fading, auto fading etc. It could also play CDs. It displayed all of the controls in one fixed sized window, and this was the first thing that needed to be changed. Once I looked at the code I identified a number of problems, of which the two most serious were:
The code for the 2 decks was duplicated, with just the control names changed.
All the controls were on the main form, including things like labels on the volume controls, which is why it wasn’t resizable.

I started by splitting everything into separate controls, such as a control for a Deck and another for a Volume control. This obviously meant that I could create any number of decks, not just two. Where to put the volume controls for each deck (and the CD and the Master volumes) was then a bit of a problem, so I decided to split them out into a separate window, which the user could place anywhere convenient on the screen. It then became rather obvious that I should split out other controls that weren’t part of a deck into their own windows, such as the CD Player and cross fader.

At this point I began to find the way the old version handled playlists rather awkward, so I incorporated everything into a single XML Workspace file and an associated Tracks folder (for storing the sound files). Loading a workspace now sets up the decks and all the other controls as they were when the workspace was last saved, and it can be moved by copying just the workspace file and tracks folder to another machine.

One facility in the old version was track autofades. Up to two of these could be set up for each track, and fired off manually at any time the track was playing. There was also a button to set off one of these on each deck at the same time. This struck me as a bit specialised, and when I started thinking about a better UI for it I realised that what was really needed was the ability to write scripts.

So the new version has a complete scripting/automation system written into it. You can create any number of scripts, each of which contains any number of actions, such as cueing up a deck or CD on any track at any point, starting, stopping and pausing decks, firing off a cross fade, restoring the desktop, hiding and showing decks (you probably wouldn’t want more than 2 on display at any time, but might want to switch to a new set of decks/playlists for the next scene), changing volume controls with or without a fade, and many more. Every action can be delayed so that it starts some time after the script starts. Scripts can also have triggers added to them, so that they will run automatically when a particular point is reached on a track playing on a deck. So much of the action management is handled by an abstract base class that I can add new ones really quickly.

I’ve also added facilities for handling lights over DMX, but I haven’t got the gear to test that, so I don’t know whether it works yet. I also need to know a bit more about how lighting engineers configure their lights so I can make it as easy as possible for them to use.

I’m very chuffed with the way this program is turning out. I don’t think there’s anything much of the original code left now, and the way everything works internally is completely different. The only problem is that I keep thinking of new features to add to it. I’m thinking about adding a cue sheet to it now, so that the user can create and run scripts based on what’s happening on the stage. I’ll have to stop at some point, I suppose.