Old 11-05-2017, 06:04 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default Starting trying OSCIIbot

I'd like to check if I can use OSCIIbot for a project that I have in mind.

I want to connect to an XR18 Mixer vie OSC via WLAN.

I do know that I need to at first do some communication to find the (correct) XR18 in the network .

After that I need to send it a "Register" command to have it send me it's state and any changed states if somebody else changes it.

Any clues on how to do that ?

I understand that OSCIIbot is moistly used to send OSC to Reaper (running on the same box), but this thread -> https://forum.cockos.com/showthread.php?t=181044 shows that it can be used for the purpose I have in mind.

-Michael

Last edited by mschnell; 11-05-2017 at 11:15 PM.
mschnell is offline   Reply With Quote
Old 11-09-2017, 04:58 PM   #2
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Michael
This can probably be done with OSCII-bot since it can send and receive midi and OSC from and to multiple devices at the same time. This is with the proviso that the midi is all 3 byte midi data, not sysex.

But the desired OSC and Midi signal routing (path & direction) for the X-Touch, for Reaper and the XR18 needs explaining a bit more clearly eg in a diagram, along with some more explicit reference to the devices' protocols to be sure.

If this answer is, or can be, the start of something helpful then perhaps point other varied forum threads now opened on this similar question back to here, and continue the answer here?
goldenarpharazon is offline   Reply With Quote
Old 11-09-2017, 11:06 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

goldenarpharazon, Thanks for your answer !

Are there any working OSIIbot examples out there ?

