c-mendoza / ofxRemoteParameters

ofxRemoteParameters allows you to remotely manipulate ofParameters via an OSC connection, with a minimum of code on your part.
MIT License
7 stars 0 forks source link

fast OSC remote for common templates #4

Closed moebiussurfing closed 2 years ago

moebiussurfing commented 2 years ago

Hey @c-mendoza ,

I have seen that the server is receiving an OSC pattern like this:

RECEIVE    | ENDPOINT([::ffff:127.0.0.1]:60329) ADDRESS(/ofxrpMethod/set) STRING(/Example/Radius) STRING(214.857)
RECEIVE    | ENDPOINT([::ffff:127.0.0.1]:60329) ADDRESS(/ofxrpMethod/set) STRING(/Example/Radius) STRING(212.311)

(I renamed the variable names from the server example to avoid spaces and long names.)

Do you think could be hard to add an alternative mode to serve the variables (also) in a more common way version? Any tip about how to do it or if it is worth the idea?

What I want is to fast populate my parameters bundle from my app to receive/send OSC. Then I can create a TouchOSC template and I am ready to control any app controllers easily.

What do you think about it?

I have seen some add-ons that maybe can do similar things: https://github.com/2bbb/ofxPubSubOsc https://github.com/bltzr/ofxOscQuery

c-mendoza commented 2 years ago

Not sure what you mean by a "more common way"... can you give me an example?

moebiussurfing commented 2 years ago

I mean something like: ADDRESS(/Example/Radius) as a FLOAT value
instead of using custom strings.

I mean something like OscQuery does: https://github.com/bltzr/ofxOscQuery

Then would be easy to use OSC templates to control all the app parameters easy: we don't need to setup the receivers' addresses manually.

moebiussurfing commented 2 years ago

... When using some client apps like TouchOSC, you can create a slider, of a float type, set the address/name, range etc etc... very handy.

Maybe that's too much core changes for the addon, I just say it bc I think could be useful. ;)

c-mendoza commented 2 years ago

I thought making a TouchOSC client was possible, but maybe I have to look more into it.

moebiussurfing commented 2 years ago

There's an addon that can generate TouchOsc templates but is for the old version (TouchOSC Mk1): https://github.com/genekogan/ofxTouchOsc

That will allow us to read/interpret the ofxRemoteParameters structure and autogenerate a template for any ofApp.

The new TouchOsc is more powerful and really cool. It has scripting on the client-side too, and live editing templates on desktop/mobile.

But as I said, maybe it's too complicated. OSC Query is cool, and for the moment could be an alternative to that feature.

c-mendoza commented 2 years ago

Oh I was not aware that there was a new TouchOSC version, and it makes it totally possible to connect to my addon! I just tested sending data with a slider from TouchOSC to the basic_server example and it works, you just need to set the TouchOSC output to the format that ofxRemoteParameters expect. Here is an example:

ofxrp_test.zip

I would have to do some research to see if automatically generating the TouchOSC layout is possible, but at least you can make one by hand.

moebiussurfing commented 2 years ago

Cool thanks. it worked!

BTW, in case you didn't see it, now the desktop editor can work the same as the mobile versions. and it's free.

Also, about the auto-generating thing, I remember that the ofxTouchOSC addon handles the template files as base64 instead of txt/ascii. I just send an email to the support email asking about this info. (what encoding, api/sdk etc) I'll post you here if I get good news.

moebiussurfing commented 2 years ago

Hexler Support <support@hexler.net>
11:21 (hace 4 horas)
para mí

Hi Manu,

We don't currently have the layout format documented, but you can export a cleartext XML file of layouts for the new TouchOSC, which are more straightforward as they do not use base64 encoding and should be easier to figure out:
For desktop TouchOSC, use File > Export > XML from the menu to export an XML layout file
For mobile versions, long-press the layout name in the Open or Save Document panel, which will bring up a context menu with the option to Export as XML
Rename the XML file to the .tosc extension to load it back into TouchOSC, and the next time you save it it will be saved as the standard binary file format.
Note that if there are errors in the XML this may corrupt so if files don't want to load after editing the XML (or generating XML) this is likely why.

We do intend to document this XML layout format for the website but we are a small team and are in the process of overhauling our website/documentation so this may take a bit of time.
That being said, again the XML format is cleartext without any special encoding (unlike TouchOSC Mk1 layouts which did use base64 encoding in places) so if you're already this deep into it, you should be able to parse and figure out the XML.

Hopefully this helps!
As a reference, the online documentation for TouchOSC can be found here: Introduction · TouchOSC | hexler.net
Please let us know if you have any other questions, and thank you for your use and support of TouchOSC!

Hexler Support

support@hexler.net

https://hexler.net
moebiussurfing commented 2 years ago

https://hexler.net/touchosc/manual/introduction

moebiussurfing commented 2 years ago

Two cents of what I found:

  1. Even a blank template on the new TouchOsc looks like complicated... The exported xml has too much tags... Could be tedious, maybe.

  2. Using ofxTouchOsc exports an xml too, and then it's just zipped to a zip file and renamed the extension from .zip to .touchosc.

  3. The good side is that the new TouchOsc editor can open this file!

So, I think could be enough with the old ofxTouchOsc add-on. Then, after exporting I can open the file and edit the layout a bit on the new editor before use it.