On Sunday 14 January 2001 01:33, Guillaume Badaut wrote:
> Hi !
>
> I would like to know how much is MAIA completed at the moment. And
> is there some source code available ? (more recent than MuCos
> 0.6.0)

I was just about to hack away for a few hours, but decided to have a 
quick look in the mail box. :-)


Currently, the version is 0.7.0, and the protocol headers look quite 
a bit different from 0.6.0. (Apart from the logo being updated with 
some new ASCII art. :-) Some major issues have been sorted out, and 
although I'm still unsure about the best way to do some things, I'm 
probably just a few hours from running the first MAIA plugin with 
some properties and some LADSPA/VST style audio ports.


As to design, I *think* I have varispeed streaming ports (streaming 
host interface/protocol included) figured out, but the best way to 
find out is probably to implement it.

Anyway, the basic idea is that a varispeed stream channel is an 
abstraction of a file, which a plugin or client can stream from. The 
streaming is handled by a "Streaming Server" (which can be a thread 
of the local host, a separate process or running on another machine 
in a network), and the interface on that level is a basic streaming 
API with Quality Of Service guarantees.

Plugins will use an interface that is based on abstract objects 
called "Stream Points". A stream channel can have one or more of 
these, and each one represents a contigouos region inside the stream. 
When initializing a Stream Point, one has to specify it's size, 
maximum forward seek speed and maximum backward seek speed. (This is 
needed for the Streaming Server to set up it's buffering.) The 
maximum seek speeds can be zero, which means that the window will 
just be cached locally at init, and guaranteed to always be 
accessible, until the Stream Point is removed.


As an example, a direct-from-disk sampler (without looping) would use 
two Stream Points per voice; one for the sample start, big enough to 
handle the "relocate latency" of the: current play position Stream 
Point. (The relocate latency depends on the source media and the 
Streaming Server, and is one of a few performance characteristics 
parameters that Streaming Servers have to provide. Hosts will provide 
a basic toolkit for calculating buffer sizes and other stuff using 
this datas.)

When a note is triggered, a voice plugin will first tell the second 
Stream Point to move to the first sample after the end of the window 
of the first Stream Point. Then it will ask the host to gather the 
data it needs for the current buffer. (That should be it local RAM, 
as specified by the first Stream Point.)

When the plugin hits the end of the window managed by the first 
Stream Point, it'll start bumping the position of the second Stream 
Point to follow the current play position, so that the data will 
always be in local RAM when the plugin asks for it.

Basically, the only thing the Plugin has to worry about is that at 
least one Stream Point covers the part of the stream that the Plugin 
will need for the next frame, and that it doesn't exceed the seek 
speeds for any points without taking the relocate latency in account. 
Then it can just grab the data using a host function call. (Well, 
plugins could mess with it themselves, but *mess* would probably be 
an all to proper word... The underlying logic is essentially a disk 
cache on steroids.)


As to the protocols I'm going to play with right now (Property and 
Buffer, vaguely corresponding to LADSPA control ports and audio 
ports, respectively), I'm still thinking about whether or not to take 
the full multiple datatype system into the Properties, how to deal 
with process_add() and some other things. Need to hack some actual 
plugin and host code before I can decide on any lower level details.


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'

Reply via email to