Giter Club home page Giter Club logo

osc's Introduction


. .,, ;:

<



.,

๐Ÿ‘โ€๐Ÿ—จ

.//////.,, ;:

๐Ÿฆ‘ โ‡

osc's People

Contributors

boqs avatar byulparan avatar erikronstrom avatar puercopop avatar zzkt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

osc's Issues

various tests

would be useful to include some more structured testing and look more closely at protocol coverage (or deviation)

Some systems failed to build for Quicklisp dist

Building with SBCL 2.2.7.28-02bc916fd / ASDF 3.3.5 for quicklisp dist creation.

Trying to build commit id e46e9b1

osc fails to build with the following error:

Unhandled PACKAGE-DOES-NOT-EXIST in thread #<SB-THREAD:THREAD "main thread" RUNNING {10016C8003}>: The name "SB-BSD-SOCKETS" does not designate any package.

Full log here

does not work anymore with ECL

Hi,

Since commit 829bf7c on the 24th of august, the library does load anymore in ECL using quicklisp

It seems to be connected to SB libraries

quicklisp/local-projects/osc/devices/socket-functions.lisp" 0x55b0e2262aa0>, position 1958:
;;; Cannot find the external symbol NOT-CONNECTED-ERROR in #<"SB-BSD-SOCKETS" package>

OR

;;; Internal error:
;;; ** There is no package with the name SB-EXT.

coming back to 652a10d fixes the issue

refactor & unfork as required

Since there have been a few issues (e.g. #14 and #15) and various complications with the inclusion of the devices interface, I think it could make sense to refactor into "core" and "extras" libraries.

The original intent was to keep the OSC protocol encoding/decoding relatively simple and contained to a single file if possible. The networking layer could be independent. I still think can work, so I've reverted and/or refactored with this in mind.

The core library will remain here and the other-than-core can be found at or near https://github.com/zzkt/osc-devices

core features

  • simple functional style interface
  • complete protocol coverage
  • compatibility with supercollider and pd (at least)
  • runs on as many CL implementations as possible
  • reasonable error handling & reporting

non-core features

  • networking API (c.f. liblo or devices)
  • introspection and/or reflection
  • etc

Error while run examples

;; osc-examples.lisp

(osc-examples::osc-send-test #(127 0 0 1) 6668)

The function OSC:ENCODE-MESSAGE is undefined.
   [Condition of type UNDEFINED-FUNCTION]
;; osc-device-examples.lisp

(defparameter *osc-server* (make-osc-server :protocol :udp
                                            :debug-mode t))

(boot *osc-server* 57127)

There is no class named OSC::INET-SOCKET.
   [Condition of type SB-PCL:CLASS-NOT-FOUND-ERROR]

I tested on macOS(12.6.1) / SBCL(2.2.10.32-eefe83e36) / OSC(osc-20221106-git from quicklisp).
Thanks for works!

Double floats doesn't work correctly

encode-data checks for float (using typecase), and encodes it using encode-float32. However, if a double float is passed to encode-data, it will also match the float clause and will be encoded as a single-float.

Depending on the implementation, this may give the correct result, throw an error, or silently fail with the wrong result. (That's what happened to me)

A simple fix would be to change the typecond clause in encode-data (and encode-typetags) from float to single-float. This could later be complemented by a check for double-float, calling encode-float64.

Another possible simple fix would be to coerce the value to a single-float before passing it to encode-float32.

version 1.0

Seems like ~20 years should be long enough for version 0.x (fist commit was circa 2004) so perhaps time for a slightly significant increment...

error on decode-int32

I met this error

(ql:quickload :osc)
(osc::decode-float32 #(127 255 255 255))

get error below

The value
-2147483649
is not of type
(SIGNED-BYTE 32)
[Condition of type TYPE-ERROR]

It seems wrong covert on osc::decode-int32.
(osc::decode-int32 (osc::encode-int32 2147483647)) ;; result is -2147483649

I think correct value of (osc::decode-int32 #(127 255 255 255)) is 2147483647

I test it other language and I got 2147483647.

;;; guile
(bytevector->sint-list
 (uint-list->bytevector '(127 255 255 255) (endianness big) 1)
 (endianness big) 4)
#include <stdio.h>
#include <string.h>

int main(int argc, char** argv) {

  char bv[4] = {127, 255, 255, 255};
  int result;
  memcpy(&result, bv, sizeof(result));

  printf("decode value: %d\n", htonl(result));
  
  return 0;  
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.