Csound Csound-dev Csound-tekno Search About

Generate table from unrelated frequencies

Date2016-01-20 07:50
FromGuillermo Senna
SubjectGenerate table from unrelated frequencies
Hi,

Right now I have a Cabbage instrument that chngets 16 frequencies, 
amplitudes, etc. and then (using a loop and event_i) triggers a sounding 
instrument 16 times using that information. So, I am doing additive 
synthesis.

Having 16 oscillators, a time-fixed version and a real-time midi version 
both work fine. So I tried elevating the number to 128, but the amount 
of simultaneous midi notes I can trigger using that amount of 
oscillators is roughly 10 (128*10). I have no CPU left for anything 
else. The problem is in the loop, because I haven't set a p3 greater 
than 0 in most of the oscillators, so I am guessing it actually does not 
instantiate 128 instruments. Am I right? Anyhow, looping and reading 
from the channels(chnget) evidently takes time and resources.

I was thinking if there was a way to compute the composite waveform 
first using a table. So, I need the equivalent waveform which would be 
produced as a result of triggering a large number of oscillators (say 
128) with different and unrelated frequencies, amplitudes (each with a 
distinct envelope), p2 and p3. Is this feasible? Should I use GEN 09? 
Would the result be the same? Is there some example that I have not 
stumbled upon yet?

Thank you for reading!

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

Date2016-01-20 09:03
Fromjoachim heintz
SubjectRe: Generate table from unrelated frequencies
hi -

maybe this helps exploring the possibilities:
http://floss.booktype.pro/csound/a-additive-synthesis/

cheers -
	joachim

On 20/01/16 08:50, Guillermo Senna wrote:
> Hi,
>
> Right now I have a Cabbage instrument that chngets 16 frequencies,
> amplitudes, etc. and then (using a loop and event_i) triggers a sounding
> instrument 16 times using that information. So, I am doing additive
> synthesis.
>
> Having 16 oscillators, a time-fixed version and a real-time midi version
> both work fine. So I tried elevating the number to 128, but the amount
> of simultaneous midi notes I can trigger using that amount of
> oscillators is roughly 10 (128*10). I have no CPU left for anything
> else. The problem is in the loop, because I haven't set a p3 greater
> than 0 in most of the oscillators, so I am guessing it actually does not
> instantiate 128 instruments. Am I right? Anyhow, looping and reading
> from the channels(chnget) evidently takes time and resources.
>
> I was thinking if there was a way to compute the composite waveform
> first using a table. So, I need the equivalent waveform which would be
> produced as a result of triggering a large number of oscillators (say
> 128) with different and unrelated frequencies, amplitudes (each with a
> distinct envelope), p2 and p3. Is this feasible? Should I use GEN 09?
> Would the result be the same? Is there some example that I have not
> stumbled upon yet?
>
> Thank you for reading!
>
> 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

Date2016-01-20 09:20
FromAnders Genell
SubjectRe: Generate table from unrelated frequencies
In addition to all the excellent examples in the FLOSS manual there is also an the option tu use the adsynt2 opcode...

Regards,
Anders

On Wed, Jan 20, 2016 at 10:03 AM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

maybe this helps exploring the possibilities:
http://floss.booktype.pro/csound/a-additive-synthesis/

cheers -
        joachim


On 20/01/16 08:50, Guillermo Senna wrote:
Hi,

Right now I have a Cabbage instrument that chngets 16 frequencies,
amplitudes, etc. and then (using a loop and event_i) triggers a sounding
instrument 16 times using that information. So, I am doing additive
synthesis.

Having 16 oscillators, a time-fixed version and a real-time midi version
both work fine. So I tried elevating the number to 128, but the amount
of simultaneous midi notes I can trigger using that amount of
oscillators is roughly 10 (128*10). I have no CPU left for anything
else. The problem is in the loop, because I haven't set a p3 greater
than 0 in most of the oscillators, so I am guessing it actually does not
instantiate 128 instruments. Am I right? Anyhow, looping and reading
from the channels(chnget) evidently takes time and resources.

