[linux-audio-dev] LADSPA xml suggestion

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] LADSPA xml suggestion
From: Andreas Kornagel (atacama_AT_newmail.net)
Date: Sun Feb 25 2001 - 14:06:45 EET


Hello,

I recently stopped developing my mod soft synth `resonance engine` and am now
trying to develop LADSPA plugins (two of which are caller "lorenz attractor"
and "van der pol-osctillator" or so).

The suggestion to extend the LADSPA xml standard is based on the assumption
that LADSPA perform not well when it comes to connecting many simple modules,
in contrast to the above program.

So I had some idea regarding the xml repr of LADSPA plugins and would like
you to tear this apart:

The callback routine "run" of every plugin divides into section, the part
that e.g. initialised run-time variables and the part that is run every
sample.

If the xml desc now defines two different callbacks, e.g. run_control and
run_sample and the converter would generate something like:

  run(sample_cound) {

 run_control();

      for (pos = 0; pos < sample_count; pos++) {
   run_sample();
 }
}

Then, if we have a connection between plugins that is fixed and never broken
up, the converter could also generate:

 run_control_OF_PLUGIN1();
 run_control_OF_PLUGIN2();
  
      for (pos = 0; pos < sample_count; pos++) {
   run_sample_OF_PLUGIN1();
   run_sample_OF_PLUGIN2();
 }

better would be to write the code of the functions dircetly into the new run
functions, but, of course that would give namespace collisions in c++. I
wonder if `inline` has any effect here.

This has the advantage that the "samplecount"-loop is not run every run call,
which has more and more effect the smaller the latency (and thus the
samplecount) is.
When inlineing the code, there are no jumpcalls, which should let the
compiler optimise the plugin structure globally, which should give a
dramatical speed burst. ;-)

If the AUDIO port vars would be converted from array pointers to pointers to
the actual writing position which is known now ( output=output [pos] ; ), it
would be possible to write plugins coming in different version with ports
either CONTROL or AUDIO, without changing the code.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Feb 25 2001 - 15:23:26 EET