hagioscopic
This commit is contained in:
parent
7a3805a4d9
commit
e92a2a00b8
3 changed files with 35 additions and 33 deletions
|
@ -9,9 +9,11 @@
|
||||||
;; Authors
|
;; Authors
|
||||||
;; - nik gaffney <nik@fo.am>
|
;; - nik gaffney <nik@fo.am>
|
||||||
|
|
||||||
|
(in-package :osc)
|
||||||
|
|
||||||
#+sbcl (require 'sb-bsd-sockets)
|
#+sbcl (require 'sb-bsd-sockets)
|
||||||
|
|
||||||
(defun osc-write ()
|
#+sbcl (defun osc-write ()
|
||||||
"a basic test function which sends various osc stuff on port 5555"
|
"a basic test function which sends various osc stuff on port 5555"
|
||||||
(let ((sock (sb-bsd-sockets::make-instance
|
(let ((sock (sb-bsd-sockets::make-instance
|
||||||
'inet-socket
|
'inet-socket
|
||||||
|
@ -146,8 +148,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defun osc-read (port)
|
#+sbcl (defun osc-read (port)
|
||||||
"a basic test function which attempts to decode osc stuff on port xc"
|
"a basic test function which attempts to decode osc stuff on PORT."
|
||||||
(let ((s (make-instance 'inet-socket
|
(let ((s (make-instance 'inet-socket
|
||||||
:type :datagram
|
:type :datagram
|
||||||
:protocol (get-protocol-by-name "udp")))
|
:protocol (get-protocol-by-name "udp")))
|
||||||
|
@ -159,7 +161,7 @@
|
||||||
(osc:decode-message buffer)
|
(osc:decode-message buffer)
|
||||||
))
|
))
|
||||||
|
|
||||||
;(osc-decode-message data)
|
;;(osc-decode-message data)
|
||||||
|
|
||||||
(defun osc-ft ()
|
(defun osc-ft ()
|
||||||
(and (eql (osc::DECODE-FLOAT32 #(63 84 32 93)) 0.8286188)
|
(and (eql (osc::DECODE-FLOAT32 #(63 84 32 93)) 0.8286188)
|
||||||
|
@ -189,8 +191,6 @@
|
||||||
(setf cons-msg (osc:decode-message packed-msg))
|
(setf cons-msg (osc:decode-message packed-msg))
|
||||||
(osc:encode-message (values-list cons-msg)))
|
(osc:encode-message (values-list cons-msg)))
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
|
|
||||||
#|
|
#|
|
||||||
sc3 server
|
sc3 server
|
||||||
|
@ -209,4 +209,5 @@ sc3 server
|
||||||
|
|
||||||
|#
|
|#
|
||||||
|
|
||||||
;; (osc-test)
|
(defun run-tests ()
|
||||||
|
(osc-test))
|
||||||
|
|
51
osc.asd
51
osc.asd
|
@ -3,29 +3,30 @@
|
||||||
(in-package #:cl-user)
|
(in-package #:cl-user)
|
||||||
|
|
||||||
(asdf:defsystem osc
|
(asdf:defsystem osc
|
||||||
:name "osc"
|
:name "osc"
|
||||||
:author "nik gaffney <nik@fo.am>"
|
:author "nik gaffney <nik@fo.am>"
|
||||||
:licence "GPL v3"
|
:licence "GPL v3"
|
||||||
:description "The Open Sound Control protocol aka OSC"
|
:description "The Open Sound Control protocol aka OSC"
|
||||||
:version "0.7"
|
:version "0.7"
|
||||||
|
:depends-on (:usocket)
|
||||||
|
:components
|
||||||
|
((:file "osc" :depends-on ("osc-data" "osc-time"))
|
||||||
|
(:file "osc-data" :depends-on ("package"))
|
||||||
|
(:file "osc-dispatch" :depends-on ("osc"))
|
||||||
|
(:file "osc-time" :depends-on ("package"))
|
||||||
|
(:file "package")
|
||||||
|
(:module "devices"
|
||||||
|
:depends-on ("package" "osc-data")
|
||||||
:components
|
:components
|
||||||
((:file "osc" :depends-on ("osc-data" "osc-time"))
|
((:file "socket-functions")
|
||||||
(:file "osc-data" :depends-on ("package"))
|
(:file "device")
|
||||||
(:file "osc-dispatch" :depends-on ("osc"))
|
(:file "transmitter"
|
||||||
(:file "osc-time" :depends-on ("package"))
|
:depends-on ("device"
|
||||||
(:file "package")
|
"socket-functions"))
|
||||||
(:module "devices"
|
(:file "listening-device"
|
||||||
:depends-on ("package" "osc-data")
|
:depends-on ("transmitter"))
|
||||||
:components
|
(:file "dispatching-device"
|
||||||
((:file "socket-functions")
|
:depends-on ("listening-device"))
|
||||||
(:file "device")
|
(:file "client"
|
||||||
(:file "transmitter"
|
:depends-on ("dispatching-device"))
|
||||||
:depends-on ("device"
|
(:file "server" :depends-on ("client"))))))
|
||||||
"socket-functions"))
|
|
||||||
(:file "listening-device"
|
|
||||||
:depends-on ("transmitter"))
|
|
||||||
(:file "dispatching-device"
|
|
||||||
:depends-on ("listening-device"))
|
|
||||||
(:file "client"
|
|
||||||
:depends-on ("dispatching-device"))
|
|
||||||
(:file "server" :depends-on ("client"))))))
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(defpackage :osc
|
(defpackage :osc
|
||||||
(:use #:cl #:usocket)
|
(:use :cl)
|
||||||
(:documentation "OSC, the 'Open Sound Control' protocol.")
|
(:documentation "OSC, the 'Open Sound Control' protocol.")
|
||||||
(:export
|
(:export
|
||||||
#:make-message
|
#:make-message
|
||||||
|
|
Loading…
Reference in a new issue