I've written a convenience interface to implement Non Session Management as fast and easy as possible in Python 3 applications. It is no magic programming at all, but it makes things just that tiny bit easier that is required to actually implement something, and not only plan it.
The real work is to follow the rules of a managed system (see http://non.tuxfamily.org/nsm/API.html ). So implementing the technical side should be a no-brainer to let you focus on the actual task.
pynsmclient is open source under the GPL3 or later and can be found on my github page so you can start using it right away.
I also have written a short article in my blog about that topic http://nilsgey.de/?id=24
after a somewhat productive weekend I'm happy to announce some alpha
quality software (i.e. bug ridden, not feature complete) for your
consideration and feedback :)
But: release early, release often XD
I went a little overboard with modularization and separation of
concerns, so in the end it became four packages (with possibly one more
in the future - a LV2 plugin to load the synths/instruments).
Documentation is also very much lacking, but each package contains at
lease a single example file to illustrate the usage.
* ladspa.m - https://github.com/fps/ladspa.m
ladspa.m is a header only c++ library to build and run general synthesis
graphs made up out of LADSPA plugins. The interface is kept deliberately
kept simple and unsafe, as it is expected that one uses higher level
tools to build these synthesis graphs (e.g. using a library on top op
ladspa.m.swig or ladspa.m.proto).
* ladspa.m.swig - https://github.com/fps/ladspa.m.swig
ladspa.m.swig are SWIG generated python bindings for ladspa.m. This
allows building and running general synthesis graphs made up of LADSPA
plugins from within python. This requires ladspa.m. NOTE: I just saw
that the swig interface definition lacks the ability to connect outside
buffers onto plugin ports. This will be fixed in the next few days..
* ladspa.m.proto - https://github.com/fps/ladspa.m.proto
ladspa.m.proto contains google protobuf definitions for general
synthesis graphs made up of LADSPA plugins. It also contains a
definition for an instrument file format. This library does not depend
on either of the two above. It becomes useful with the last package
(ladspa.m.jack) and possibly in the future with an LV2 plugin to load
and run these (to be announced when done). The python bindings generated
for ladspa.m.proto can be used to generate synth and instrument files
that can be loaded by ladspa.m.jack. The instrument file definition
allows for polyphony while at the same time putting no constraints on
the inner structure of the instrument (each voice is made up out of
plugins, they can be identical or not between all voices)..
An example is included which defines a simple sawtooth instrument with
exponential envelopes and with 5 identical voices except for a different
delay setting on each voice.
Pipe its output into a file called e.g. instrument.pb. This you can then
load into ladspa.m.jack.instrument.
Here's a little example of the generated instrument file loaded into
ladspa.m.jack.instrument and playing a little 120bpm loop (from ardour3)
This also highlights the need for a higher level interface on top of it
to ease the process..
* ladspa.m.jack - https://github.com/fps/ladspa.m.jack
ladspa.m.jack is a library which allows loading ladspa.m.proto synth and
instrument definition files into jack hosts that are provided as example
ladspa.m.jack.synth allows loading a synth definition file and run it in
the jack graph.
ladspa.m.jack.instrument allows loading an instrument definition file
and provides a midi in port which allows playing the synth.
But like I said this is all ALPHA software and I just announce it
because someone else might have fun with it. Please report all issues
that you find either per email to me, on LAD or LAU or on the issue
trackers of the github projects..
Florian Paul Schmidt