Liking cljdoc? Tell your friends :D

overtone.osc


in-osc-bundlecljmacro

(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.
raw docstring

in-unested-osc-bundlecljmacro

(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.
raw docstring

osc-bundleclj

(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.
raw docstring

osc-clientclj

(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
raw docstring

osc-closeclj

(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.
raw docstring

osc-debugclj

(osc-debug & [on-off])

osc-handleclj

(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:

* , ? [ ] { } 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.

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.
raw docstring

osc-handlersclj

(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.
raw docstring

osc-listenclj

(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).
raw docstring

osc-listenersclj

(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.
raw docstring

osc-msgclj

(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.
raw docstring

osc-nowclj

(osc-now)

Return the current time in milliseconds

Return the current time in milliseconds
raw docstring

osc-peerclj

(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.
raw docstring

osc-recvclj

(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.
raw docstring

osc-replyclj

(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.
raw docstring

osc-reply-msgclj

(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)
raw docstring

osc-rm-all-handlersclj

(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.
raw docstring

osc-rm-all-listenersclj

(osc-rm-all-listeners peer)

Remove all generic listeners associated with server

Remove all generic listeners associated with server
raw docstring

osc-rm-handlerclj

(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)
raw docstring

osc-rm-listenerclj

(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)
raw docstring

osc-sendclj

(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.
raw docstring

osc-send-bundleclj

(osc-send-bundle client bundle)

Send OSC bundle to client.

Send OSC bundle to client.
raw docstring

osc-send-msgclj

(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]})
raw docstring

osc-serverclj

(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.
raw docstring

osc-targetclj

(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.
raw docstring

without-osc-bundlecljmacro

(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.
raw docstring

zero-conf-offclj

(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.
raw docstring

zero-conf-onclj

(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.
raw docstring

zero-conf?clj

(zero-conf?)

Returns true if zeroconf is running, false otherwise.

Returns true if zeroconf is running, false otherwise.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close