PDA

View Full Version : Reporting events with greater precision than console log



alfredyu
01-03-2011, 10:04 PM
Hello,

I'm setting up Osculator to record data from a Wiimote during a psychology experiment. I've tried console logging, but that way I can only get a timestamp with a precision of one second. Is there any way to have data logged to a file, perhaps, with timestamps in milliseconds?

(At the moment I'm not particularly concerned about jitter, drift, and so on. I'd just like to be able to measure the time elapsed between events that happen within approximately 3 seconds of one another.)

Thanks,
Alfred

camille
01-03-2011, 10:16 PM
Hi Alfred,

If you are a little bit familiar with the Terminal, you can launch OSCulator from the Terminal, and copy the output to a file (or directly record the output to a file).
Considering OSCulator is installed in the /Applications folder, here is the command you need to type in order to launch the executable:


/Applications/OSCulator\ ƒ/OSCulator.app/Contents/MacOS/OSCulator

You can then use "Console Log" / "Simple Log" events in order to output the results to the Terminal. For example, using this technique with the X axis of the wacom tablet gives :


2011-01-03 21:14:17.307 OSCulator[5348:903] /wacom/1/puck/0 [0: x]: 0.475780
2011-01-03 21:14:17.314 OSCulator[5348:903] /wacom/1/puck/0 [0: x]: 0.478640
2011-01-03 21:14:17.318 OSCulator[5348:903] /wacom/1/puck/0 [0: x]: 0.481290


Which as you can see gives you very precise timestamps, refreshed in real-time.

Also, here is a little introduction to the Terminal in case you don't know at all how to use it:
http://macapper.com/2007/03/08/the-terminal-an-introduction/


Best Regards,
Cam

alfredyu
09-16-2011, 01:39 AM
Hi Camille,

I've been happily using this console logging technique in version 2.10.7.1. But I noticed that in beta20 the data are reported with less precision (only out to 2 decimal places, instead of 6). Is there some way to re-enable the higher precision console logging?

Thanks,
Alfred

camille
09-16-2011, 10:41 AM
Hi Alfred,

Thank you for reporting this issue!
When sending a float argument as a string in a OSC message, the value is truncated to 2 characters of precision. This affected pretty printing of OSC messages, and now printing has full precision again.

I will release a new beta with the fix, but only when I have enough changes, so I'd suggest you ping me with an email and I'll send you the updated build.


Best,
Cam