The Anthem Sequencer and TSE3 Libraries

Pete Goodliffe talks about the Anthem project, bringing usable MIDI sequencing to the Linux community.
m-station will be interviewing Pete in November. If you have any questions for Pete that you'd like answered in a public forum please email us.

Introduction
===========

The Linux and free software communities are currently enjoying rapid growth, quickly gaining in popularity. However, the music composition arena seems to lag somewhere behind this surge. In many ways this is quite normal, the musician community is much smaller than the hordes of desktop Linux users. However, we are beginning to see a critical mass of musical developers and users which is beginning to redress this balance.

There are now a number of projects devoted to bringing music composition tools to Linux (just have a quick glance at the multimedia section of sourceforge). However, they're all fairly immature, and many have not yet produced any useful code whatsoever.

There have always been audio editing tools of sorts for Linux, nothing that the average Windows user would find easy to use, though. And for a long time there have been MIDI sequencing packages - but again not up to the quality of the quality of the famous Windows sequencers.

So will we ever get there? Will any of these projects see fruition? The answer is yes - and in this article I'll describe one of our routes to the open source music paradise we seek.

The Anthem project
==================

One of the many new projects developing MIDI sequencing functionality is Anthem.

OK, so now a disclaimer - I'm the guy who's written Anthem. I hope you don't find that this article turns into a banal marketing speil, but is able to give you a clear overview of where this project is going. In fact, I'd like to see other sequencers than just Anthem appear on Linux - the competition and choice is what will encourage computer musicians to the Linux platform.

So what of Anthem?

The aim of the project is to create a fully-fledged and top quality MIDI sequencing studio with audio capabilities, that is capable of rivalling products found on any other platform. Those are lofty goals.

Any project can claim to be something it's not, and many do. So why should we believe that this will ever happen? The most important factor should surely be, what state is Anthem in now? In a nutshell:

That is to say, a lot of Anthem is there, but it's certainly not complete yet! So if the program's not finished, why should you care about it?

1. The code is there

Well, for a start, the code is not only written, but a lot of it is already being used in a number of other music projects (see below for the reasons why).

Secondly, one of the great things about the open source movement is the release early/release often mentality. You can go and download development versions of the Anthem sequencer and see how well it works, and feed back your comments about it.

2. The code is mature

The project is based on mature technology, with years of experience. A version of Anthem already exists. I wrote it. However, this original version is proprietary and closed source. It runs on the Acorn RISC OS platform. If you're really curious have a look at [1]

However, this is a new, completely rewritten, much improved version of this original program. Its full title is therefore: "Anthem Open Source Edition".

Experience is key - the main problems have already been identified and solved once. The ride is a lot smoother this time around. Of course, experience is no guarantee that the final program will materialise...

It will, though!

3. The project is well directed

Now here's the interesting techie clincher: the project has been split into two parts. In the past (both on Linux and other platforms) I've seen far too many MIDI sequencer projects started the wrong way round: from the top downwards.

You simply cannot write a GUI and then try to hack in a song structure and MIDI playback framework underneath. It doesn't fit. The program will never get off the ground. But you may end up with a nice looking set of windows.

In this project the actual driving-force sequencer engine part has been written first; with careful consideration to the GUI aspects of the project (drawing on my experience having done this once already) but without the straight jacket of the quick-hack GUI mentality.

The goal isn't so much to get a sequencer on your screen rapidly as to produce the best, most flexible, most powerful sequencer possible.

4. The project is being worked on The important thing to bear in mind about the Anthem project is that is is developing very quickly. In comparison to the vast majority of sequencing projects you can find out there, this one is being updated. Many projects have appeared to lie stagnant for many many months.

Other, older, sequencers are certainly functional now; but they still aren't developing so rapidly, and most Windows users would take one look at them a shudder. [2]

--

So Anthem comprises two main sections, the TSE3 library and the Anthem program. Both are released under the terms of the GNU public license. Both are written in C++. But what are they and what do they mean to the open source music community?

The TSE3 library
================

TSE3 is a third generation sequencer engine core. That is, it handles playback, and recording. It provides an advanced object-oriented song structure. It provides real-time effects (transpose, etc) and allows you to edit music on-the-fly. However, there is not a window in sight.

All the necessary functionality has been designed in from the start, where it needs to be thought out properly:

It was developed first, before any flashy GUI stuff. It's been under development for a year and a half already. It's been carefully tweaked and honed, and is now a very powerful and rounded library. It's easy to use, fully documented and suitable for programs as simple as a MIDI file player to a fully featured MIDI sequencer (which is, of course, why it was written).

The library is mature - it's based on the TSE2 library which was in use in the original Anthem. However, it has many many improvements over TSE2 and is a complete rewrite from scratch.

So what does TSE3 give us? Here's a simple (and not comprehensive) summary: