Mercurial > hg > beaglert
view resources/osc/node_modules/osc-min/examples/printosc.coffee @ 342:860c42b3830e prerelease
Updated basic_libpd, now slightly more efficient with less memory operations. Requires the API change in libpd operated in libpd:99a2be8
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 06 Jun 2016 12:21:38 +0100 |
parents | fb9c28a4676b |
children |
line wrap: on
line source
osc = require 'osc-min' udp = require "dgram" if process.argv[2]? inport = parseInt process.argv[2] else inport = 41234 console.log "OSC listener running at http://localhost:" + inport `//~verbatim:examples[0]~ //### A simple OSC printer` sock = udp.createSocket "udp4", (msg, rinfo) -> try console.log osc.fromBuffer msg catch error console.log "invalid OSC packet" sock.bind inport