Skip to content
Cyrille Bollu edited this page Mar 1, 2016 · 12 revisions

Introduction

There should be some documentation about LMMS' core architecture and concepts to help newcomers with some development skills to understand how it works.

This page is an attempt to aggregate the informations found.

BB tracks

Question:

From a song, you can get a list of tracks, and some of those tracks are of type track::BBTrack.

I can get a list of TCOs (track->getTCOs) and these are trackContentObjects. I've been confused because I thought TCOs were the "tracks within the BB track", meaning for example, a kick, snare and high hat. But they are actually blocks within the song editor. If I have three measures in the BBTTrack, I'll have three trackContentObjects when I debug.

I want to access the tracks (in my example they would be InstrumentTracks) that live within the BBTrack, and I want to do it from the BBTrack object that is returned from the Song.

Would someone give me a quick overview of the BB track architecture?

Answer:

All actual tracks of BB-tracks are located within BbTrackContainer (see bb_track_container.h/bb_track_container.cpp). Get all tracks via engine::getBBTrackContainer()->tracks(). Playing a certain BB track (i.e. all TCOs of the tracks inside at a certain position) is achieved via bbTrack::play(...).

BB track 0 = all TCOs (patterns) of the instrument tracks inside at position 0. BB track 1 = all patterns at position 1 and so on.. See bbTrackContainer::fixIncorrectPositions() for an illustration.

Linux audio architecture

Linux audio architecture today consists of three pieces: ALSA, PA and Jack.

ALSA is the low-level kernel implementation that provides support for all hardware devices. The hardware support there is as good or bad as all other hardware support on Linux - it varies. But that's not any kind of fundamental problem in Linux audio per se - it's just a problem of hardware vendors not caring about Linux, and as with any other hardware, it's up to the user to select hardware that is known to work well under Linux.

Both PA and Jack are higher-level architectures which use ALSA primarily as a backend. Their job is not to "replace" ALSA - they couldn't, because they can't work without a low-level backend that deals with the hardware directly. The job of ALSA is to abstract away the hardware so that other applications can use it. PA and Jack both have different purposes and fulfill different functions. None of them are meant as any kind of attempt at replacing each other.