<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Python-rtmidi, pyext]]></title><description><![CDATA[<p>Hi,<br />
I had some problems with midi on raspberry pi and made an external with pyext to get midi in and out on an alternative way for troubleshooting. I did this to learn some more python, also.<br />
To my surprise some irregular audio i/o warnings and clicks i had before did not show up using this externals anymore.( closed any midi connections in the pd-midi dialogue.)<br />
I got curious and measured hardware midi roundtrip latency using the timer-object. Compared with pd's alsa-midi and oss-midi it is much faster.<br />
I read somewhere pd's midi is somehow synced to the audiobuffersize, perhaps this is the reason midi is faster via python(?)<br />
The script relies on the python-rtmidi library<br />
<a href="https://pypi.python.org/pypi/python-rtmidi" rel="nofollow">https://pypi.python.org/pypi/python-rtmidi</a><br />
(rtmidi is a C++-library)<br />
You need pyext installed in pd's startup-folder to use it within pd:<br />
<a href="http://grrrr.org/research/software/py/" rel="nofollow">http://grrrr.org/research/software/py/</a><br />
I attached the script (needs to be in the pd-path) and a pd patch to demonstrate and test it.<br />
On my Raspberry Pi i measured usually 2.3ms lateny using rtmidi (min. 1.3, max 4ms) and ~5.3ms using pd's alsa-midi and the built-in objects (min 4, max 6.6), running headless with no gui, audiobuffersize 6.</p>
<p>Tested with Raspbian wheezy, pd-extended 0.43.4, python 2.7.3, pyext 0.2.2<br />
I'm learning python, suggestions welcome<br />
Jens</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/rtpyio.zip" rel="nofollow">http://www.pdpatchrepo.info/hurleur/rtpyio.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 06:28:27 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/8144.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Feb 2014 00:14:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python-rtmidi, pyext on Mon, 24 Feb 2014 00:14:27 GMT]]></title><description><![CDATA[<p>Hi,<br />
I had some problems with midi on raspberry pi and made an external with pyext to get midi in and out on an alternative way for troubleshooting. I did this to learn some more python, also.<br />
To my surprise some irregular audio i/o warnings and clicks i had before did not show up using this externals anymore.( closed any midi connections in the pd-midi dialogue.)<br />
I got curious and measured hardware midi roundtrip latency using the timer-object. Compared with pd's alsa-midi and oss-midi it is much faster.<br />
I read somewhere pd's midi is somehow synced to the audiobuffersize, perhaps this is the reason midi is faster via python(?)<br />
The script relies on the python-rtmidi library<br />
<a href="https://pypi.python.org/pypi/python-rtmidi" rel="nofollow">https://pypi.python.org/pypi/python-rtmidi</a><br />
(rtmidi is a C++-library)<br />
You need pyext installed in pd's startup-folder to use it within pd:<br />
<a href="http://grrrr.org/research/software/py/" rel="nofollow">http://grrrr.org/research/software/py/</a><br />
I attached the script (needs to be in the pd-path) and a pd patch to demonstrate and test it.<br />
On my Raspberry Pi i measured usually 2.3ms lateny using rtmidi (min. 1.3, max 4ms) and ~5.3ms using pd's alsa-midi and the built-in objects (min 4, max 6.6), running headless with no gui, audiobuffersize 6.</p>
<p>Tested with Raspbian wheezy, pd-extended 0.43.4, python 2.7.3, pyext 0.2.2<br />
I'm learning python, suggestions welcome<br />
Jens</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/rtpyio.zip" rel="nofollow">http://www.pdpatchrepo.info/hurleur/rtpyio.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext</guid><dc:creator><![CDATA[royal_orchestra]]></dc:creator><pubDate>Mon, 24 Feb 2014 00:14:27 GMT</pubDate></item><item><title><![CDATA[Reply to Python-rtmidi, pyext on Mon, 24 Feb 2014 13:19:39 GMT]]></title><description><![CDATA[<p>Here is the pyext build i made on my raspberry pi. If you don't want to compile pyext for raspberry by yourself, you could try it first.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/py.pd_linux" rel="nofollow">http://www.pdpatchrepo.info/hurleur/py.pd_linux</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/2</guid><dc:creator><![CDATA[royal_orchestra]]></dc:creator><pubDate>Mon, 24 Feb 2014 13:19:39 GMT</pubDate></item><item><title><![CDATA[Reply to Python-rtmidi, pyext on Tue, 17 Jun 2014 22:34:53 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I tried your compiled object, pd finds the object and then throws:<br />
&quot;./py.pd_linux cannot open shared object file: No such file or directory&quot;</p>
<p>Do you know what can be happening? Thanks</p>
<p>Ric</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/3</guid><dc:creator><![CDATA[rduenas]]></dc:creator><pubDate>Tue, 17 Jun 2014 22:34:53 GMT</pubDate></item><item><title><![CDATA[Reply to Python-rtmidi, pyext on Mon, 03 Nov 2014 13:58:23 GMT]]></title><description><![CDATA[<p>Sorry, I don't know...<br />
pd can't use the external above on other hardware than RPi.<br />
If your on RPi, it should work, when you put it in the startup- folder. | import py | tends to crash pd.<br />
General Documentation and example patches / scripts for pyext can be found here:<br />
<a href="http://grrrr.org/research/software/py/" rel="nofollow">http://grrrr.org/research/software/py/</a><br />
Perhaps a path is different on our RPis?<br />
I think you should try to compile it on your RPi, then.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8144/python-rtmidi-pyext/4</guid><dc:creator><![CDATA[royal_orchestra]]></dc:creator><pubDate>Mon, 03 Nov 2014 13:58:23 GMT</pubDate></item></channel></rss>