Stabilizing Scope()

29 views
Skip to first unread message

serge....@gmail.com

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

   Is there a way to synchronize Scope() (as on some « real » oscilloscopes)?
My (small) problem is that in the following example:
==============
from pyo import *
s=Server(sr=44100,nchnls=2,buffersize=1024,duplex=1,audio='jack')
s.boot()
s.start()
sig = Sine(10)
scope=Scope(sig,length=.1)
s.gui(locals())
==============
... 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.

   Serge.

Alexandros

unread,
Oct 30, 2021, 2:53:51 AM10/30/21
to pyo-d...@googlegroups.com

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 pyo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyo-discuss/6f967919-c27e-4a62-85c3-138cb25ad7e8n%40googlegroups.com.

serge....@gmail.com

unread,
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.
   Serge.

Olivier Bélanger

unread,
Dec 1, 2021, 8:51:54 AM12/1/21
to pyo-d...@googlegroups.com
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!

Olivier


Reply all
Reply to author
Forward
0 new messages