rtmidi_process_message   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/rtmidi.xtm

Implementation

;; an xtlang function which will "pull" the next incoming midi message (if there
;; is one) and then change the pitch of an oscillator
(bind-func rtmidi_process_message
  (let ((type:i8 0) (chan:i8 0) (a:i8 0) (b:i8 0)
        (left:i8 1) (right:i8 2)
        (message:i8* (alloc 1024))
        (size:i64* (alloc)))
    (lambda (dev:RtMidiInPtr)
      (rtmidi_in_get_message dev message size)
      (set! type (>> (pref message 0) 4))
      (set! chan (& (pref message 0) 15))
      (set! a (pref message 1))
      (set! b (pref message 2))
      (println type chan a b)
      (if (= a left) (dsp.freql (+ 110. (pow (i8tof b) 1.25))))
      (if (= a right) (dsp.freqr (+ 110. (pow (i8tof b) 1.25))))
      void)))


Back to Index

Similar Entries

  • Pm_Event_Message    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Channel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Data1    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Data2    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Status    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Type    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • aiProcess_CalcTangentSpace    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_Debone    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FindDegenerates    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FindInstances    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FindInvalidData    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FixInfacingNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FlipUVs    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_FlipWindingOrder    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_GenNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_GenSmoothNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_GenUVCoords    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_ImproveCacheLocality    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_JoinIdenticalVertices    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_LimitBoneWeights    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_MakeLeftHanded    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_OptimizeGraph    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_OptimizeMeshes    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_PreTransformVertices    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_RemoveComponent    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_RemoveRedundantMaterials    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_SortByPType    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_SplitByBoneCount    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_SplitLargeMeshes    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_TransformUVCoords    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_Triangulate    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_ValidateDataStructure    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • create_post_process_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/framebuffer.xtm
  • fleet_message_all_nodes_sync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • fleet_message_node_sync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • get_browser_process_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • get_render_process_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • on_before_command_line_processing    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • on_process_message_received    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • process-multi-variable    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • rtmidi_default_callback:RtMidiCCallback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • rtmidi_print_ports    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • rtmidi_register_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • rtmidi_send    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • send_process_message    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • suppress-compiler-messages    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm