my_osc_send   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/core/osc_101.xtm

Implementation

;; my native message sender
;; NOTE osc-strings must be padded to 32bit multiples
(bind-func my_osc_send
  (lambda (address a:float b:i32)
    (let ((types ",fi")
          (mod (modulo (+ (strlen address) 1) 4))
          (addressl (+ (+ (strlen address) 1)
                       (if (= 0 mod) 0 (- 4 mod))))
          (typesl 4)
          (length (+ addressl typesl 4 4))
          (data (malloc length))
          (args (bitcast (pref-ptr data (+ addressl typesl)) i32*)))
      (printf "addy length %d:%d:%d\n" (strlen address) addressl (- 4 (modulo (+ (strlen address) 1) 4)))
      (strcpy (pref-ptr data 0) address)
      (strcpy (pref-ptr data addressl) types)
      (pset! args 0 (swap32f a))
      (pset! args 1 (swap32i b))
      (llvm_send_udp "localhost" 7020 data (i64toi32 length)))))


Back to Index

Similar Entries

  • MyLittleCleanupTest    xtlang
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_FRQ    scheme
  • PARAM_OSC1_FRQ    scheme
  • PARAM_OSC1_FRQ    scheme
  • PARAM_OSC1_PAN    scheme
  • PARAM_OSC1_PHASE    scheme
  • PARAM_OSC1_PW    scheme
  • PARAM_OSC1_PW    scheme
  • PARAM_OSC1_PW    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_FRQ    scheme
  • PARAM_OSC2_FRQ    scheme
  • PARAM_OSC2_FRQ    scheme
  • PARAM_OSC2_PAN    scheme
  • PARAM_OSC2_PHASE    scheme
  • PARAM_OSC2_PW    scheme
  • PARAM_OSC2_PW    scheme
  • PARAM_OSC2_PW    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC3_FRQ    scheme
  • PARAM_OSC3_FRQ    scheme
  • PARAM_OSC3_PAN    scheme
  • PARAM_OSC3_PHASE    scheme
  • PARAM_OSC3_PW    scheme
  • PARAM_OSC3_PW    scheme
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_FRQ    scheme
  • PARAM_OSC4_FRQ    scheme
  • PARAM_OSC4_PAN    scheme
  • PARAM_OSC4_PHASE    scheme
  • PARAM_OSC4_PW    scheme
  • PARAM_OSC4_PW    scheme
  • cerberus_osc1_cc    xtlang
  • cerberus_osc2_cc    xtlang
  • cerberus_osc3_cc    xtlang
  • cerberus_osc4_cc    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc1_phase    xtlang
  • dl_osc1_phase    xtlang
  • dl_osc1_pitch    xtlang
  • dl_osc1_pitch    xtlang
  • dl_osc1_pw    xtlang
  • dl_osc1_pw    xtlang
  • dl_osc2_amp    xtlang
  • dl_osc2_amp    xtlang
  • dl_osc2_phase    xtlang
  • dl_osc2_phase    xtlang
  • dl_osc2_pitch    xtlang
  • dl_osc2_pitch    xtlang
  • dl_osc2_pw    xtlang
  • dl_osc2_pw    xtlang
  • init-osc-vars    xtlang
  • io:osc:receive    scheme
  • io:osc:send    scheme
  • my-gl-loop    xtlang
  • my-inc-maker    xtlang
  • my-inc-maker-wrapper    xtlang
  • my-inc-test    xtlang
  • my-test-1    xtlang
  • my-test-1    xtlang
  • my-test-10    xtlang
  • my-test-11    xtlang
  • my-test-12    xtlang
  • my-test-13    xtlang
  • my-test-1f    xtlang
  • my-test-2    xtlang
  • my-test-3    xtlang
  • my-test-4    xtlang
  • my-test-6    xtlang
  • my-test-7    xtlang
  • my-test-8    xtlang
  • my-test-9    xtlang
  • my-test14    xtlang
  • my-test15    xtlang
  • my-test16    xtlang
  • my-test17    xtlang
  • my-test18    xtlang
  • my-test19    xtlang
  • my-test20    xtlang
  • my-test25    xtlang
  • my-test26    xtlang
  • my-test27    xtlang
  • my-test28    xtlang
  • my-test29    xtlang
  • my-tuple-chk    scheme
  • my_button_cb    xtlang
  • my_checkbox_cb    xtlang
  • my_radio_cb    xtlang
  • my_simple_fm_inst    xtlang
  • my_slider2D_cb    xtlang
  • my_slider_cb    xtlang
  • myf    scheme
  • myf    scheme
  • myprint    xtlang
  • myprint    xtlang
  • myprint    xtlang
  • nnsock_set_send_timeout    xtlang
  • osc    xtlang
  • osc    xtlang
  • osc    xtlang
  • osc    xtlang
  • osc    xtlang
  • osc-receive-7009    scheme
  • osc-receive-7019    scheme
  • osc1_cc    xtlang
  • osc2_cc    xtlang
  • osc3_cc    xtlang
  • osc4_cc    xtlang
  • oscXAnalogue_c    xtlang
  • osc_c    xtlang
  • osc_receive_7020    xtlang
  • osc_send_one_double    xtlang
  • osc_send_two_double    xtlang
  • oscv_c    xtlang
  • oscv_mc_c    xtlang
  • pm_send    xtlang
  • rtmidi_send    xtlang
  • send-fluid-column-osc    xtlang
  • send-fluid-first-column-osc    xtlang
  • send-fluid-first-row-osc    xtlang
  • send-fluid-last-row-osc    xtlang
  • send-fluid-row-osc    xtlang
  • send-midi-cc    scheme
  • send-skel    scheme
  • send-skeleton-osc    xtlang
  • send_outgoing_walkers    xtlang
  • send_process_message    xtlang
  • send_request    xtlang
  • send_response    xtlang
  • send_response    xtlang
  • send_survey    xtlang
  • sender    xtlang
  • sender    xtlang
  • set_dl_osc    xtlang
  • set_osc    xtlang