Zynthian Engine Preset Structure

From ZynthianWiki
Revision as of 13:08, 13 September 2021 by Wyleu (talk | contribs) (→‎Enter LV2.)
Jump to navigation Jump to search

1 Zynthian Engines

The relationship between a zynthian it's engines and how settings are stored has grown over the years and like much of the project ever growing.

Suffice to say You need an engine to make things happen. Which is where most of us would start . .

The zynth starts up with nothing loaded, althou' it should quickly build up your last state as you start to do things. . .

Zynthian Layers Menu

But it's really all engines as this stage and you want to load one up to use it.

The Synth Layer is the first to consider this will allow selection of a range of synthesizer like devices that get automatically connected to a MIDI channel (more on this later, hopefully) and the default audio available outputs, which will outside of a few crazed individual connections will be the left and right output of the zynthian, available as two audio sockets for further abuse in other kit.

There are several available.

Zynthian Engine Menu

Now some of these are sound sampler base (Fluidsynth, Linuxsampler, SFizz . . . ), others are genuine synthesizers (ZynaddSubFx, Dexed, Helm,) still others are specific models of existing instruments (Pianoteq, Aeleous,) and others are strange weird, wonderful and possibly untested, collected from the more fetid areas of the Internet, So be aware.

The Zynthian simply serves up engines from elsewhere. It isn't responsible for those engines, offering only a standardized approach to handling them.

But mindful of this warning, things start to look very good, because an awful lot of people have got together over this and within the Linux based world in which the Zynthian lives, constructed some standards to define these sorts of things.

2 Enter LV2.

https://lv2plug.in/pages/developing.html

This is an agreement to produce a set of software rules about how audio devices interact within the linux audio world, and allows description of such objects via a Grammar framework on the Internet (https://www.w3.org/RDF/).

This is very helpful because one can describe pretty complex ideas like A 'filter control', or a 'MIDI note' or a 'sound file' and allow these ideas to be understood by machines as well as people. This is all laid out in TTL files (Turtle; computer humour... :-( ) , https://www.w3.org/TR/turtle/)

Luckily the zynthian is here to present all this to you in a nice easy to operate device . . .

Now ( sometime in 2021) not all engines are implemented as LV2 or even if they exist outside of the zynthian's LV2 world, but these are probably exceptions rather than the rule so the code is still a bit of a hybrid in this area. . . :-D

Zynthian engine info population.png

The Traditional elements are still populated manually, Pianoteq is a bit of an exception but the LV2 based components already can be treated programmatically.

They all get an Character ID in the engine_info dictionary with JV/ jammed on the front if they have emerged from the LV2 world scan...

3 Deeper Still...

So we have an ordered dictionary of short Codes with a tuple of meta data "ZY", ("ZynAddSubFX", "ZynAddSubFX - Synthesizer", "MIDI Synth", None, zynthian_engine_zynaddsubfx, True)],

and a zyntengine import * takes care of presenting these engines from the zynengine directory to the code. So in this case the class instance for zynthian_engine_zynaddsubfx is extracted from the file /zynthian-ui//zyngine/zynthian_engine_zynaddsubfx.py

Zynthian top details of zynthian_engine_zynaddsubfx.py