[Haskell-cafe] How to send a string somewhere via UDP

Jeffrey Brown jeffbrown.the at gmail.com
Wed Oct 22 03:07:22 UTC 2014


Rohan, that worked! And the timing is, to the extent my perception can
tell, perfect! (I'm using threadDelay to create a rhythm, as described here
<http://haskell.1045720.n5.nabble.com/Precise-timing-td5758272.html>.)

This means I can use Haskell instead of Python or SuperCollider. I am
beside myself with excitement.


On Tue, Oct 21, 2014 at 3:56 PM, Rohan Drape <rohan.drape at gmail.com> wrote:

> > aiosc.send(('127.0.0.1', 9000), "This is a message from Python") )
>
> isn't this sending an OSC packet?  not a plain UDP packet?
>
> perhaps see http://hackage.haskell.org/package/hosc
>
> import Sound.OSC
> withMax = withTransport (openUDP "127.0.0.1" 9000)
> main = withMax (sendMessage (Message "/this-is-a-message-from-haskell" []))
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141021/a1173d5f/attachment.html>


More information about the Haskell-Cafe mailing list