Forums > MaxMSP

latency, resolution and SR figures

September 3, 2013 | 1:46 am

Hi all
I would like to include some real-world technical data in a report about my new (Arduino-Max based) DMI, relating to latency, sampling rate and resolution. I have some theoretical numbers and it’s likely that there are some holes in my calculations, so if someone (and for some reason the name Steven Miller just leapt into my head) could review the following it would be really helpful:

Arduino samples the analog inputs at 10kHz – this number can effectively be ignored as we are converting to bytes and sending at a fixed baudrate;

At a baudrate of 19200 we can optimally send 2400 bytes per second; as I am sending 16bytes continuously using a call-and-response algorithm, this translates to a "sampling rate" of ~150Hz [(1000./(16/2.4)) = 149.925], per 16-byte "chunk".

I recall reading (somewhere?) that it is of no benefit to poll the [serial] object faster than this approximate data transfer rate, so should my [qmetro] be running at >= 6.67ms?

So, my real-world figures are 8-bit resolution and 150Hz SR with c. 6.67ms latency? (Not exactly in the realm of Randy Jones, I know). I’m conveniently ignoring the inherent physical latency of contact and sensor materials etc.

Many thanks for looking
Brendan


September 3, 2013 | 1:50 am

. . . and I realise 10-bit resolution is possible, but this doubles the number of bytes being sent – high byte and low byte for each reading.

B


September 6, 2013 | 8:00 am

. . .and while I’m here (ahhemm)

bump

perhaps re-phrasing will generate responses: every interactive system is different, or rather, there are different factors influencing a benchmark of total overall latency. Where should I be looking to determine such a figure, in my own system?

That system being: 16 DIY FSRs -> Arduino Mega 2560 (IDE 1.0.5) -> [serial] in Max 6.1.2; Intel i5 @2.5GHz. Gibson SG Standard (White, with coil taps) and an 11yr old Mitsubishi Carisma

Ta ta


September 6, 2013 | 3:54 pm

I think getting off serial/metro would be good, as mentioned in the other thread.

Coming in as 10bit is also important. What’s speed without resolution? You can just come in half as fast and interpolate the difference then.

Also worth looking at the USB/serial connection itself. Apparently not all serial connects are made equally!

http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html

(relatedly, I just bought a teensy to use for MIDI over USB)


September 6, 2013 | 4:04 pm

Thanks for the link; I’m not actually pursuing optimal speed/resolution just at the moment, really only need an idea of where to look for those figures in the given system. The x-OSC board you linked to in my other thread look very attractive!

Not really sure why I’m currently obsessing about numbers though. . . it’s late . . .


Viewing 5 posts - 1 through 5 (of 5 total)