Csound Csound-dev Csound-tekno Search About

[Csnd] Oscillator Bank Efficiency

Date2019-08-17 22:06
Frompablozoani
Subject[Csnd] Oscillator Bank Efficiency
Hello Csounders.
Im working with banks of oscillators and really dont know wich method is
more -cpu- efficient. Each partial consists of one unit, wich may be 

asig1 poscil 1, fundamental_frequency * index0
asig2 poscil 1, fundamental_frequency * index1
asig3 poscil 1, fundamental_frequency * index2
...

or

aphasor phasor frequency
asig1 sin (2 * pi * aphasor * index0)
asig1 sin (2 * pi * aphasor * index1)
asig1 sin (2 * pi * aphasor * index2)
...

I know poscil doesn't have to compute the sine function since it reads
values from a table. But the pro of sin(x) is that is more raw, doesnt need
to load much stuff. To carry out the bank recursion will be implemented
(throught the udo system), where the phasor will be outside of the recursive
block (but the values of aphasor will be passed via an argument). Also,
other opcodes can be in consideration, but those should be per partial (for
example, oscils and phasorbnk, not asdysnt or buzz).

Regards to all!

Pablo





--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-08-18 05:50
FromEduardo Moguillansky
SubjectRe: [Csnd] Oscillator Bank Efficiency
If you do not need access to the Individual partials and are planning to aum everything, then beadsynt is very efficient and gives you control over interpolation and allows you to include noise bands as well. If you need to postprocess each partial (maybe to spatialyze each individually), the poly opcode together with oscilli is almost as efficient and does not need recursion. 

On Sat, Aug 17, 2019, 11:03 PM pablozoani <pablozoani@hotmail.com> wrote:
Hello Csounders.
Im working with banks of oscillators and really dont know wich method is
more -cpu- efficient. Each partial consists of one unit, wich may be

asig1 poscil 1, fundamental_frequency * index0
asig2 poscil 1, fundamental_frequency * index1
asig3 poscil 1, fundamental_frequency * index2
...

or

aphasor phasor frequency
asig1 sin (2 * pi * aphasor * index0)
asig1 sin (2 * pi * aphasor * index1)
asig1 sin (2 * pi * aphasor * index2)
...

I know poscil doesn't have to compute the sine function since it reads
values from a table. But the pro of sin(x) is that is more raw, doesnt need
to load much stuff. To carry out the bank recursion will be implemented
(throught the udo system), where the phasor will be outside of the recursive
block (but the values of aphasor will be passed via an argument). Also,
other opcodes can be in consideration, but those should be per partial (for
example, oscils and phasorbnk, not asdysnt or buzz).

Regards to all!

Pablo





--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-08-19 21:44
Frompablozoani
SubjectRe: [Csnd] Oscillator Bank Efficiency
Thanks for replying Eduardo. Yes, i do need access to individual partials, so
i will take a look to the poly opcode. Can you tell me where i can get more
information about poly? 
Regards



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-08-20 09:25
FromEduardo Moguillansky
SubjectRe: [Csnd] Oscillator Bank Efficiency
On 19.08.19 22:44, pablozoani wrote:
> Thanks for replying Eduardo. Yes, i do need access to individual partials, so
> i will take a look to the poly opcode. Can you tell me where i can get more
> information about poly?

For poly, look at the example here: 
https://csound-plugins.github.io/csound-plugins/opcodes/poly.html

In the example all oscilators are summed together at the end, but there 
is nothing stopping you from using a chain of poly opcodes to do 
something to each of the oscilators.

poly is part of a set of csound plugins external to the csound source 
tree and need to be installed separately. Look at 
https://csound-plugins.github.io/csound-plugins/Installation.html for 
instructions. There are also binaries for macOS here: 
https://github.com/csound-plugins/csound-plugins/releases

Documentation is here: 
https://csound-plugins.github.io/csound-plugins/index.html

These plugins need csound >= 6.12.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here