(in-osc-bundle client timestamp & body)
Runs body and intercepts any inner calls to osc-send-msg and instead of sending the OSC message, aggregates them and wraps them in an OSC bundle. When the body has finished, the bundle is then sent with the associated timestamp to the client. Handles nested calls to in-osc-bundle - resulting in a nested set of bundles.
Runs body and intercepts any inner calls to osc-send-msg and instead of sending the OSC message, aggregates them and wraps them in an OSC bundle. When the body has finished, the bundle is then sent with the associated timestamp to the client. Handles nested calls to in-osc-bundle - resulting in a nested set of bundles.
(in-unested-osc-bundle client timestamp & body)
Runs body and intercepts any inner calls to osc-send-msg and instead of sending the OSC message, aggregates them and wraps them in an OSC bundle. When the body has finished, the bundle is then sent with the associated timestamp to the client.
Does not nest OSC bundles, it sends all completed OSC bundles immediately.
Runs body and intercepts any inner calls to osc-send-msg and instead of sending the OSC message, aggregates them and wraps them in an OSC bundle. When the body has finished, the bundle is then sent with the associated timestamp to the client. Does not nest OSC bundles, it sends all completed OSC bundles immediately.
(osc-bundle timestamp & items)
Returns an OSC bundle, which is a timestamped set of OSC messages and/or bundles.
Returns an OSC bundle, which is a timestamped set of OSC messages and/or bundles.
(osc-client host port)
(osc-client host port send-nested-osc-bundles?)
Returns an OSC client ready to communicate with a host on a given port via UDP
Returns an OSC client ready to communicate with a host on a given port via UDP
(osc-close peer & wait)
Close an osc-peer, works for both clients and servers. If peer has been registered with zeroconf, it will automatically remove it.
Close an osc-peer, works for both clients and servers. If peer has been registered with zeroconf, it will automatically remove it.
(osc-debug & [on-off])
(osc-handle peer path handler)
Add a handle fn (a method in OSC parlance) to the specified OSC path (container). This handle will be called when an incoming OSC message matches the supplied path. This may either be a direct match, or a pattern match if the incoming OSC message uses wild card chars in its path. The path you specify may not contain any of the OSC reserved chars:
Will override and remove any handler already associated with the supplied path. If the handler-fn returns :done it will automatically remove itself.
Add a handle fn (a method in OSC parlance) to the specified OSC path (container). This handle will be called when an incoming OSC message matches the supplied path. This may either be a direct match, or a pattern match if the incoming OSC message uses wild card chars in its path. The path you specify may not contain any of the OSC reserved chars: # * , ? [ ] { } and whitespace Will override and remove any handler already associated with the supplied path. If the handler-fn returns :done it will automatically remove itself.
(osc-handlers peer)
(osc-handlers peer path)
Returns a seq of all the paths containing a handler for the server. If a path is specified, the result will be scoped within that subtree.
Returns a seq of all the paths containing a handler for the server. If a path is specified, the result will be scoped within that subtree.
(osc-listen peer listener)
(osc-listen peer listener key)
Attach a generic listener function that will be called with every incoming osc message. An optional key allows you to specifically refer to this listener at a later point in time. If no key is passed, the listener itself will also serve as the key.
(osc-listen s (fn [msg] (println "listener: " msg)) :foo).
Attach a generic listener function that will be called with every incoming osc message. An optional key allows you to specifically refer to this listener at a later point in time. If no key is passed, the listener itself will also serve as the key. (osc-listen s (fn [msg] (println "listener: " msg)) :foo).
(osc-listeners peer)
Return a seq of the keys of all registered listeners. This may be the listener fns themselves if no key was explicitly specified when the listener was registered.
Return a seq of the keys of all registered listeners. This may be the listener fns themselves if no key was explicitly specified when the listener was registered.
(osc-msg path & args)
Returns a map representing an OSC message with the specified path and args.
Returns a map representing an OSC message with the specified path and args.
(osc-now)
Return the current time in milliseconds
Return the current time in milliseconds
(osc-peer)
(osc-peer listen? send-nested-osc-bundles?)
Returns a generic OSC peer. You will need to configure it to make it act either as a server or client.
Returns a generic OSC peer. You will need to configure it to make it act either as a server or client.
(osc-recv peer path handler & [timeout])
Register a one-shot handler which will remove itself once called. If a timeout is specified, it will return nil if a message matching the path is not received within timeout milliseconds. Otherwise, it will block the current thread until a message has been received.
Will override and remove any handler already associated with the supplied path.
Register a one-shot handler which will remove itself once called. If a timeout is specified, it will return nil if a message matching the path is not received within timeout milliseconds. Otherwise, it will block the current thread until a message has been received. Will override and remove any handler already associated with the supplied path.
(osc-reply peer msg-to-reply-to path & args)
Similar to osc-send except ignores the peer's target address and instead sends the OSC message to the sender of msg-to-reply-to. It is not currently possible to implicitly build OSC bundles as a reply to an OSC msg.
Similar to osc-send except ignores the peer's target address and instead sends the OSC message to the sender of msg-to-reply-to. It is not currently possible to implicitly build OSC bundles as a reply to an OSC msg.
(osc-reply-msg peer msg msg-to-reply-to)
Send OSC msg to peer as a reply.
(osc-reply-msg client {:path "foo" :type-tag "i" :args [42]} prev-msg)
Send OSC msg to peer as a reply. (osc-reply-msg client {:path "foo" :type-tag "i" :args [42]} prev-msg)
(osc-rm-all-handlers peer)
(osc-rm-all-handlers peer path)
Remove all registered handlers for the supplied path (defaulting to /) This not only removes the handler associated with the specified path but also all handlers further down in the path tree. i.e. if handlers have been registered for both /foo/bar and /foo/bar/baz and osc-rm-all-handlers is called with /foo/bar, then the handlers associated with both /foo/bar and /foo/bar/baz will be removed.
Remove all registered handlers for the supplied path (defaulting to /) This not only removes the handler associated with the specified path but also all handlers further down in the path tree. i.e. if handlers have been registered for both /foo/bar and /foo/bar/baz and osc-rm-all-handlers is called with /foo/bar, then the handlers associated with both /foo/bar and /foo/bar/baz will be removed.
(osc-rm-all-listeners peer)
Remove all generic listeners associated with server
Remove all generic listeners associated with server
(osc-rm-handler peer path)
Remove the handler at the specified path. specific handler (if found)
Remove the handler at the specified path. specific handler (if found)
(osc-rm-listener peer key)
Remove the generic listener associated with the specific key (osc-rm-listener s :foo)
Remove the generic listener associated with the specific key (osc-rm-listener s :foo)
(osc-send client path & args)
Creates an OSC message and either sends it to the server immediately or if a bundle is currently being formed it adds it to the list of messages.
Creates an OSC message and either sends it to the server immediately or if a bundle is currently being formed it adds it to the list of messages.
(osc-send-bundle client bundle)
Send OSC bundle to client.
Send OSC bundle to client.
(osc-send-msg peer msg)
Send OSC msg to peer.
(osc-send-msg client {:path "foo" :type-tag "i" :args [42]})
Send OSC msg to peer. (osc-send-msg client {:path "foo" :type-tag "i" :args [42]})
(osc-server port)
(osc-server port zero-conf-name)
(osc-server port zero-conf-name send-nested-osc-bundles?)
Returns a live OSC server ready to register handler functions. By default this also registers the server with zeroconf. The name used to register can be passed as an optional param. If the zero-conf-name is set to nil zeroconf wont' be used.
Returns a live OSC server ready to register handler functions. By default this also registers the server with zeroconf. The name used to register can be passed as an optional param. If the zero-conf-name is set to nil zeroconf wont' be used.
(osc-target client host port)
Update the target address of an OSC client so future calls to osc-send will go to a new destination. Automatically updates zeroconf if necessary.
Update the target address of an OSC client so future calls to osc-send will go to a new destination. Automatically updates zeroconf if necessary.
(without-osc-bundle & body)
Runs body and ensures that any inner calls to osc-send-msg are sent immediately. This is useful in the rare case you need to bypass the bundling of OSC messages when code may be wrapped within in-osc-bundle.
Runs body and ensures that any inner calls to osc-send-msg are sent immediately. This is useful in the rare case you need to bypass the bundling of OSC messages when code may be wrapped within in-osc-bundle.
(zero-conf-off)
Turn zeroconf off. Will unregister all registered services and close zeroconf down. Asynchronous.
Turn zeroconf off. Will unregister all registered services and close zeroconf down. Asynchronous.
(zero-conf-on)
Turn zeroconf on. Will automatically register all running servers with their specified service names (defaulting to "osc-clj" if none was specified). Asynchronous.
Turn zeroconf on. Will automatically register all running servers with their specified service names (defaulting to "osc-clj" if none was specified). Asynchronous.
(zero-conf?)
Returns true if zeroconf is running, false otherwise.
Returns true if zeroconf is running, false otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close