Here we go...
I've been meaning to have a bash at writing some music software for a long while now (5 years is probably about right) but never got much further than making a beep. Now I'm going to do it.
I'll be learning and using the JACK Audio Connection Kit. Why? I'll tell you:
- JACK is an audio server - all we have to do is write a client to use it
- It's a connection kit - we don't need to do anything special to make our software share audio with other JACK apps.
- I've had a play with writing OSS and ALSA apps before, but JACK seems to have a much nicer API.
- Lots of cool stuff already uses JACK, and it would be nice if I could write something that would work with them
The first thing I did when I decided to bite the bullet and have a crack at this was to look for a nice introductory tutorial - something that would cover the basics and give me an idea of how all of this fit together. I couldn't find exactly what I wanted, and saw lots of posts suggesting that the way to learn was to look at the source code or the example clients and other JACK apps.
And I did. And then I realised that if I just documented my exploration, I'd end up with exactly the document that I was looking for. That's what you have here.
It's not perfect, it's not particularly advanced. It is, however, easy to follow and, I think, a good introduction to writing audio apps with JACK. I've tried to make sure there are no nasty habits to pick up and nothing too far from best practice.
The tutorial starts with a look at what's available and leads up to writing something that beeps. More will probably get written, later, but that will become a follow-on tutorial. If anyone has any suggestions for topics to cover (mixing seems to be something that people keep asking about), let me know. I'll be learning all of this stuff anyway, and if I can make it easier for the next person to learn, then I'll have done something worthwhile.
Send comments to firstname.lastname@example.org - good, bad, suggestions, flames, tell me how stupid I am, whatever.
The tutorial assumes that you can program - not necessarily brilliantly, but if pointers confuse you, for example, go and learn that first.
I'm also assuming that you have JACK installed and working. If that's not the case, go and have a look at the JACK page for info.