server for my socketmusic project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
default-page
src/socketmusic
LICENSE.txt
README.md
package-lock.json
package.json
shadow-cljs.edn

README.md

socketmusic-server v0.01

server for the socketmusic series of projects (such as socketMusic:wireless)

about

abstracting out the server from my previous socketmusic:wireless project and moving to a new build system of ClojureScript compiled by shadow-cljs to run on node.js

  • to install shadow-cljs: npm install -g shadow-cljs

npm dependencies

  • express
  • socket.io
  • node-osc

usage

  • hosted osc server is at port 33333
  • outgoing osc messages are on port 11111
  • website is hosted on port 3000
  • the root directory of the hosted website is passed as the first arg
    • defaults to default-page/ folder
  • running the app: node socketmusic.js [webpage dir]

osc-messages

format for osc messages sent to the osc server

  • /debug [args] prints the args to the console
  • /client-list sends out base64 client list on osc output port on address /client-list
  • /num-clients sends the number of clients on osc output port on address /num-clients
  • /ws/all [event-name] [opt. args] broadcasts named event with args bundled in array format to all clients
  • /ws/client-idx [client-idx] [event-name] [opt. args] - trigger named event with args bundled in array format to client at given index of client-list
  • /ws/client [client] [event-name] [opt. args] - trigger named event with args bundled in array format to specified (in base64) client
  • /ws/rand-client [event-name] [opt. args] - trigger named event with args bundled in array format to random client

build

  • compile: shadow-cljs compile app
  • watch: shadow-cljs watch app
  • build: shadow-cljs build app

license

gpl v3