Jump to content

sending OSC data to MAX


AM

Recommended Posts

dear all

 

i would like to send some specific data via OSC to MAX... 

i can send "something" to max 

 

(defparameter max '(127.0.0.1 7500)) ;; that works

 

SEND data to MAX

and i would like to send the following seq to MAX by OSC 

/player "12" 1.0 1.0 1.0
 

but how to do it / format it in OMPO?

 

;; data should be "113" 1 1. 25000  => but how to "format"? -> see the MAX form
;; ???
(send-osc-data (create-osc-thread "player" max) data)

 

/player is sended but not the rest of teh sequence 

 

 

here is a screenshot from MAX, it worked with an external library (in CCL) but i would like to do it "directly" in OPMO.

 

image.png.2deaaa5e3b4aa625c937276a06f1acff.png

 

in MAX, that's what i'm sending - for example - as an internal test

image.png.d9a5ac198ef987b42441476eed65129b.png

 

 

thanx for some help...!!

andré

Link to comment
Share on other sites

  • 2 months later...

here is the solution to send any data by OSC!

a big thanks to janusz who made it for me/us!! now a wide variety of externals can be controlled via OSC, in any format... (not only reaktor)

 

(defun osc-send (&rest args)
  (let*
      ((host #(127 0 0 1)) ;; host
       (port 7500) ;; port
       (s (usocket:socket-connect host port
                           :protocol :datagram
                           :element-type '(unsigned-byte 8)))
        (b (apply' osc:encode-message args)))
    (format t "sending to ~a on port ~A~%~%" host port)
    (unwind-protect
         (usocket:socket-send s b (length b))
      (when s (usocket:socket-close s)))))

(osc-send  "/player" "120" 1 1 1)
(osc-send "/beat" "defer" 0 "duration" 1 "pattern" 12)

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy