djiamnot / gdosc

OSC module for Godot game engine - it is now discontinued in favor of https://gitlab.com/frankiezafe/gdosc
Other
16 stars 1 forks source link

Can't configure the message to send. #11

Closed LeLieuMultiple closed 6 years ago

LeLieuMultiple commented 6 years ago

Hello there, thank you for the work done ! I'm trying to connect SonicPi to Godot using this module. It works fine when sending datas from SonicPi to Godot, but in the other way, Godot to SonicPi, I can't configure the message correctly, and can only receive a "/osc/#bundle" message without arguments. Here is my OSCsender script :

extends OSCsender

var time = 0
var parent = null

func _ready():
    set_process( true )

func _process(delta):
    time += delta
    if time > 5:
        if (parent == null):
            return
        time  = 0
        msg_address("/osc/beat_switch")
        msg_add_int( 2 )
        msg_add_int( 22 )
        msg_add_string( "test" )
        msg_send()
        print("ok")

The code looks ok to me but doesn't change the received message. It looks like msg_adress(), add_int() and add_string() have no effects. IP and port are ok since I can see the "/osc/#bundle" message from SonicPi.

djiamnot commented 6 years ago

Please disregard my previous comment. Your code works fine when tested with oscdump (available from liblo-tools package). It is also known to work with SuperCollider and Pure Data. I don't know SonicPi so I cannot help there but will try look into to make sure that everything is correct on gdosc side.

LeLieuMultiple commented 6 years ago

You are totally right, oscdump allows me to get the OSC message sent by Godot with correct addressing and arguments, so the problem seems to come from the SonicPi setup rather than your module. I guess this is an other argument in favor of SuperCollider, as SP is just a Ruby program built on top of it. Tyvm :) .