Re: [linux-audio-dev] matrix model vs. memory

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

Subject: Re: [linux-audio-dev] matrix model vs. memory
From: Karl MacMillan (karlmac_AT_peabody.jhu.edu)
Date: Sun May 20 2001 - 02:15:28 EEST


On Sat, 19 May 2001, Paul Davis wrote:

> This is very relevant to Abramo's reply too.
>
> >I guess I am confused - are you referring to moving data between inputs
> >and outputs in a single plugin or between ports on two different plugins?
> >If the latter, then data is not really moved, right? The output of one
> >plugin _is_ the input of another, so when would all of this happen?
>
> well, if you require buffer sharing, then its impossible to have a
> multi-input port.
>

Well, in this case there are several choices, but they all end up being
some sort of copy. This doesn't mean that most of the time buffers can't
be shared, though.

> such a port type is important for implementing busses, since
> otherwise, you have to have an input port for every object that wants
> to connect to it. its very important to me to be able to implement a
> "bus" concept easily; an N-channel mixer with a single output port is
> a much less efficient way of implementing this.
>

That is true.

> moreover, if you require buffer sharing, you also require that the
> effective signal level for each of a series of connected input ports
> be controlled on a per-port basis, since they will all get the same
> data (from the output buffer).
>

They don't have to get the same data if some sort of gain control is
placed (as a separate plugin) between one or more of them..

> both of these seem suboptimal to me. as i said, there is already an
> implicit matrix of port connections; exposing it and attaching a gain
> at each node of the matrix seems like a really cool idea to me.
>

But if you allow buffer sharing when it makes sense, then this model is
sub-optimal (assuming I understand what you mean by matrix).

Karl

> >> Its also much more efficient, since otherwise, gain operations have to
> >> consist of:
> >>
> >> src *= gain;
> >> dst = src;
> >>
> >> (with these two operations not occuring directly after one another,
> >> since they occur in different parts of the system)
> >>
> >> rather than:
> >>
> >> dst = src * gain;
> >>
> >> which occurs in one place.
> >
> >Why is this?
>
> if the gain is independent of the transfer method, then plugin with
> the input port has to implement the gain:
>
> foreach sample in buf { sample *= gain ; }
>
> but whats "buf" ? if the output port's buffer is shared, then its an
> internal buffer; if the data was actually moved from the output port
> to the input port, then its the buffer associated with the input port.
> so in either case, we have to move the data, then multiply.
>
> if the gain is part of the transfer, we can do the multiply before we
> store the result in the destination buffer, all at once time.
>
> --p
>

_____________________________________________________
| Karl W. MacMillan |
| Computer Music Department |
| Peabody Institute of the Johns Hopkins University |
| karlmac_AT_peabody.jhu.edu |
| mambo.peabody.jhu.edu/~karlmac |
-----------------------------------------------------


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

This archive was generated by hypermail 2b28 : Thu May 24 2001 - 10:05:20 EEST