bitfocus/companion-module-behringer-x32

Feature requests: Shutdown command and custom curves for volume automation

Velikyi opened this issue · 8 comments

Is it possible to add a command in Companion to prepare the X32 console for shutdown? We currently have to do it manually on the first page of the setup screen, but would be great to have everything related to startup and shutdown controlled by Companion. If not direct command to shutdown, maybe combine the navigate command with a new button push command?

Also, for some applications the volume automation for X32 fader can be a little uneven compared to how you would do it manually when pushing up/down the fader. A selectable curve or similar would solve this.

Hi, Velikyi

I have added shut down command (along side a lock and unlock command) but you wont see it in beta just yet, I have some other things that I want to include in the next build still

As for the fading curve, I will have to sit and think about how to do this. What kind of curves were you thinking?

@justingiffard Fading curves should be fairly easy, its already mostly there in the code and just needs plumbing into the ui.
https://github.com/bitfocus/companion-module-behringer-x32/blob/master/src/transitions.ts#L86
https://github.com/bitfocus/companion-module-behringer-x32/blob/master/src/easings.ts. Those easings may not all be reasonable for audio, I copied it from elsewhere and never got around to hooking it up

@Julusian, I did see the transition and easings but didn't see a logarithmic easing which is (in theory at least) what should be used for volume (which uses log scaling) in reality (as far as I understand) they cheat a little use 2 or more linear functions with different gradients to approximate the log curve

Actually! Patrick‐Gilles Maillot has a section on this in "Unofficial X32/M32
OSC Remote Protocol" (Pg 132)
x32-curves

Just thinking though, the OSC commands use a linear scale to map to the log scale so I'm over complicating things 😂

This does go back to the original question though of what curves is @Velikyi thinking about, I see that easings.ts has some nice 'ease in', 'ease out' and 'ease in and out' functions which was actually the first thing that came to mind when I heard curves (thinking about animations having ease in and out). I also see there's all sorts of different algorithms for those easings (quadratic, cubic, quartic, quintic, sinusoidal, exponential, circular, elastic, back and bounce)
do you think its worth while just adding all of them and the user can chose what they want? (like I cant see a use of a bouncing ease but maybe someone out there will want it?)

What I'm thinking would be cleanest us a dropdown for the algorithm and then another dropdown for the easing style 🤔 thoughts?

Huh, yeah there isnt a log one, but is exponential.. should be pretty easy to write/source something for that though.
Or perhaps it would be better to be able to do the fade in the osc value space, rather than db? That sounds like it might give the desired curve

yeah, that protocol documentation was used for the conversions between osc values and db https://github.com/bitfocus/companion-module-behringer-x32/blob/master/src/util.ts#L17-L46

yeah I think some dropdowns would make sense to add, and gives people options. Shouldnt be hard to add everywhere either, just a load of plumbing

@Julusian, I have done the plumbing
Please could you have a quick look at PR #77

I'm not the most happy with the way I needed to do the getEasings function but it was the most readable way I could think of (initially tried nesting switch cases but that looked VERY ugly, I wish there was a way to have a switch on a tuple in TS)

Hello,

Sorry to "up" the subject but the initial request was about shutdown and startup a X32/M32 console. I see the shutdown action is available but no startup fonction. Is this a limitation of the console or something that will be added in the future ?
Thank's

Hello,

Sorry to "up" the subject but the initial request was about shutdown and startup a X32/M32 console. I see the shutdown action is available but no startup fonction. Is this a limitation of the console or something that will be added in the future ? Thank's

The shutdown appears to only put the console into a "power-down ready" mode, it doesn't actually turn anything off (except outputs, perhaps?) so there's nothing really to turn on

unfortunately there is no way to "start up" the x32 from software, even on the console itself. You can only put it into "shutdown" mode which as far as I recall forces a save from RAM to flash storage so that when you power it on again it will be in exactly the same state as it was before. Its been a while so I cannot remember the exact time interval that it saves automatically but basically if you load a scene or make any changes in between the two saves and power off (with the switch) it when you power it on it will have lost those changes (this happened to me a lot where I would load the empty scene and the power it off then when I powered on it had a scene loaded, was rather confusing)

Another limitation is that if the X32 is off it is off so wont be connected to any networks (sadly no wake-on-LAN here), If this is something that you really need I would recommend some kind of IOT/Home automation WIFI controlled plug that you can control from companion 😄

custom curves for audio and shutdown and lock is implemented though so I'm going to close the ticket