krähemann.com

Custom application design and development out-sourcing

GSequencer gets user interface scale factor

As HiDPI display become more common, I started to implement a new configuration key gui-scale. It is located in generic preferences group.

Currently, only following widgets are refactored:

  • AgsDial
  • AgsHIndicator / AgsVIndicator
  • GtkHScale / GtkVScale

This was a easy task, since there are instantiated as AgsLineMember or AgsBulkMember.

GSequencer with gui-scale factor 2.0

To refactor the Advanced Gtk+ Sequencer editors takes additional time.

  • AgsNotationEdit
  • AgsAutomationEdit
  • AgsWaveEdit

I am thinking of doing a release prior changing the editors, because The layout is not that bad. On a ordinary display the controls are rather big.

Looking forward to next releases.


by Joël

AgsMainLoop new sync counter

As of GSequencer version 2.2.10, the synchronization overhead was drastically reduced. By introducing a new sync counter field to the AgsMainLoop implementations.

The prototype of the interface functions are as following:

void ags_main_loop_sync_counter_inc(AgsMainLoop *main_loop, guint tic);
void ags_main_loop_sync_counter_dec(AgsMainLoop *main_loop, guint tic);
gboolean ags_main_loop_sync_counter_test(AgsMainLoop *main_loop, guint tic);

Instead of traversing all the multi-threaded tree for all threads, to check if the current tic has been completed. The new sync counter is incremented or decremented at the right time within ags_thread_loop().

Yeah, it is more like a semaphore now, but with greater control over the synchronization work.

If we look at a multi-threaded synchronizing at a rate of 1000 Hz and e.g. 1000 threads doing synchronization. You soon recognize traversing the tree each tic causes a bottle-neck. So you get:

1000 * 1000 * 1000 = 1’000’000’000 checks per second

Whereas with a synchronization counter, you get the following:

1000 * 1000 = 1’000’000 checks per second

It is evident that 1 thread can check 1000 times per second a counter field. But 1 thread checking 1’000’000 per second the entire tree consisting of 1000 threads causes some real overhead.

The old strategy was preserved can be activated by setting the appropriate global to FALSE in ags/thread/ags_thread-posix.c:

static gboolean ags_thread_global_use_sync_counter = FALSE;

Enjoy the new algorithm.


by Joël

Support the Free Software Foundation

The Free Software Foundation does important work related to freedom in the digital age. I think supporting Richard M. Stallman is important. He talks before audiences to clear up about dangers and threats to users freedom in our networked world.

Non-free software does harm to the user, by prohibiting one of the 4 essential freedoms in computing.

Double the movement
  • The freedom to run the program as you wish, for any purpose (freedom 0).
  • The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help others (freedom 2).
  • The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

There certainly different views to these demands. We have got even different terms to express our needs. Some call it opensource instead of free software.

Me, I personally prefer the term free software. So free software means to mean, I can run a program without limiting the usage e.g. how many installed systems the program runs on. Or I can read its source code to learn about how it works. Especially, when I think an application or a piece of code is useful. I want to share it. And the fact it has a publicly available source code, I can improve and fix it. As it might have a missing feature or a bug.

During the development of Advanced Gtk+ Sequencer. I often had to look at a certain libraries source code to figure out, what I could reuse from its structure and howto use the API the correct way. Sometimes, I wrote a small patch and contributed it.

The sharing mentality gives me a good feeling. To obtain quality good software is not a matter of price but rather a factor of availability. Documentation using open standards and Docbook XML should be wider adopted. Docbook XML provides you a vocabulary of tags for many formatting usages.

The Free Software Foundation does more. It fights using its campaigns against unjust behavior and threats in the digital age.


Joël

The wanted cursor API

A cursor is way more efficient than doing bisection of storage objects like:

  • AgsNotation
  • AgsAutomation
  • AgsWave
  • AgsMidi

The idea is to implement the following cursors: AgsNoteCursor, AgsAccelerationCursor, AgsBufferCursor and AgsTrackCursor.

All implementing AgsCursor interface.

