module Sound.Conductive.ClockListener where
import Sound.Conductive.ClockDisplay
import Graphics.Vty
import Sound.OpenSoundControl
stringDatum :: OSC -> String
stringDatum (Message x [String ys]) = ys
receiveLoop :: UDP -> Graphics.Vty.Vty -> IO b
receiveLoop server vty = do
osc <- recvFrom server
update vty $ pic_for_image $ string def_attr $ stringDatum $ fst osc
receiveLoop server vty
listener :: Int -> Graphics.Vty.Vty -> IO b
listener port vty = do
s <- udpServer "127.0.0.1" port
receiveLoop s vty