[issue] Setting output over OSC selects wrong value

Welcome Forums Help [issue] Setting output over OSC selects wrong value

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Rebecca 9 months, 2 weeks ago.

  • Author
    Posts
  • #441

    javl
    Participant

    I couldn’t find a github repo for wekinator so I’ll just post this issue here:

    The docs show how to set the output to a specific value when using OSC to control Wekinator:

    /wekinator/control/outputs (with list of floats): Send Wekinator current output values to populate the boxes/sliders on its GUI. Attach one float per output, in order.

    Using OSC I created 1 output and 100 classes. If I want to set the output to class #2, I should be able to do this with the following OSC command in Python:
    client.send_message("/wekinator/control/outputs", [2.0])
    The odd thing is, the dropdown will show some completely different selection, like 65, or 37. Sending the message multiple times in a row will not change the selection again (it will keep saying 65 for instance) but sending a different float and then the original again will show a different value. Odd thing is, internally Wekinator seems to use the right value: when I send 2.0 the dropdown might show 65, but if I click on the dropdown it suddenly jumps to 2, so it seems Wekinator did receive the right value but is just showing something else?

  • #458

    Rebecca
    Keymaster

    Hi there,

    Unfortunately, I’m unable to replicate this behaviour. When I use the Python OSC library (used in the Python example code at http://www.wekinator.org/examples/#Python) to set the class, I get the expected behaviour. Specifically, I’m using the code below:

    
    send_address = '127.0.0.1', 6448
    
    # OSC basic client
    c = OSC.OSCClient()
    c.connect( send_address ) # set the address for all following messages
    
    while 1: # endless loop
            rNum = OSC.OSCMessage()
            rNum.setAddress("/wekinator/control/outputs")
            n = seed.randint(1, 99) # get a random num every loop
            rNum.append(n + 0.0) #0.0 here is hack to make it float
            c.send(rNum)
            print n
            time.sleep(1) # wait here 1 second
    

    Perhaps try a different OSC library?

    (And by the way, Wekinator is on github at github.com/fiebrink1/wekinator)

You must be logged in to reply to this topic.

  •  
  •  
  •  
  •  
  •