While several dsp libraries for creating synthesizers and effects are available, there aren't building blocks for developing sequencers. This Linux library is not currently recommended for production code, it just wants to show a way to create sequencers using simpler components, making it easier to debug and to adapt to new ideas.
Beatwise sequencer library (BWS) is a low level library that contains building blocks to develop audio/midi sequencers. It exports several objects. The main components are:
The transport handles the timing and works together with a tempo map. It sits in the audio thread and is responsible for splitting the audio buffer into shorter slices according to time events and markers. The user application doesn't fill the audio buffer at once, it fills the slices that the transport passes back to it.
Midi and audio players are not real players. They are queryable collections. A midi player contains midi clips (sets of note on/off events), the audio player contains time spans associated with audio clips.
Once a slice has to be filled, the user application queries the player for events that happen in the slice itself. It's responsibility of the application to send midi events to synths and to mix spans of audio file into the audio buffer.