The-Modular-Mind / oscelot

OSC Mapping module for VCV Rack
GNU General Public License v3.0
20 stars 1 forks source link

Feature Request: Send OSC marker message when changing mapped module #9

Open rjsmith opened 1 year ago

rjsmith commented 1 year ago

Hi, Thanks so much for creating OSCelot!

I am building a multi-tab TouchOSC controller to work with OSCelot. It would be very useful if OSCelot could send a "/oscelot/module/new" (or similar) message just before it starts sending the new controller and /info messages for the new mapped module. This would allow my script to reset the appearance of the controllers before it starts consuming the initial messages for the new module. Would be very very useful if that message could include some meta info about the module, especially its name so I could show it as a page title for example.

At the moment, I have a workaround to look for a */info request for the first control on a page and if the user has not interacted with the control themselves, it triggers the page reset. But this is unreliable, depending on what controls have been mapped in OSCelot in the preset.

Please let me know if you have any questions about my idea .. happy to provide more info on my TouchOSC patch if that would help.

image
The-Modular-Mind commented 1 year ago

Something like this?

address: '/oscelot/module/new',

args: [
    'MixMaster 6295148310018720',
    'MindMeld MixMaster',
    '16-track stereo mixer with 4 group busses',
    140
  ]
rjsmith commented 1 year ago

Yes thanks that would work.

It would need to be sent when OSCelot switches modules (e.g. either from an action on the VCVRack panel, or remotely from a /oscelot/prev or next message, or "Re-send All ", or when it loads a preset etc ? - basically any time just before it sends a set of /info messages for all mapped params).

What does the 140 refer to in your example ?

I have some other interesting ideas I want to experiment with once I have the basics working. Will raise separate feature requests for each , I guess that would be best for you ?

Thanks for your quick response, much appreciated.

The-Modular-Mind commented 1 year ago

The 140 is the number of params that the module has, was just trying to find some useful info to send :)

The number in the first string is the ID, should be the same as in the patch json file.

Let me know if there's anything you'd like to see added.

rjsmith commented 1 year ago

Thanks - It would also be useful to get the number of mapped params for the module in OSCelot in the /oscelot/module/new message ... ie. the number of/<controller> + /info pairs of messages that OSCelot is about to send .... ? The TouchOSC patch could then increment a local counter as each /info message is received, so it knows when it has received all of them.

Even better to also have another send message /oscelot/module/end which indicates that OSCelot has completed sending the snapshot of all of the controller value and /info messages. Not sure yet what I could use that for in the TouchOSC UI, but seems it would be useful to have the two explicit marker messages at the start and end of the sequence.