[PD] arduino-help.me.please.pd [gadlletas]

Hans-Christoph Steiner hans at eds.org
Wed May 31 11:50:15 CEST 2006


On May 30, 2006, at 9:02 AM, IOhannes m zmoelnig wrote:

> Hans-Christoph Steiner wrote:
>> To make Pd do this is message space, you could change the block  
>> size to a very small amount.  I wonder if this would work...
>
> no, i am pretty sure it won't work.
> 1st because pd's synchronous scheduling is (at lesat: used to be  
> when i last looked at it which is several versions ago) always at  
> 64samples. if you have 32samples block~sizes, then you will just  
> schedule 2 blocks each 64samples cycle. it is really the  
> dacblocksize that defines the minimum reaction time. some months or  
> years ago i posted a patch where you could set the dacblocksize at  
> runtime.
> 2nd because the message system is basically asynchronous.
>
> probably a good idea would be a [comport~] external.

[comport~] sounds intriguing actually, I think it might be useful for  
writing data at the full 115,200 bits/second (actually USB-serial  
goes up to 1.5 Mbps).  115,200 sends 14,400 bytes every second, so  
that means .07ms between bytes.  This is roughly comparable to 11k,  
8bit mono sound.

But there are other issues with serial communications.  We (with Dan  
Overholt, creator of the CUI http://www.create.ucsb.edu/~dano/CUI/)  
did some informal measurement using the attached patch and an Arduino  
set to echo any byte it receives.  We measured a response time  
between 0.5ms and 22ms, with an average around 12ms.  So basically  
there is a ton of jitter, a lot more than would seemingly be caused  
by the Pd messaging rate.

I have a question about implementing [comport~]: audio data is  
constantly running, yet generally, serial interfaces are used for  
event-based messaging.  Would it be possible to still send event  
messages via a tilde object?  Otherwise, you'd just have to use  
[comport~] to transmit state constantly.  But you would still need to  
be able to interleave different data chunks, so that you can use one  
[comport~] to control many outputs on an Arduino, for example.

Maybe we should also consider a [tcp~] and [udp~] for very low- 
latency/low jitter messaging?  Ethernet hardware has a latency of  
0.3ms or perhaps less, so Pd's ~1.5ms between messages is a fair  
amount higher than ethernet.

.hc

________________________________________________________________________ 
____

                     There is no way to peace, peace is the way.
						        				-A.J. Muste





More information about the Pd-list mailing list