alphaTab development state

Hi everybody.

A few weeks ago our V-Server crashed an we lost all our of our data. Now I just recognized that an important announcement I made here, was missing in the backup I uploaded again. I think the post was called “The past and future of alphaTab”. It was an important announcement about the current development state of alphaTab and if I am even still working on it. I’ll try to reflect the post as good as I can.

What happened to alphaTab the last year?

The short answer is: alphaTab is still alive! The last year I was heavily occupied with other customer projects and my studies that’s why only a few and minor fixes were uploaded to the Github repository.

About one year ago I started a completely new version of alphaTab written from scratch. The very first version of alphaTab was heavily based on TuxGuitar, a great piece of software. During my work on this project I started to refactor and rewrite parts of alphaTab (like the render engine) but never got rid of some bad design choices and elements I simply don’t need for alphaTab. That’s one of the reasons why I decided to completely start a new code-base. Another thing is: License purposes. TuxGuitar is licensed under the GPL (General Public License) and therefore alphaTab is that as well. GPL isn’t quite a good choice for developing libraries and components. By creating a completely own written code-base I am able to change the license as I like.

a sneek peek to the new alphaTab backend

A main focus of the new alphaTab version is to allow easy feature extending and a cleaner application infrastructure. The old data model, rendering engine and audio generation were heavily dependent on each other. If you wanted to add new features you really had to worry about not to destroy any other module. Everything was quite strictly added to the system without the usage of a plug-able system. The new alphaTab is completely different, the new data model is more focused on the Guitar Pro 6 file format and is completely independent from the other parts like the rendering. You don’t have to worry about the rendering or audio if you just want to create a new file format importer.

The new render engine is heavily based on glyph positioning. The old alphaTab version did a straight forward drawing and layouting of the elements. It was quite a hard task to add new rendering elements because you needed to do a lot of checks to not destroy the complete layout. In the upcoming version you just add your glyph to the code-base and add it during the layout process. It will get positioned and rendered right where it should be.With only a few lines of code you can register your own effect glyphs and render them as you like.

The audio engine is one of the things which isn’t implemented yet. My plan is to heavily rely on technologies like HTML5 but there are still technological barriers which prevent me from creating a plain JavaScript audio engine for alphaTab. Audio synthesis is a heavy task (CPU and memory) and will prevent a lot of clients from having audio support. A first step is to move away from the Java Applet. While Flash seems to be dying in HTML5 times it’s still a better choice than a Java Applet. I am already working on a Haxe Midi Synthesizer and it’s working using generated waveforms (sine, square etc.). I still have some problems doing a correct wavetable synthesis using a SoundFont2 file.

When will “alphaTab V2″ be finished?

