Csound Csound-dev Csound-tekno Search About

[Csnd] adsynt efficiency

Date2013-11-01 03:47
FromJim Aikin
Subject[Csnd] adsynt efficiency
Just out of curiosity, is using adsynt (or adsynt2) any more or less
efficient than using a stack of hand-coded sine-wave oscillators? I'm
guessing the sonic result would be about the same, and the amount of code is
about the same (though there's actually a bit less code, if you're using
lots of hand-coded oscillators, because you can replace two calls to tablew
with a single oscil line).

One occasionally useful advantage of hand-coded oscillators is that you can
specify the starting phase of each partial individually. But I'm more
curious about the relative efficiency.



--
View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-11-01 08:41
FromVictor Lazzarini
SubjectRe: [Csnd] adsynt efficiency
adsynt is about 10 times faster than an equivalent stack of csound oscillators last time I looked. 
The only issue with that opcode, as I discovered last week, is that it uses truncating oscillators. I ought to add an interpolating
option.

Victor
On 1 Nov 2013, at 03:47, Jim Aikin wrote:

> Just out of curiosity, is using adsynt (or adsynt2) any more or less
> efficient than using a stack of hand-coded sine-wave oscillators? I'm
> guessing the sonic result would be about the same, and the amount of code is
> about the same (though there's actually a bit less code, if you're using
> lots of hand-coded oscillators, because you can replace two calls to tablew
> with a single oscil line).
> 
> One occasionally useful advantage of hand-coded oscillators is that you can
> specify the starting phase of each partial individually. But I'm more
> curious about the relative efficiency.
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2013-11-01 16:03
FromJim Aikin
Subject[Csnd] Re: adsynt efficiency
> The only issue with that opcode, as I discovered last week, is that it uses
> truncating oscillators. I ought to add an interpolating option. 

The manual recommends using a large table. I haven't done critical listening
experiments, but when I saw that warning, I made my sine wave 65536, and it
seemed to sound okay. Could go even larger, I guess.



--
View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951p5728974.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-11-01 16:12
FromVictor Lazzarini
SubjectRe: [Csnd] Re: adsynt efficiency
But with large tables you risk losing frequency precision at low frequencies, because it uses an integral indexing algorithm, although this
is less of an issue now in Csound 6 than it was in Csound 5.

On 1 Nov 2013, at 16:03, Jim Aikin wrote:

>> The only issue with that opcode, as I discovered last week, is that it uses
>> truncating oscillators. I ought to add an interpolating option. 
> 
> The manual recommends using a large table. I haven't done critical listening
> experiments, but when I saw that warning, I made my sine wave 65536, and it
> seemed to sound okay. Could go even larger, I guess.
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951p5728974.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2013-11-01 18:35
FromJim Aikin
Subject[Csnd] Re: adsynt efficiency
> But with large tables you risk losing frequency precision at low
frequencies, because
> it uses an integral indexing algorithm....

I'll cheerfully bow to your superior knowledge of DSP -- but in listening
tests, I can't detect any loss of frequency precision. I set up a test
condition with a base frequency below 50Hz (47.39, because that wouldn't
divide evenly into 44100). I mixed the output of adsynt with the output of
an oscili. I couldn't detect any out-of-phase dropouts in a full minute of
the tone. So I panned the adsynt left and the oscili right, figuring that
any momentary phase differences might show up as a fluctuation in the stereo
image. Still no problems, while listening carefully over a full minute.

This was with a table of 65536. I also tried it while adding a few overtones
to the GEN10 table, figuring that might make problems easier to hear. I
couldn't hear anything untoward.

I'm not saying an interpolating version of the opcode is a bad idea. I'm
just suggesting that unless I'm missing something, creating it doesn't
necessarily need to be a high priority.



--
View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951p5728992.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-11-01 22:30
FromVictor Lazzarini
SubjectRe: [Csnd] Re: adsynt efficiency
As I said probably not so much of an issue on Csound 6, as we fixed things a bit. In Csound 5, long tables at
low frequencies would be off. See for instance what J J Hofman had to report in this thread

http://csound.1045644.n5.nabble.com/Different-output-on-table-read-out-in-respect-to-kr-td5724332.html


On 1 Nov 2013, at 18:35, Jim Aikin wrote:

>> But with large tables you risk losing frequency precision at low
> frequencies, because
>> it uses an integral indexing algorithm....
> 
> I'll cheerfully bow to your superior knowledge of DSP -- but in listening
> tests, I can't detect any loss of frequency precision. I set up a test
> condition with a base frequency below 50Hz (47.39, because that wouldn't
> divide evenly into 44100). I mixed the output of adsynt with the output of
> an oscili. I couldn't detect any out-of-phase dropouts in a full minute of
> the tone. So I panned the adsynt left and the oscili right, figuring that
> any momentary phase differences might show up as a fluctuation in the stereo
> image. Still no problems, while listening carefully over a full minute.
> 
> This was with a table of 65536. I also tried it while adding a few overtones
> to the GEN10 table, figuring that might make problems easier to hear. I
> couldn't hear anything untoward.
> 
> I'm not saying an interpolating version of the opcode is a bad idea. I'm
> just suggesting that unless I'm missing something, creating it doesn't
> necessarily need to be a high priority.
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/adsynt-efficiency-tp5728951p5728992.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie