Advanced Gtk+ Sequencer
====

The gsequencer binary provides you a user interface. It allows you to play,
capture and create music. There is a piano roll, automation and wave form
editor. It has machines for playing drum samples, Soundfont2 sound containers
and synthesizers. They usually can be connected to a MIDI input source
(instrument). All sources need to be connected to the sink provided by
AgsPanel, thus the properties dialog from machine's context menu is
responsible.

The engine is extensible by following plugin formats: LADSPA, DSSI, LV2,
VST3 and Audio Unit.

It has support for various audio backends like ALSA, Pulseaudio, JACK, OSSv4,
WASAPI and CoreAudio.

Copyright (C) 2005-2025 Joël Krähemann

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".

jkraehemann@gmail.com

It is recommended to have a realtime kernel in conjunction with ags in order
to do more computing expensive synthesis.

Please visit http://rt.wiki.kernel.org for more information.

Following site gives you advice in configuring ALSA

http://www.alsa-project.org/main/index.php/Low_latency_howto

You might want to disable systemd accounting.

https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html

systemd-run -p CPUAccounting=false -p MemoryAccounting=false -p TasksAccounting=false -p IOAccounting=false -p BlockIOAccounting=false --scope gsequencer

If you have pulseaudio running you might run `gsequencer` with pasuspender
like:

pasuspender -- gsequencer

Purpose
====

The Advanced Gtk+ Sequencer framework is related to audio computation by
representing it within a tree structure. It does various abstraction and the
base library can serve as fundament of any application.

libags provides an application context and a threaded tree. Which is
synchronized by hard-realtime fashion. In terms of deterministic dead-line.
Each tic of the used threads has to fulfill its work in order to proceed. The
file object might be used for light-weight composition or persistency.

libags-audio is built upon libags and provides a tree of audio signals. They
can be computed in parallel. One key feature is the nested recycling tree. It
allows to share audio data across channels. Further it avoids to wedge the
parallel tree. There is support for free plugin standards like LADPSA, DSSI
and Lv2. So it does give support to read or write MIDI data.

libags-gui is a standalone library providing additional Gtk+-4.0 widgets.

GSequencer is the main application providing a Gtk+-4.0 GUI. Allowing you to
edit or record notation. It is designed to be accessible you should be able to
control the entire application by keyboard. The frontend to AGS requires to add
machines by menubar and link them appropriately with properties dialog. It is
available of the context menu. Note you can't create any loops within the tree.

Build using mingw
====

To build on windows you need gnulib. First import some functions using gnulib
then compile with msys2.

git clone git://git.sv.gnu.org/gnulib.git
./gnulib/gnulib-tool --import langinfo regex signal-h sigaction strings sys_types memcpy lib-msvc-compat
autoreconf -fi
./configure --prefix=/mingw64 --disable-rt --enable-threads=windows --enable-w32api --disable-alsa --enable-alsa-compat --disable-pulse --disable-jack --enable-wasapi --disable-x11 --with-poppler
make -j8
make install

Build with VST3 support
====

To build gsequencer with VST3 support you need download and compile the VST3
SDK. Then you can set some env variables configure is aware of.

export CXXFLAGS="-include cstdio -include limits -std=gnu++20 -fpermissive"
export LIBAGS_VST3_RELEASE_TYPE="-DRELEASE"
export LIBAGS_VST3_CXXFLAGS="-I$HOME/github/VST_SDK/vst3sdk"
export LIBAGS_VST3_LIBDIR="-L$HOME/github/VST_SDK/build/lib"

./configure --prefix=/usr --enable-vst3
make -j8
sudo make install

When you have lost
====

Assumed you modify frequencies of threads, you may encounter "out-of-sync" this
is some sort of dead-lock. Thought, it would be possible to recover such but it
requires in depth knowledge of synchronization and its implications as well how
it is implemented with GSequencer.

Advanced Gtk+ Sequencer does tic-based parallelism to perform additions or
compute synths, filters and other procedural work. Only within the very same
tic can be used conditional locks.

There is a worker thread abstraction provided by the framework, which requires
a dedicated strategy to alter values of ports.

The application interface consumes messages provided by message delivery. Just
add the wanted message queue.

General Notes on Licensing
====

The Advanced Gtk+ Sequencer code base uses copyright year ranges for its
source files. There was much effort on implementing the API since 2005 as of to
day in year 2023. The source code was developed by Joël Krähemann and is the
copyright holder.

Notes on copyrighted files listed:

* AUTHORS (Copyright (C) 2005-2018 Joël Krähemann, permissive)
* COPYING (this is the GNU GPLv3+ license)
* COPYING.docs (this is the GNU FDL-1.3 license)
* COPYING.server (this is the GNU AGPL-3+ license)
* COPYING.stk-4.3 (this is the STK-3.3 license)
* ags_license_header (this is the GPLv3+ license header for *.c and *.h files)
