newsAdvanced Gtk+ Sequencer - News: Reduced latency of JACK

 
 
Latest News
GSequencer v3.6.x release goals posted by jkraehemann, Fri 31 Jul 2020 10:17:04 AM UTC - 0 replies
GSequencer v3.4.x release goals posted by jkraehemann, Thu 11 Jun 2020 06:58:14 PM UTC - 0 replies
GSequencer v3.3.x replaced all recalls by ags-fx engine posted by jkraehemann, Wed 20 May 2020 07:25:15 AM UTC - 0 replies
Refactor GSequencer's recalls - the ags-fx engine posted by jkraehemann, Sun 03 May 2020 12:08:19 AM UTC - 0 replies
GSequencer v3.3.x release goals posted by jkraehemann, Fri 17 Apr 2020 12:36:11 PM UTC - 0 replies
[Submit News]
[97 news in archive]

Reduced latency of JACK

Item posted by Joël Krähemann <jkraehemann> on Fri 22 Sep 2017 12:37:27 PM UTC.

Recently I have improved JACK Audio Connection Kit MIDI input and audio output. Without any notable increase of process load. Though prior load was less than 1 % with a very basic setup. The very same setup takes now 3 - 4 % load.

GSequencer's intermediate sync

Advanced Gtk+ Sequencer's AgsThread object has got a nice feature, you can do intermediate pre-/post-sync. While JACK does provide only one single callback, the libags-audio backend does a conditional lock during its call.

As the callback is invoked, the AgsSequencerThread gets signaled by it and copies the buffer in order to be processed a tic later. The audio processing tic computes your input of the instrument. One more tic later, AgsSoundcardThread signals the JACK callback.

In a continuing schema:


|                             The 3 tics occupied by JACK Audio Connection Kit Toolkit                              |
|-------------------------------------------------------------------------------------------------------------------|
| Tic 0                                | Tic 1                                | Tic 2                               |
|--------------------------------------|--------------------------------------|-------------------------------------|
| MIDI input of AgsSequencerThread     | Audio processing of AgsAudioLoop     | Audio output of AgsSoundcardThread  |
| * copy MIDI data to AgsAudio and     | * parallel computing of AgsRecycling | * copy data of internal ring-buffer |
|   AgsChannel recycling tree          |   tree                               |   to your audio hardware            |
|                                      | * provide audio data to AgsSoundcard |                                     |

GMainLoop integration

Yay, GSequencer finally uses gtk_main() instead of its very own Gtk+-2.0 dispatcher. As release 0.9.28 all functional tests have been migrated and do pass, now. Obviously, as you need at least 3 tics of synchronization and the last one might be not called for sure, you should definitely sync 4 tics. Since during the very first sync, AgsTaskThread might have already run it's tasks. It is even more complicated the call to ags_task_thread_append_task() and ags_task_thread_append_tasks() is non-blocking.

However, for now AgsGuiThread does make use of GSource to do its splash-screen and synchronization with AgsTaskThread. This can be done because the GUI dispatcher isn't running while the source is dispatched.

First versions available to Apple OS X

I use Apple OS X 10.7.5 to build my DMG and should run on its latest version Sierra, afaik. The binary distribution contains some pre-built plugins. But it is a very bloody beginning.

Environment variables

Advanced Gtk+ Sequencer now supports following plugins environment variables:

  • LADSPA_PATH
  • DSSI_PATH
  • LV2_PATH

Further you could modify the splash screen or logo shown in about by:

  • AGS_LOGO_FILENAME
  • AGS_ANIMATION_FILENAME

As well as providing a custom gtkrc file:

  • AGS_RC_FILENAME

Enjoy, Joël

No messages in Reduced latency of JACK

 

Back to the top


Powered by Savane 3.5