hagioscopic

This commit is contained in:
nik gaffney 2022-09-29 10:37:26 +02:00
parent 7a3805a4d9
commit e92a2a00b8
Signed by: nik
GPG key ID: 989F5E6EDB478160
3 changed files with 35 additions and 33 deletions

View file

@ -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))

View file

@ -8,6 +8,7 @@
: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 :components
((:file "osc" :depends-on ("osc-data" "osc-time")) ((:file "osc" :depends-on ("osc-data" "osc-time"))
(:file "osc-data" :depends-on ("package")) (:file "osc-data" :depends-on ("package"))

View file

@ -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