[haskell-art] hsc timing
Rohan Drape
rohan.drape at gmail.com
Mon Aug 4 03:05:28 BST 2008
hi alex,
apologies slow reply, the below applies to current darcs version.
http://slavepianos.org/rd/sw/hosc/Sound/OpenSoundControl/Time.hs
http://slavepianos.org/rd/sw/hosc/Sound/OpenSoundControl/OSC.hs
to read the current real valued utc time use 'utcr'.
to construct a time stamp from a real valued utc time use 'UTCr'.
to construct a time stamped osc message use 'Bundle'.
to send the message use 'send'.
to account for haskell runtime jitter and network latency forward
timestamp all messages by whatever 'offset' is required.
ie. along the lines of:
t <- utcr
let offset = 0.1
mkt n = UTCr (n + offset)
b = Bundle (mkt t) [s_new "test" 1 AddToTail (-1) []]
send fd b
for notes on changes since hosc-0.4 see:
http://lists.lurk.org/pipermail/haskell-art/2008-June/000137.html
perhaps see also the 'pause' and 'pauseUntil' functions.
kind regards,
rohan
More information about the haskell-art
mailing list