Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Linear algebra opcodes

Date2007-12-25 23:49
From" Partev Barr Sarkissian"
Subject[Csnd] Re: Linear algebra opcodes
I've dabble with this only a lttle, 
algebra, trig functions and such. Also use that in creating linear and non-linear 
curve for morph opcodes functions, and use it for table function opcodes.

some sound cool in stereo, while others need some adjusting. 
Have to set limits on some of the variables.

- Partev


----------------------------------------------------------------
----------------------------------------------------------------

--- gogins@pipeline.com wrote:

From: Michael Gogins 
To: Csound Developers , 	Csound 
Subject: [Csnd] Linear algebra opcodes
Date: Tue, 11 Dec 2007 13:37:47 -0500 (GMT-05:00)

I am designing a set of Csound opcodes to bring standard linear algebra routines into the Csound orchestra language. 

This would essentially be most of BLAS levels 1, 2, and 3 plus LAPACK: all arithmetic between real and complex scalars, vectors, and matrices including dot products; norms and determinants; powers and exponents; and matrix inverse, linear solutions, and matrix decompositions including eigenvalues. 

The Csound data types that would work with these opcodes would include irate and krate scalars and complex, arate real vectors, function tables as real vectors, fsigs as complex vectors, wsigs as complex vectors, and irate custom-allocated real and complex vectors and matrices.

I will probably go ahead and just do this, but if people are interested enough perhaps we could get it into the next release. All of the work required is creating opcode wrappers for existing libraries, and documentation.

For the sake of efficiency, the results of operations should probably go into preallocated objects at the leftmost position in the argument list (except for scalar results). I am not sure about opcode names and signatures. Perhaps names reminiscent of BLAS and LAPACK routines, but with simplified arguments, would be a good idea (e.g. la_dgemv vecout, matin, vecin). Alternatively, more mathematically styled names could be used (e.g. la_dot vecout, matin, vecin).

These opcodes would make it possible to do a good deal of matlab-style DSP directly in the Csound orchestra language, instead of writing new opcodes in C.

Please let me know your thoughts...

Mike




Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




_____________________________________________________________
Netscape.  Just the Net You Need.

Date2007-12-26 16:34
FromEmanuele Casale
Subject[Csnd] frequency in random distribution
Hi,
in random ditribution opcodes such as 'gauss', 'exprand', 'linerand' etc
there is not frequency argument. Their frequency could change only
changing sr... Do you have some suggestion to use frequency
with them?
(In these opcodes It would be nice to get the same arguments
such as 'randi' or 'randh'.)
Thanks
ec










Date2007-12-26 18:23
From"Rory Walsh"
Subject[Csnd] Re: frequency in random distribution
If there are k-rate versions you could create a UDO and have it use
setksmps to set the frequency at which it is updated. You can also create
it in such a way that it lets you choose between the different
distributions.

Rory.


> Hi,
> in random ditribution opcodes such as 'gauss', 'exprand', 'linerand' etc
> there is not frequency argument. Their frequency could change only
> changing sr... Do you have some suggestion to use frequency
> with them?
> (In these opcodes It would be nice to get the same arguments
> such as 'randi' or 'randh'.)
> Thanks
> ec
>
>
>
>
>
>
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



Date2007-12-27 00:47
FromIain McCurdy
Subject[Csnd] RE: frequency in random distribution
You can downsample the function using 'metro' and 'samphold'. e.g:

kfun  exprand  krange
ktrig  metro  kfrq
kfun  samphold  kfun, ktrig

Iain

> From: emanuelecasale@alice.it
> Date: Wed, 26 Dec 2007 17:34:03 +0100
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] frequency in random distribution
>
> Hi,
> in random ditribution opcodes such as 'gauss', 'exprand', 'linerand' etc
> there is not frequency argument. Their frequency could change only
> changing sr... Do you have some suggestion to use frequency
> with them?
> (In these opcodes It would be nice to get the same arguments
> such as 'randi' or 'randh'.)
> Thanks
> ec
>
>
>
>
>
>
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


i’m is proud to present Cause Effect, a series about real people making a difference. Learn more

Date2007-12-27 09:45
FromEmanuele Casale
Subject[Csnd] Re: RE: frequency in random distribution
ok, thanks to Rory and Iain...
ec


Il giorno 27/dic/07, alle ore 01:47, Iain McCurdy ha scritto:

You can downsample the function using 'metro' and 'samphold'. e.g:

kfun  exprand  krange
ktrig  metro  kfrq
kfun  samphold  kfun, ktrig

Iain

> From: emanuelecasale@alice.it
> Date: Wed, 26 Dec 2007 17:34:03 +0100
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] frequency in random distribution
>
> Hi,
> in random ditribution opcodes such as 'gauss', 'exprand', 'linerand' etc
> there is not frequency argument. Their frequency could change only
> changing sr... Do you have some suggestion to use frequency
> with them?
> (In these opcodes It would be nice to get the same arguments
> such as 'randi' or 'randh'.)
> Thanks
> ec
>
>
>
>
>
>
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


i’m is proud to present Cause Effect, a series about real people making a difference. Learn more