difference between phasor and tablei opcodes

Hello, everyone.

When I tried to hear two summed waves which have same amplitude, same frequency and different phases, I found a little strange action.

****.orc file****

instr 1

aphase phasor 440, .45
asig tablei aphase, 1, 1
acheck oscili 1, 440, 1
out (asig + acheck) * 3000

endin

****.sco file****

f 1 0 8192 10 1

i 1 0 8888

I thought it sounds a certain volume 440hz A.
But actually its volume got smaller, and then silence, and got bigger.
It seemed two signals have a very small deference of freqency.

If anyone know about this action, I would like to get any hint.

Hi, I tried your code and I

Hi,

I tried your code and I get a consistent sine tone, without the amplitude fluctuation you're talking about.

Can you post the version and the platform you're using?

-c.

re:

I just ran the code with Csound 5.07 for OS X PPC and I experienced the amplitude fluctuation. And I'm not surprised to hear it. I first encountered this same issue back in 1998. Some opcodes are not perfectly tuned to each other. In this case, phasor's 440 is just slightly different than oscili's 440. So at some point, the two waves will drift until they are 180 degrees out of phase, thus canceling each other out.

When it's absolutely vital to have multiple oscillators in sync, I employ the use of a master phasor. Here's a brief introduction to the technique. In that article, I refer to it as a master clock, as this technique was being used to loosely model old analogue step sequencers.

Best,
Jake
----
The Csound Blog
http://www.thumbuki.com/csound/blog/

It's strange that on my

It's strange that on my machine this doesn't happen, though (I'm on gnu/Linux with csound built recently from cvs).

Anyway, I'm curious about which is the exact technical reason for this. As far as I know, it shouldn't happen.

Best,

-c.

interesting

Interesting, if it does it on some platforms and not others. Out of curiosity, how long are you listening to the file? Because it takes a good half a minute before the sound disappears on my system.

Yes, it does it.I tried to

Yes, it does it.

I rendered it to .wav and then I reopened it with a sound editor to see the waveform. The amplitude decreases, but more slowly. It reaches silence after ~ 12 minutes.

-c.

...

Even more interesting. I'm going to the mailing list with this as I'm very curious as to what others have to say.

Explanation

Victor Lazzarini wrote the following explanation to the Csound Mailing List:

"These can be explained by the fact that oscil et al phase
accumulator will have its precision dependent on the size
of the table (because they use integer maths)."

"You could try poscil to see if this "problem" is less
apparent, as it uses 64-bit floating point indexing."

Here's the mailing list thread @ nabble.

my platform is

Csound 5.05 on Mac OS X 10.3 .
I changed frequency and f1 table size. then times of disapear may depend on frequency.
frq : time
110hz : 21s
220hz : 24s
440hz : 27s
441hz : 122s
442hz : 32s
880hz : 43s
882hs : 61s
884hz : 105s
886hz : 306s
888hz : 21s
In my environment, There are two peaks of time of reaching silence.
Maybe some frequencies which have peak of time will be found.
I choised these frequencies because I suppose they are related sampling rate 44100 hz.
I think using master phasor is very good idea.