I was thinking if there was a way to compute the composite waveform
first using a table. So, I need the equivalent waveform which would be
produced as a result of triggering a large number of oscillators (say
128) with different and unrelated frequencies, amplitudes (each with a
distinct envelope), p2 and p3. Is this feasible? Should I use GEN 09?
Would the result be the same? Is there some example that I have not
stumbled upon yet?

Thank you for reading!

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

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

Date2016-01-20 10:18
FromIain McCurdy
SubjectRe: Generate table from unrelated frequencies
Hi Guillermo,

The built-in Cabbage example 'InharmonicAdditiveSynth' uses the GEN09 technique that I think you were alluding to.

Iain

> Date: Wed, 20 Jan 2016 04:50:09 -0300
> From: gsenna@GMAIL.COM
> Subject: [Csnd] Generate table from unrelated frequencies
> To: CSOUND@LISTSERV.HEANET.IE
>
> Hi,
>
> Right now I have a Cabbage instrument that chngets 16 frequencies,
> amplitudes, etc. and then (using a loop and event_i) triggers a sounding
> instrument 16 times using that information. So, I am doing additive
> synthesis.
>
> Having 16 oscillators, a time-fixed version and a real-time midi version
> both work fine. So I tried elevating the number to 128, but the amount
> of simultaneous midi notes I can trigger using that amount of
> oscillators is roughly 10 (128*10). I have no CPU left for anything
> else. The problem is in the loop, because I haven't set a p3 greater
> than 0 in most of the oscillators, so I am guessing it actually does not
> instantiate 128 instruments. Am I right? Anyhow, looping and reading
> from the channels(chnget) evidently takes time and resources.
>
> I was thinking if there was a way to compute the composite waveform
> first using a table. So, I need the equivalent waveform which would be
> produced as a result of triggering a large number of oscillators (say
> 128) with different and unrelated frequencies, amplitudes (each with a
> distinct envelope), p2 and p3. Is this feasible? Should I use GEN 09?
> Would the result be the same? Is there some example that I have not
> stumbled upon yet?
>
> Thank you for reading!
>
> 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

Date2016-01-20 20:01
FromGuillermo Senna
SubjectRe: Generate table from unrelated frequencies
@Joachim

Thanks! I've seen that sections of the FLOSS manual already. I think that's where I got the idea to do it using the GEN09 routine.

@Anders

I didn't know about that opcode Anders. It appears to be a great shortcut for additive synthesis. Thank you!

@Iain

Excellent Iain! Most probably, I'll end up adapting your example to my interface. I'm not very used to using macros though. The good thing is I can use 'gentable' to display the resulting waveform.

Thank you all.


On 20/01/16 07:18, Iain McCurdy wrote:
Hi Guillermo,

The built-in Cabbage example 'InharmonicAdditiveSynth' uses the GEN09 technique that I think you were alluding to.

Iain

> Date: Wed, 20 Jan 2016 04:50:09 -0300
> From: gsenna@GMAIL.COM
> Subject: [Csnd] Generate table from unrelated frequencies
> To: CSOUND@LISTSERV.HEANET.IE
>
> Hi,
>
> Right now I have a Cabbage instrument that chngets 16 frequencies,
> amplitudes, etc. and then (using a loop and event_i) triggers a sounding
> instrument 16 times using that information. So, I am doing additive
> synthesis.
>
> Having 16 oscillators, a time-fixed version and a real-time midi version
> both work fine. So I tried elevating the number to 128, but the amount
> of simultaneous midi notes I can trigger using that amount of
> oscillators is roughly 10 (128*10). I have no CPU left for anything
> else. The problem is in the loop, because I haven't set a p3 greater
> than 0 in most of the oscillators, so I am guessing it actually does not
> instantiate 128 instruments. Am I right? Anyhow, looping and reading
> from the channels(chnget) evidently takes time and resources.
>
> I was thinking if there was a way to compute the composite waveform
> first using a table. So, I need the equivalent waveform which would be
> produced as a result of triggering a large number of oscillators (say
> 128) with different and unrelated frequencies, amplitudes (each with a
> distinct envelope), p2 and p3. Is this feasible? Should I use GEN 09?
> Would the result be the same? Is there some example that I have not
> stumbled upon yet?
>
> Thank you for reading!
>
> 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