Calculation Frame Size --\> Latency issues
Hi everybody,
I use PD as part of my PhD project. Since audio/haptic asynchronity is an issue I have to keep latency down. My test subjects have to press buttons and virutally instantly hear the sound they triggered. The sounds are stored in arrays and played back using tabplay~
I have just checked the delay between the press of a button and the resulting sound. The buttons are connected to my computer using a custom microcontroller board which is quite common at my university and send the trigger command to a PD comport object. The baud rate is set to 230400 bps and only one byte is needed as command. Latency of the entire button-microcontroller-serial output should be way below 1 ms.
For sound output I use a Lexicon Lambda USB interface at 96000 kHz and 5 ms latency.
When I monitor the delay between physical trigger and output I get latency times ranging from just under 10 ms to over 25 ms. More annoyingly, this latency is not stable but but changes every time I trigger.
Since my "hardware" latency should be just over 5 ms and PD adds up to 20 ms to this I assume PD interally processes things at a certain framerate which should be arround 50 Hz or 20 ms. Is it possible to increase this framerate in any way?
The system runs on Ubuntu Studio 8.04, it would be possible to switch another audio interface (RME Hammerfall).
Any ideas are greatly appreciated.
Alex
Midi devices
I am trying to write a patch to control ableton live with a monome 40h.
I have input device 1 in PD as 'from monome serial io' and output device 1 as 'IAC 1' (which in turn is set as the midi input for live), which works fine for controlling live with the monome.
I have midi output for live set as 'IAC 2' and input device 2 in PD as 'IAC 2' and the output as 'monome serial io'. I can not get the LEDs on the monome to react to live.
My question is how do i select different devices within PD. I can only get input and output device number 1 to work together.
I seem to remember that in MAX/MSP you can add the relevent letter (a, b or c etc) to the 'notein' object box to select the device. Can this be done in PD, if so how?
I know live is definatly giving out controller messages as I have -midinotefeedback- turned on and if I change the order of devices around in the midi settings I can light LEDs on the monome by moving sliders etc within live.
Good usb soundcard=shocking latency in PD
hardware = emu0404 usb2 soundcard/advent IntelCore2Duo 1.6, 1GB ram
software = latest emu asio drivers/puredata/midiyoke
problem is audio latency (not yet concerned about midi lag), in a 'full duplex' setup; i.e. realtime audio I/O
I have a very respectable 5-10ms full duplex latency in all other software environments (Ableton, Cubase, Audiomulch). The audio hardware entries I have in pd (via -listdev) are:
(0)microsoft mapper
(0)emu usb 0404
(1)asio emu usb 0404
selecting the first emu entry gives clear audio, but with>37ms delay; selecting the asio entry creates garbled audio (buffers overflowing?) at any setting.
Could any knowledgable soul suggest suitable startup flags to address this problem? I'd like to be able to use midiyoke at the same time, but it's not vital; I have a sneaking suspicion that midiyoke is at fault
thanks
Brendan