The cursor interface shall have following prototype:

  • ::get_default_offset()
    • the offset for chunks
    • fixed size
  • ::get_tact()
    • The tact segmentation it is using
  • ::get_bpm()
    • the BPM it is using
  • ::get_rate()
    • the maximum rate it is using
  • ::get_delay()
    • the current delay
    • variable size related to maximum rate and BPM
  • ::get_duration()
    • the absolute duration
    • fixed size
  • ::get_delay_counter()
    • the internal delay counter
    • providing additional resolution
  • ::get_offset()
    • the current cursor position as offset
    • variable interpretation by implementation
  • ::get_prev()
    • get previous item
    • may be NULL if no previous
  • ::get_next()
    • get next storage item
    • may be NULL if no next
  • ::get_current_copy()
    • get current storage items as copy
    • may be NULL
  • ::get_current()
    • get current storage item
    • may be NULL

The AgsCursor interface does basic cursor abstraction. To reposition the cursor use the yet available AgsSeekable interface.

In order to implement the cursor interface we have a need for a small refactoring.


by Joël

GSequencer’s OSC support

As of version 2.1.x Advanced Gtk+ Sequencer has got Open Sound Control content format support. Including client and server functionality.

OSC content format can be dealt with low-level buffer functions located in ags/audio/osc/ags_osc_buffer_util.c and supports standard types as defined by http://opensoundcontrol.org Specification 1.0

For higher level composition and parsing there are AgsOscBuilder and AgsOscParser. Append the desired packet, bundle, message and value using the builder object. The parser emits events for the OSC semantics and creates XML as defined by:

http://krähemann.com/gsequencer/ns/ags_osc_file.dtd

The client implements common functions like:

  • ags_osc_client_resolve()
  • ags_osc_client_connect()
  • ags_osc_client_write_bytes()
  • ags_osc_client_read_bytes()

The OSC server supports IPv4/IPv6 over UDP and TCP. There are yet ready to use controller available for remote configuration, renew of effect processor ports, inspect port values or continues metering them. It can be configured by editing ~/.gsequencer/ags.conf or by user interface of GSequencer.

The OSC server preferences in GSequencer UI

by Joël

Debian 10 – buster freeze

Click the following link to see important dates of Debian 10 stable release codename Buster:

https://release.debian.org/buster/freeze_policy.html

To enter the stable distribution with GSequencer is an important step to me. 2 years ago, the situation about Advanced Gtk+ Sequencer was different. There were too many changes, too late and this led to the situation of not being considered.

This time we are good prepared, many unit-tests are available now. The functional test cases are extended as well. Covering new machines like:

  • AgsAudiorec
  • AgsEqualizer10
  • AgsSpectrometer

2 major releases have been published by me, since then. For the 2.0.x release the entire audio layer was refactored. Providing thread-safe properties, a new parallel recursively computed dispatcher and common flags.

The waveform editor was implemented with recording capabilities. Improved pulseaudio playback supporting caching. Configuration in-place works now reliable.

Recent changes includes the ability to update oscillator controls depending on samplerate.

A built-in Open Sound Control server and support for the content format. This all by providing low-level functions along with a builder and parser.

And for sure tons of bug-fixes.


by Joël

monoidea’s monothek

Few months ago, I was asked to implement the source code of monoidea’s monothek.

Monoidea is a artistic design and print media company. The Swiss based start-up wanted to realize a service to promote artistic work. Especially music is the topic of the planned installation. To give a platform to lesser known artists from the region.

https://monoidea.ch

The initial code base is available from Github and is a work in progress.

https://github.com/monoidea/monothek

Monothek uses the Advanced Gtk+ Sequencer Library as foundation of its code. The custom UI was created by the principles of MVC – model view controller. Each view inherits direct of its abstract base type MonothekView, itselves a GtkWidget sub-class. Monothek does make serious use of GObject type system.

As trying a common playlist where each audio file is about 4-5 minutes. The memory usage was approximately 3.5 GB, including Xorg and Mate Desktop running.

We keep you updated on this topic.


by Joël

About gsequencer and minos-one

The domains gsequencer.org and minos-one.org recently pointed to different locations. The savannah hosted site nongnu.org/gsequencer will stay the same. Note nongnu.gsequencer.org points to it, now.

I am looking forward to setup this web-hosting, since I have much more abilities with my own web-hosting.

Further the minos-one ISO image was for a while not available because I didn’t know where to put it to.

Another big thing to me is having HTML5 videos.


by Joël

Website launch

krähemann.com was just launched. We offer you custom application design and development out-sourcing.

We have strong knowledge about free and opensource software.

As of 2018-03-06 the website is still in launch phase.


Joël