newsAdvanced Gtk+ Sequencer - News: Refactor GSequencer's recalls - the ags-fx engine

 
 
Latest News
Advanced Gtk+ Sequencer version 6.5.x posted by jkraehemann, Sun 11 Feb 2024 05:06:15 PM UTC
Advanced Gtk+ Sequencer version 6.3.5 posted by jkraehemann, Fri 19 Jan 2024 11:53:24 AM UTC
Advanced Gtk+ Sequencer v6.1.0 released posted by jkraehemann, Thu 28 Sep 2023 04:55:19 AM UTC
Advanced Gtk+ Sequencer v6.0.0 released posted by jkraehemann, Mon 21 Aug 2023 11:48:52 AM UTC
Advanced Gtk+ Sequencer v5.5.0 released posted by jkraehemann, Sat 05 Aug 2023 10:21:52 AM UTC

Refactor GSequencer's recalls - the ags-fx engine

Item posted by Joël Krähemann <jkraehemann> on Sun 03 May 2020 12:08:19 AM UTC.

The new recall implementations are beloved to improve performance and increased comprehensibility of the code.
Going away from atomic design with dependencies to feature rich standalone effect processors. Putting all things together with AgsSoundScope as introduced in version 2.0.x ...

The ags/audio/ags_sound_enums.h header file

Minimize dynamic memory allocation during playback, very intuitive extensible API to basic recalls like: ags-fx-notation, ags-fx-pattern, ags-fx-playback.
Check out here for more:

The ags/audio/fx directory

I am just about to replace the existing atomic recalls with the optimized recalls. The dispatcher probably sees additions and make it programmable stages. Still some work left to do, see you!

A programmable staging dispatcher


The libags_audio.so threads shall get a vector specifying which staging flags to run, see AgsSoundStagingFlags. The following threads are affected:

  • AgsAudioLoop
  • AgsAudioThread
  • AgsChannelThread


Might be we do a specialized staging function to handle special needs for effects only using AgsRecall::run-inter(). This would be only to AgsAudio instruments limited AgsRecall::run-pre() like:

  • ags-fx-playback
  • ags-fx-pattern
  • ags-fx-notation
  • ags-fx-dssi
  • ags-fx-lv2 (instruments only)


Current recall implementation does pre and post staging on every AgsAudio and AgsChannel. On the opposite the new fx recall implementation runs only ::run-inter(). With different tree iteration strategy.

All recalls replaced


The new fx recall engine provides feature rich effect processors. Isolated and entire in its implementation. The old recall implementation has got somehow messy with the dependencies.

GSequencer's fx brings you less dynamic memory allocation during playback and feeding audio data on the run. I put big hope in it to retrieve better performance.

Improved plugin recalls


Since `gsequencer` does instantiate plugins per scope it brings you many advantages without breaking any current principles.

Better factory function


The new factory function is declared like so:


GList*
ags_fx_factory_create(AgsAudio *audio,
                      AgsRecallContainer *play_container, AgsRecallContainer *recall_container,
                      gchar *plugin_name,
                      gchar *filename,
                      gchar *effect,
                      guint start_audio_channel, guint stop_audio_channel,
                      guint start_pad, guint stop_pad,
                      gint position,
                      guint create_flags, guint recall_flags)


The new signature has got a filename and effect parameter to identify plugins. Further position uses the new functions:

  • ags_audio_insert_recall()
  • ags_channel_insert_recall()


I really like the new code which was easy to write and doing unit-tests.




by Joël

 

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code