+1 vote

edit 2020
the repo for gdosc as gdnative is


Assume that I have really poor general programming skills, but am capable of autodidacting the required skill set to perform specific tasks, how does one implement the above repo in a project

EDIT: 2018

it looks like Michal Seta has been working on a plugin which seems to be nearing general public usefulness.

in Engine by (22 points)
edited by

4 Answers

+1 vote

Well, GDNative is basically built for integrating interactions with 3rd party code into the scripting engine.

You might first take a look at this OSC C# interface as C# was just recently added to Godot 3.0 as a first-party language (it's still getting refined, but as long as the C# code is compatible, I don't see a reason not to use it instead, aside from potential efficiency reasons).

If that doesn't work out, then this OSC C++ interface sounds like it should be able to integrate into GDNative C++ pretty well.

by (186 points)

thank you for the clear and helpful reply.
I will investigate and report.

I wonder how hard would it be to convert an OpenFrameworks addon into GDNative... There's hundreds of C++ addons here http://ofxaddons.com/categories

The one for OSC is not listed there because it's a core addon: https://github.com/openframeworks/openFrameworks/tree/master/addons

This might be a huge resource for augmenting Godot... I'll take a look at how it could look like (but so far I only know OpenFrameworks, no Godot yet).

0 votes

May I ask what is your goal with OSC?

Are you trying to play sound in godot?

To create a proper audiostream that integrates with the editor, you cannot use gdnative. You must use C++ modules




I don't care about this code in particular. This code example I wrote is an example of how you can queue a byte stream. This code assumes the input is mono 16 bit pcm. You can easily change it to accommodate 32 bit floats etc.

by (427 points)

no i am not.

I want to have Godotengine receive instructions via OSC.

+3 votes

I am actually working on an OSC module that uses oscpack, linked by @Will Nations. It's not ready yet for public consumption and right now I am only supporting a subset of data types (float, int32 and string) to satisfy my immediate needs. I am new to both Godot and C++ so I am not even set on architecture but once I got the basic functionality working I will worry about discussing how it should be integrated into the engine. Right now I have two dedicated modules, one for receiving OSC messages, another for sending. Stay tuned, I will go public once I get through some hurdles and it's actually minimally useful.

by (64 points)

and I also see this code but dating from 2015 so not sure how it would need to be changed for 3.0...

Hi @Michal,
would you be kind and release you early work as it is ?
I am also in need of some basic OSC communication and would take ages to even have a start (was looking at liblo), but doing double work is not interesting
having some start would also help more advanced coders to look at and help it grow faster...

I could help on the implementation if not finished, do you have a repository somewhere?

Sorry for the late reply, the notification about comments ended up in my spam folder and I just discovered them while looking for some other, potentially misplaced message :-/
In the meantime, I have actually gotten around to getting things done and this weekend is the time to publish the existing work! The repo for the module is here: https://github.com/djiamnot/gdosc and there is an example of use here: https://github.com/djiamnot/gdOscTest. There is some minimal documentation, feel free to nudge me if something is not clear. Merge requests are welcome, of course ;)

Hey, thanks a lot for the code! No problem for the response delay, it's quite fast compared to me :)

hey great !
I'll look and report, thanks for the update and publication !

I'm tuning the readme for the moment (https://github.com/frankiezafe/gdosc/commit/a576e319a3bacba42a9858c0a8b0339ba3ddf79f) - do you prefer me to make pull request at each commit or once in a while?

Thanks @frankiezafe for chiming in. It now apparently compiles on a computer that is not owned by me, which is a good sign. The workflow at this point is a little clunky but I too will start using it for a real project so I will have better ideas for further development. If anyone else tries it, please report any issues and ideas directly in the repository.
Good luck ;)

OP here,
I have changed the original post to reflect my support for the gdosc direction.
I will be attempting to learn how to compile Godot and then implement the plugin.

+1 vote

(moved this from a comment to a real answer for clarity and easier access)

You can try this binary release: https://github.com/djiamnot/gdosc/releases/download/0.1.0/gdosc.tar.gz

tar zxvf gdosc.tar.gz will unpack into a directory called gdosc. Copy the directory into modules folder of your Godot installation. It's a 64bit build, done on Ubuntu 18.04 but should work on any reasonably recent 64bit Linux.

Please note, that there no plans to maintain this module. Instead, I am planning to rewrite it as GDNative plugin.

by (64 points)

Thanks for the link.

This is all really excellent and much kudos for making it possible.
I have some questions regarding some documentation on how to actually make the


gdnative code actually work.
Would anybody be interested in helping me understand how to make it function?

Have you tried the demo project that comes with it? What exactly is the issue?

I think that the issue here is that I do not understand (the documentation for) gdNative generally.

I am going through the errors to try to make it work.

and.....done. demo works.
I am using Godotengine3.1.1 so the scripts needed to be changed from

extends Object


extends Spatial

now it is working,
thanks for reminding me to look at the demo.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.