l@271: osc = require 'osc-min' l@271: udp = require "dgram" l@271: l@271: if process.argv[2]? l@271: inport = parseInt process.argv[2] l@271: else l@271: inport = 41234 l@271: l@271: console.log "OSC listener running at http://localhost:" + inport l@271: l@271: `//~verbatim:examples[0]~ l@271: //### A simple OSC printer` l@271: sock = udp.createSocket "udp4", (msg, rinfo) -> l@271: try l@271: console.log osc.fromBuffer msg l@271: catch error l@271: console.log "invalid OSC packet" l@271: sock.bind inport