RepositoryC++JPNhật Bản
2bbb

2bbb/ofxPubSubOsc

bind OSC messages and values with only writing tiny codes on setup once.

78sao
7fork
0issue
2lượt xem

🎯 ofxPubSubOsc – Đăng ký OSC chỉ bằng một dòng code

Chỉ cần viết một lần ở hàm setup(), không cần xử lý OSC trong update() nữa.

ofxPubSubOsc là một addon nhẹ dành cho openFrameworks, giúp người dùng dễ dàng thực hiện mô hình publish/subscribe OSC mà không cần viết nhiều boilerplate. Dựa trên thư viện ofxOsc, addon này cho phép liên kết trực tiếp các biến hoặc hàm callback với địa chỉ OSC (address pattern), tự động cập nhật giá trị khi nhận được tin nhắn hoặc gửi giá trị khi thay đổi.

✨ Điểm nổi bật

  • ofxSubscribeOsc: Liên kết một biến với địa chỉ OSC đến một cổng nhất định.
  • ofxPublishOsc: Gửi giá trị của một biến dưới dạng tin nhắn OSC khi giá trị thay đổi.
  • ofxRegisterPublishingOsc / ofxPublishRegisteredOsc: Đăng ký trước một giá trị để xuất bản sau này khi gọi hàm cụ thể.
  • Hỗ trợ callback lambda: Sử dụng hàm lambda để xử lý sự kiện nhận được OSC.
  • Tự động đăng ký kiểu dữ liệu: Hỗ trợ nhiều kiểu như int, float, string, ofVec2f, ofColor, ofPoint, ofParameter, v.v.
  • Không cần xử lý trong update(): Mọi logic đều được gọi ngầm, giữ cho vòng lặp chính sạch.

💡 Vì sao đáng chú ý

ofxPubSubOsc khác biệt so với cách dùng thuần của ofxOsc ở chỗ rất ít code boilerplate. Người dùng chỉ cần khai báo một lần trong setup() và mọi truyền nhận OSC được quản lý tự động — rất thích hợp cho các dự án thời gian thực, tương tác đa nguồn (multi-source), hoặc kết nối với phần mềm khác như TouchDesigner, Resolume hay Max/MSP.


#openFrameworks #OSC #Addon #C++ #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC++
memoakten/ofxMSATensorFlow

C++ openframeworks addon and examples integrating Google's TensorFlow numerical computation and machine learning library

461
Feb 26, 2022
RepositoryC++
memoakten/ofxMSAFluid

C++ openFrameworks addon for solving and drawing 2D fluid systems based on Navier-Stokes equations and Jos Stam's paper "Real-Time Fluid Dynamics for Games"

200
Oct 3, 2019
RepositoryC++
d3cod3/ofxVisualProgramming

A visual programming patching environment for OF

171
Oct 21, 2026
RepositoryC++
NickHardeman/ofxBullet

Bullet Physics Wrapper for Openframeworks

156
Jun 16, 2023
RepositoryC++
armadillu/ofxRemoteUI

OpenFrameworks addon serves any number of variables (bool, float, int, enum, string, ofColor) on the network, so that you can modify from outside the OF app. Includes a native OSX Client. OSC based.

140
Nov 30, 2026
RepositoryC++
zkmkarlsruhe/ofxTensorFlow2

TensorFlow 2 AI/ML library wrapper for openFrameworks

119
Feb 4, 2026
RepositoryC++
NickHardeman/ofxFBX

FBX SDK addon for OpenFrameworks

111
Aug 30, 2023
RepositoryC++
nama-gatsuo/ofxDeferredShading

an openFrameworks addon for shading, lighting, lens simulation.

88
Jan 21, 2025
RepositoryC++
moebiussurfing/ofxSurfingImGui

( WIP ) ImGui Toolkit for openFrameworks apps: ofParameters Widgets and Layout Helpers. Modules/Engines: Log, Debugger, Docking, Layout Presets and more. NEW: iOS

53
Mar 14, 2026