Stabilizing Scope()

Skip to first unread message

Oct 29, 2021, 5:17:55 PM10/29/21
to pyo-discuss

   Is there a way to synchronize Scope() (as on some « real » oscilloscopes)?
My (small) problem is that in the following example:
from pyo import *
sig = Sine(10)
... the curve drawn by Scope is continuously moving. It should be stable, as the
window length is 0.1 seconds, hence equal to the period. On my machine, I have to
change the frequency of the Sine from 10 to 10.766 to stabilize the curve, so
I suspect this is due to the computation time for Scope (filling the buffer?).
Is it possible to have a kind of « zero detector » to synchronize Scope
with the input signal?

Thanks in advance for your help.



Oct 30, 2021, 2:53:51 AM10/30/21

Not sure, but this sounds like an issue with the sampling rate. You set a rate of 44100, but you're using Jack. As far as I know, when you're using Jack, your application will use Jack's sampling rate, regardless of the rate you set manually (at least this is what happens in Pd). OTOH, if your app run at a different rate, you should still not have an issue, as all objects would run at the same rate.

Perhaps it's something else that I'm completely ignorant of, like the way Scope works.

You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Oct 30, 2021, 4:24:16 AM10/30/21
to pyo-discuss
Thanks for your answer. I thought of this sampling rate issue, but actually jack runs with a rate of 44100, settled in the parameters of
its control program qjackctl (on Ubuntu 20 04). The same qjackctl doesn't complain about this rate, whereas it does for example
if I specify a buffer size different from the one in jack (1024). In addition to this, the ratio 48000/44100 is equal to 1.088, which is different
from the ratio of frequencies I find (1.0766). But you're right, some other parameter in jack could be a problem, I don't know much either
on how Scope works.

All the best.

Olivier Bélanger

Dec 1, 2021, 8:51:54 AM12/1/21
IIRC even though the window length is a continuous value, it's internally clipped to the buffer size. To get a stable waveform, I usually use a multiple of the buffer size as frequency!


Reply all
Reply to author
0 new messages