# Puredata & realtime

**URL:** <https://community.blokas.io/t/puredata-realtime/1414>\
**Category:** Patchbox OS\
**Created:** [November 21, 2019, 11:27am UTC](https://community.blokas.io/t/puredata-realtime/1414 "2019-11-21T11:27:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coco](https://community.blokas.io/letter_avatar_proxy/v4/letter/c/8797f3/32.png) [@coco](https://community.blokas.io/u/coco)\
**Post date:** [November 21, 2019, 11:27am UTC](https://community.blokas.io/t/puredata-realtime/1414/1 "2019-11-21T11:27:41Z")

</div>

First, thank you blokas and the community around to make Patchbox available for free.

I was really waiting for a low latency kernel. I am actually using Pure Data on raspberry pi for a some years, and I get always stuck between the real time, and the timer on puredata , that makes all my “tempo” wrong when I play with sync audio files.

But even on the patchbox OS, when I started pd with -rt flag, I get this trouble :

 ![18](https://community.blokas.io/uploads/default/original/1X/c142e3c376ac65dddb32096b5d99ed854e567386.png) . The error is around 8%

Is puredata really running in real-time mode ? If no, how I can solve it.

Thanks

---

<div class="post-metadata">

**Author:** ![thetechnobear](https://community.blokas.io/user_avatar/community.blokas.io/thetechnobear/32/73_2.png) [@thetechnobear](https://community.blokas.io/u/thetechnobear)\
**Post date:** [November 22, 2019, 12:49pm UTC](https://community.blokas.io/t/puredata-realtime/1414/2 "2019-11-22T12:49:25Z")

</div>

i don’t know for sure, without doing some more tests,

but my assumption would be this is not a latency issue… not a thread priority issue  
timer is a logical time, so is supposed to match metro (to stop inconsistencies, it’ll also be cheaper ), whereas realtime is actual time (according to OS at least)  
Id suspect the difference is caused by metro bring done at ‘control rate’, so its a accuracy is determined by block size (and sample rate)

(its worth noting, that realtime is reporting under your stated require time, so pd is not having issues scheduling)

id suspect to be 100% accurate you’d have to do things like triggering at audio rate.

all that said, 40mS seems like quite a difference - but id need to check the SR and blocksize to see if its reasonable or not.

note: id also not be testing with the GUI running… id want to test this in console mode.

---

<div class="post-metadata">

**Author:** ![coco](https://community.blokas.io/letter_avatar_proxy/v4/letter/c/8797f3/32.png) [@coco](https://community.blokas.io/u/coco)\
**Post date:** [November 25, 2019, 5:00pm UTC](https://community.blokas.io/t/puredata-realtime/1414/3 "2019-11-25T17:00:03Z")

</div>

This test was made with PiSound , ALSA , 128 blocksize and 7ms of latency.

The problem I have is using Ableton Sync, that give me a tempo value. When I use this value in metro object, I am not in sync, so I have to multipliy this value from this coeff ( 1.089 ) . But this coef depend on the machine, the setup, and needs to be always updated … and this is not clean.

Do you want me to test without gui ? or with different sound parameter value ?

Thanks @thetechnobear