I can’t really tell when it will be completely finished but beside the audio part almost everything is done! Guitar Pro 3-6 files can be loaded and rendered. There are only a few elements missing like the rendering of tuplets and triplet-feels. Here is a small list of the stuff I’ll have to complete till a first “alpha” version will be released to the public.

  • Render the missing elements
    • Tuplets
    • Triplet-Feels
    • Finger-Indicators
    • Pick-Stroke
    • Rhythm Bars for Tablatures
    • Repeat Endings
  • Get to the old feature set
    • Several layout options
    • Sub-Song rendering (bar 5 to 10)
    • Bars-Per-Line
    • Multi-Voice rendering
    • Editor and Player Plugin
  • Midi Data Generation for the Java Applet (legacy audio till the new audio-engine is done)
  • Support for more platforms (at least JavaScript, C# and Java)
  • Create a end-user suitable package
  • Create a suitable Getting-Started documentation.


That’s one of the things I am worrying about a lot. It’s really hard to choose the correct license for a software even if you have a good idea of what you want to happen. Here is a small list of what the licensing of alphaTab will be:

  • The source code will be available and everybody will be able to contribute to the code base. All changes made to the code must be given back to alphaTab.
  • If you use alphaTab for private, open-source or free purposes you do not have to release the source code of your application. Short: If your application is free, alphaTab is free. The copyright notices and the “rendered by alphaTab” notice must not be removed.
  • If you want to remove the “rendered by alphaTab” notice (got a lot of requests for that) you’ll have to pay a license fee which grant’s you the removing of the notice.
  • Under circumstances you will be allowed to move the “rendered by alphaTab” notice from every alphaTab instance to a central about page of your software.
  • If you want to use alphaTab in a commercial application (you earn money using the application using alphaTab) you have to buy a commercial license.

So it will be likely a dual-license system. The main ideas behind this licensing scheme is: If your service is free, alphaTab is fre. If you earn money using alphaTab, you have to pay for alphaTab. Changes made to alphaTab have to be contributed back to alphaTab.

I hope I covered all important questions, otherwise feel free to ask.


Update: haXe to Java

Today happened a lot in trying to compile alphaTab to Java. Cauê has commited a small change which fixed the bug I encountered. A this time I was able to create a non-error Java build of alphaTab. On this base I was able to create the platform abstraction implementation for Java and to setup a small dummy UI.

Too bad that alphaTab is not running yet.

At this part I encountered a lot of exceptions. I was able to fix two of those minor bugs by changing the generated code. But after that: Still a lot of weird exceptions (NullPointerExceptions, infinite loops, ArrayIndexOutOfBoundException,…).

At least it seems that simple GuitarPro files can already be loaded into the song model. But the layout- and render engine are still producing some errors.

For today it’s way too late to dig deeper into the error causes. We will see what the next days will bring.

Compile haXe to Java

A few days ago Cauê Waneck (@cwaneck) contact me if I am interested into testing his new haXe targets. Cauê was working on C# and Java targets quite a long time in order to provide one of the most requested haXe targets.

What is haXe?

Maybe some of you are wondering now: What is haXe?

For me it’s one of the most awesome languages and platforms I ever used.

haXe Logo

On the haXe website it is described like this:

haXe (pronounced as hex) is an open source programming language

While most other languages are bound to their own platform (Java to the JVM, C# to .Net, ActionScript to the Flash Player), haXe is a multiplatform language.

It means that you can use haXe to target the following platforms :

  • Javascript : You can compile a haXe program to a single .js file. You can access the typed browser DOM APIs with autocompletion support, and all the dependencies will be resolved at compilation time.
  • Flash : You can compile a haXe program to a .swf file. haXe is compatible with Flash Players 6 to 11. haXe offers very good performance andlanguage features to develop Flash content.
  • NekoVM : You can compile a haXe program to NekoVM bytecode. This can be used for server-side programming such as dynamic webpages (using mod_neko for Apache) and also for command-line or desktop applications, since NekoVM can be embedded and extended with some other DLL.
  • PHP : You can compile a haXe program to .php files. This will enable you to use a high level strictly-typed language such as haXe while keeping full compatibility with your existing server platform and libraries.
  • C++ : You can generate C++ code from your haXe source code, with the required Makefiles. This is very useful for creating native applications. The NME library uses this to run haXe code on iOS, Android, etc.
  • C# and Java targets are coming soon! (from @cwaneck)

(, 12.04.2012)

In short this means: You write your application or game in haXe and using the haXe compiler you get the same source code written in JavaScript, Flash, PHP or C++.

The idea of MVC finds his best practice in a language like haXe. You create your application core in haXe and can compile you application library to the platform you need. On top of this you can create a desktop application, web application or whatever you desire.

Java and C# target

A lot of users were requesting a C# and Java target for haXe. It is quite obvious why: Nowadays they are two of the mostly used programming languages and especially in the modern times of SmartPhones and their apps, those targets are needed to target Android and Windows Phone 7. But also for creating desktop applications Java and C# are a major improvement.

Cauê asked me to help him with the core library implementation and if I can provide showcases for his talk on the WWX2012 (Worldwide HaXe 2012). One of my biggest hobby projects I am working on, is written in haXe: alphaTab

alphaTab combines my two major hobbies: programming and playing the guitar. alphaTab is a HTML5 music notation and guitar tablature rendering engine. And it’s written in haXe! I can write my application in an object oriented and typesafe environment, then compile it to JavaScript. alphaTab will use the HTML5 canvas to render the music notation.

Now using Cauê’s target I will try to compile alphaTab to Java and C#. I will probably not be able to create an Android application since I’m not familiar with Android programming yet, but I will try to create a Java Swing Desktop application based on the alphaTab code base I already have.

It seems there are currently only minor bugs in compiling the whole alphaTab source code to Java. One of the major things currently missing are the class definitions of Java which I need. To speed up the development (Cauê’s talk is already on Sunday) I will simply create the required abstraction classes in Java and refer to them using the external class feature of haXe. This way I only have to create two external class definitions of the two major platform abstraction classes needed for alphaTab (Canvas and File Loader).

As far I can see the Java target uses quite a lot of workarounds to support all the language features of haXe (Get this Oracle: An unpopular language like haXe has more and better language features than Java, one of the majorly used languages in the world). Those workarounds are necessary and quite well done. The source code resulting by the target should be usable from non a haXe environment without major problems.

I hope I will be able to create a working Java alphaTab version till Saturday. For now the way how inline functions are generated prevents me from compiling a stable alphaTab version.

Blank WordPress Theme for Development

I am always encountering the same problem when I create new WordPress theme: How to start?

The problem is that WordPress only ships with the default themes twentyten and twentyeleven. But both of them are not very suitable for creating own themes from scratch. They have a lot of features enabled that you might not have in your own theme.

The solutions are called: Blank/Naked WordPress Themes.

Speckyboy has created a quite nice list of those themes. Simply choose the one most suitable for you and use it as a base.

I will use Starkers HTML5 theme. It is the most modern blank theme I found in the list. It uses HTML5, CSS3 and Modernizer, the CSS files include nice comments assisting your development.

Starkers HTML5 on Github:


New Blog – Again

I think it is the 1000st blog I created to post my stuff on. I never managed to maintain the site like I wanted to.

My idea of CoderLine was to create some kind of website where I publish my projects, tutorials and stuff like that. This time I want CoderLine to be my personal blog about software development where I can post my results about my projects and what I am currently working on. Basically: One more blog of a software developer in the millions already existing. ;)

I am not targeting to get a lot of blog followers or stuff like that. Rather I’d like to be one of the search results providing problem solutions for people searching for software development problems.

Currently there is only the default WordPress theme till I have implemented my own new design I created today.

New CoderLine design.

It is a more clean and simple remake of my old design and is more focused on writing simple blog posts, not more.