I suppose in most cases OSCIIbot is used to attach to Reaper via OSC - usually running on the same box as Reaper, while sending/receiving Midi from/to an externbal device (such as a controller board e.g. BCF2000 like in the other thread.

Here I need a different thing: having OSCIIBot attach via OSC to an external device, while communicating with Reaper (i.e. JSFX programs) on the same box via Midi.



I am rather sure that I'll be able to get the Midi side of the problem done.

The initial task is just OSC issues:

- attach OSCIIbot to the mixer Supposedly I need to supply the IP address and the port to OSCIIbot. I'd like to do that somehow "from outside" not in the EEL source code.

- make the mixer send out the state of certain parameters so that I can convert them to Midi and send them to the existing JSFX-script-construnct in Reaper

- in certain intervals send "register" requests to the mixer to make it send out the values of these parameter whenever they get changed by different sites.

I have been provided with the python code that does exactly this. I need to analyze same and see what exactly has to be implemented.

If this "initialization" can be solved, I am rather sure that the conversion / transport is doable rather easily.

-Michael

Last edited by mschnell; 11-09-2017 at 11:17 PM.
mschnell is offline   Reply With Quote
Old 11-10-2017, 05:29 AM   #4
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Quote:
Originally Posted by mschnell View Post
goldenarpharazon, Thanks for your answer !

Are there any working OSCIIbot examples out there ?
All of these useful examples are on the Reaper forum or close to it

- Peavey StudioMix control surface from Banned
- AKAI MIDIMIX control surface from goldenarpharazon
- original example script from Justin (from Midi2OSC - see previous answer)
- simple examples are bundled with the OSCII-bot install zip file itself

Quote:
Originally Posted by mschnell View Post
I suppose in most cases OSCIIbot is used to attach to Reaper via OSC - usually running on the same box as Reaper, while sending/receiving Midi from/to an externbal device (such as a controller board e
.g. BCF2000 like in the other thread.

Here I need a different thing: having OSCIIBot attach via OSC to an external device, while communicating with Reaper (i.e. JSFX programs) on the same box via Midi.
The examples happen to be with Reaper. But OSCII-bot is a bridge that will translate between OSC and Midi for anything at all, without any dependence on Reaper, or the OSC functionality in Reaper.
Quote:
Originally Posted by mschnell View Post
- attach OSCIIbot to the mixer Supposedly I need to supply the IP address and the port to OSCIIbot. I'd like to do that somehow "from outside" not in the EEL source code.
The OSCII-bot EEL2 allows file I/O which could be used to create a separate config file if that's preferable. OSCII-bot also allows a basic GUI to be created.
Quote:
Originally Posted by mschnell View Post
- make the mixer send out the state of certain parameters so that I can convert them to Midi and send them to the existing JSFX-script-construnct in Reaper

- in certain intervals send "register" requests to the mixer to make it send out the values of these parameter whenever they get changed by different sites.
If these parameters or requests are OSC you can assemble and send, or receive and parse any OSC string you wish or need in OSCII-bot EEL2
Quote:
Originally Posted by mschnell View Post
I have been provided with the python code that does exactly this. I need to analyze same and see what exactly has to be implemented.
Be interested to see this Python code please too, since it may be extensible to also handle OSC translation into Midi SysEX which OSCII-bot does not handle. Thanks.
goldenarpharazon is offline   Reply With Quote
Old 11-10-2017, 06:50 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Thanks A LOT for answering !

Quote:
Originally Posted by goldenarpharazon View Post
The OSCII-bot EEL2 allows file I/O which could be used to create a separate config file if that's preferable. OSCII-bot also allows a basic GUI to be created.
I did find that OSCIIbot can read a file and do plan to use this for configuration. But from the docs I have the impression that I need to state the IP address and port directly in an EEL statement. I'll re-check...
(I already did create a GUI for another project with EEL gfx, so I suppose this is possible with OCIIbot as well.)

Quote:
Originally Posted by goldenarpharazon View Post
If these parameters or requests are OSC
The mixer device of course does send these parameters according to the OSC spec, so I do hope, OSCII bot can easily receive them.

The question I have in mind is how to send the "register" command to the mixer (I suppose this is OSC standard as well. I suppose this needs to be done if attaching to Reaper via OSC, too, so there will be appropriate examples, but till now I failed to find some.

Quote:
Originally Posted by goldenarpharazon View Post
Be interested to see this Python code please too, since it may be extensible to also handle OSC translation into Midi SysEX which OSCII-bot does not handle.
I did not do a Python project up till now. I got this code from a friend of mine. I am going to install and test if it works for me. After that I am going to decide weather to do a new OSCIIbot project (seems more appropriate for my usage) or to learn Python and modify the Python code.

But very likely the Python code can handle SYSEX. Supposedly even "out of the box", but AFAIK, a Midi library is used (and an OSC library), and the libraries are just python source code and can be enhanced if necessary.

Thanks again,
-Michael

Last edited by mschnell; 11-10-2017 at 06:57 AM.
mschnell is offline   Reply With Quote
Old 11-10-2017, 07:58 AM   #6
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Quote:
Originally Posted by mschnell View Post
The question I have in mind is how to send the "register" command to the mixer (I suppose this is OSC standard as well. I suppose this needs to be done if attaching to Reaper via OSC, too, so there will be appropriate examples, but till now I failed to find some.
The OSC standard must be one of the loosest (ie most open) standards ever written! It provides some definition of syntax, but much of the data and all the semantics are left open to the "user" or implementer (in this case Behringer).

There maybe some helpful information on the Behringer X32 OSC implementation here
http://behringerwiki.music-group.com...emote_Protocol
and the work & code of Patrick Maillot (sometime user of this forum)
https://sites.google.com/site/patric...attredirects=0
https://sites.google.com/site/patrickmaillot/x32

I would doubt that Behringer OSC and Reaper OSC implementations have anything at all in common beyond vague intent so OSCII-bot would do the "talking" and "listening" to the Mixer and of course OSCII-bot can talk to Reaper in OSC to if that route for data helps.
goldenarpharazon is offline   Reply With Quote
Old 11-10-2017, 11:39 AM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

In faxct the fist problem I see is not to interpret the data I get from the Mixer (XR18), but to make the mixer send any data at all to OSCIIbot.

For this the mixer needs to know the IP address and port number OSCII bot is to be addressed by, and hoch parameters OSCIIbot wants to be sent.

I understand that for this OSCIIbot needs to send an OSC standard communication called "Register" or "Subscribe" to the mixer (or to Reaper if same is the OSC-partner).

As this subscription will time out any xxx seconds, this message needs to be repeatedly sent.

I did not yet find anything about such subscription in the OSCII bot documentation, and I did not yet see any working example of a script making OSCIIbot receive parameter values via OSC.


It's hard to believe that nobody ever used OSCIIbot and wrote code for it.

-Michael
mschnell is offline   Reply With Quote
Old 11-10-2017, 03:32 PM   #8
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

The OSC network path over UDP to the XR18 is opened by an appropriate OSCII-bot code line

Code:
@output devicehandle OSC "host:port"
where host and port indicate the XR18 you want to talk to

Then an OSCII-bot @timer code block can be used to repeatedly send the OSC string "/xremote" to the XR18 using oscsend() that then keeps the client alive.

The basic pattern can be seen in the C code example at the end of the X32 OSC protocol spec document.

When the EEL2 code is written and run, the OSC sent, the responses, and any unsolicited OSC from the X18 will all be seen in the OSCII-bot console window and one can then expand the code with a bit of trial and error, guided by Patrick-Gilles' X32 protocol specification.

Last edited by goldenarpharazon; 11-11-2017 at 12:20 PM.
goldenarpharazon is offline   Reply With Quote
Old 11-10-2017, 06:03 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

I'm going to try this ASAP.

Thanks a lot !

-Michael
mschnell is offline   Reply With Quote
Old 11-11-2017, 02:34 PM   #10
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

With OSCIIbot I was able to attach to a Midi device and to an OSC interface by

Code:
@input XT_M_IN MIDI "loopMIDI Port"	//in quotation marks-name of midi port used in Windows
@input XR18in OSC "*:10024" 
@output XR18out OSC "192.168.1.1:10024"
I see:
Code:
C:\Users\mschnell\AppData\Roaming\oscii-bot\test1.txt
	Listening on '*:10024'
	2 inputs, 1 outputs

Total: 1 scripts, 2 inputs, 1 outputs

I was able to send Midi events from Reaper via loopMIDI to OSCIIbot and display them in the log window.

So I did

Code:
@timer
!t ? (
  t = 10;
  oscsend(XR18out, "/xremote");
);
t -= 1;
Now I suppose when moving a slider of the mixer by another program attached to it via OSC (the XR18 can handle up to four OSC clients at the same time) should send anything to OSCIIbot. But I don't see anything at all.

I looked at the Python code I got and here it seems that the command sent is
"/xremotenfb" instead of simply "/xremote".

But changing this does not give any response, either.

So I don't know if my commands even get through to the XR18.

Any ideas ?

Thanks,
-Michael

Last edited by mschnell; 11-11-2017 at 02:42 PM.
mschnell is offline   Reply With Quote
Old 11-11-2017, 03:42 PM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

...

I installed Wireshark and found that the first command the XAIR editor sends is "/xinfo".

So I modified the OSCII script to send "/xinfo"

Now Wireshark shows me the OSCIIbot correctly sends the "/xinfo" command and the XR18 correctly answers.

But in the script I have:
Code:
@oscmsg
printf("-------------------------------------Incoming\n");
and I don't see this message in the log window.

(same for "/xstatus" )

Any ideas ?
-Michael

Last edited by mschnell; 11-11-2017 at 04:13 PM.
mschnell is offline   Reply With Quote
Old 11-12-2017, 01:11 AM   #12
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

I suppose a major problem is that

- "@output OSC ..." assigns a random port number as a sender address to the sending USP socket to be used with oscwrite().
- the hardware device (XR18, but supposedly close to any other, as well) will send messages back to that port number.
- with "@input OSC ..." the port number the receiving UDP socket is opened to listen on (not "to") needs to be given, and this number is not known to the programmer. To allow this the ID of the corresponding output port would be needed to be given in the @input command. Easily doable, but seemingly not implemented in the current version of OSCIIbot.

Seemingly when attaching to Reaper via OSC, Reaper can be set to send OSC messages to a predefined port, and same can be used in "@input OSC ...". But hardware devices just use the port given as sender in the received messages they are controlled by.


Pls see my message to Justin in the developers forum.

Did you really succeed in requesting data from an X32 with OSCIIbot ?

-Michael

Last edited by mschnell; 11-12-2017 at 04:19 AM.
mschnell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.