1

I am working on a web app that controls digital mixer X32 Behringer. I am using OSC with PHP, php-osc this is the link to the GitHub library https://github.com/frequenc1/php-osc I have managed to send commands to the device.

  class OSCClientTest extends PHPUnit_Framework_TestCase
{

function setUp()
{

}

function testOSCClient()
{
    $c = new OSCClient();
    $c->set_destination("192.168.1.91", 10023);
    $m1 = new OSCMessage("/dca/1/on");
    $m1->add_arg(1, "i");
    $c->send($m1);

}

}

$x = new OSCClientTest();
$x->testOSCClient();

I am having trouble getting data from the device. do I need to run a server?

the command to get data from the device is /info with no args

Chinez
  • 551
  • 2
  • 6
  • 29
  • How do you think "Running a server" will help you? What are the actual symptoms of your problem. It looks like you're writing a unittest, but you should get some result/output/error/whatever. – Evert Jun 14 '21 at 20:55
  • thank you for the replay. i am new at this OSC protocol. my problem is that I don't understand how to call the device to get the data from it. – Dror Shalit Jun 14 '21 at 20:57

1 Answers1

0

The X32's usage of OSC differs a bit from standard OSC. I haven't seen an off-the-shelf OSC client "just work" with it. You'll have to write your own code.

You'll need to listen on a UDP socket if you expect to get data back from the mixer. I recommend reading through Patrick-Gilles Maillot's excellent documentation on the protocol. You can also learn a lot by simply firing up a packet sniffer like Wireshark and watching the communication between the mixer and X32-Edit.

Finally, this might be difficult to do with PHP since your application context is torn down between each request. You might find it easier to build this using Node.js or similar for your server to proxy the OSC data between the mixer and your web application.

Brad
  • 159,648
  • 54
  • 349
  • 530