Skip to content

About nonstandard OSC Type Tag "T", "F" and "N" #21

@cleemy-desu-wayo

Description

@cleemy-desu-wayo

osc-ruby seems like support nonstandard Type Tag "d".
#8

It would be even more useful if it also supported "T", "F" and "N".

Adding support for these seems relatively easy, because "No bytes are allocated in the argument data".

I have tried writing a monkey patch, but this is not yet well tested.
https://gitlab.com/cleemy-desu-wayo/outvoke/-/snippets/4875923

Activity

aberant

aberant commented on Jul 30, 2025

@aberant
Owner

I'll be able to look at this next week

cleemy-desu-wayo

cleemy-desu-wayo commented on Aug 9, 2025

@cleemy-desu-wayo
Author

I have no reason to rush. I thank your interest in this proposal

cleemy-desu-wayo

cleemy-desu-wayo commented on Aug 10, 2025

@cleemy-desu-wayo
Author

Regarding PR #24, I think that if we don't solve this argument issue first, Type Tag "N" may not work properly

cleemy-desu-wayo

cleemy-desu-wayo commented on Aug 11, 2025

@cleemy-desu-wayo
Author

Just to be sure, here are some simple steps to confirm why it is better to resolve PR #24 in good time. These steps are just a quick hack to avoid defining new classes.

Step 1: add the following line to Message#initialize in lib/osc-ruby/message.rb

        when NilClass; obj = Object.new; obj.define_singleton_method(:val) { nil } ; obj.define_singleton_method(:tag) { "N" } ; @args << obj

Step 2: add the following line to OSCPacket#initialize in lib/osc-ruby/osc_packet.rb (and probably add a comma to the previous line)

       "N" => lambda{nil}

For now, this change will enable the server side (OSC receiver side) to handle OSC Type Tag "N". However, it should behave as if there is an extra nil at the beginning of the received OSC message.

The extra nil seems to be caused by an extra nil being passed to Message.new (Message#initialize).

aberant

aberant commented on Aug 31, 2025

@aberant
Owner

do you know of any free software or library that supports the "T", "F", "N" OSC tags? I'd like to test this against a working system

cleemy-desu-wayo

cleemy-desu-wayo commented on Sep 11, 2025

@cleemy-desu-wayo
Author

if you're okay with Python, there's python-osc:
https://github.com/attwad/python-osc

I wrote some simple samples for testing "T", "F", and "N" with python-osc:
https://gist.github.com/cleemy-desu-wayo/590a22d5fb4e3f813b06dcc2fef9ae77

Although they're proprietary software, the VRChat client and the Resonite client do use "T" and "F".

From the VRChat client, "T" and "F" are sent to /avatar/parameters/Grounded at the moment the avatar leaves the ground (e.g., when jumping) and at the moment it lands.

For the VRChat client receiving data, the 2nd arg of /chatbox/input is either "T" or "F".
https://docs.vrchat.com/docs/osc-as-input-controller

We can try these out using just the VRChat client; no need to create anything in Unity or elsewhere.

Resonite offers a great deal of flexibility, but it's a bit complicated. Here's a video explaining how to receive OSC in Resonite:
https://www.youtube.com/watch?v=gvbZV_x9cak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aberant@cleemy-desu-wayo

        Issue actions

          About nonstandard OSC Type Tag "T", "F" and "N" · Issue #21 · aberant/osc-ruby