bitfocus/companion-module-behringer-x32

M32R Fader Layer Selection

Closed this issue · 25 comments

Hello!

First, thanks for all of the new functionality added recently for the M32!

We currently use an M32R flavor of the board in our church. Is there a way to expose the fader layer controls to companion to change what the board itself is displaying based on which button on companion is pushed? For instance, with the new fader flip functionality that was added to companion, I would love to be able to view a specific set of faders on either side of the board to correspond with the flip that I'm working with at any given point in time.

Thanks in advance for your time!

Hello @jsnyder886

Do you mean effectively pressing the channel bank or fader bank button? If so I have just opened a PR for this (actually made the code changes week before last but only was just able to test it on our X32 at the church) [PR #60]

Otherwise could you explain perhaps in a different way?

That's exactly what I'm looking for. I've been looking for the osc command reference to do some of this and have come up empty so far.

I'll be happy to test the m32 functionality when you're ready if that will be of help to you.

Thanks so much!

@justingiffard the banks are a little different for the M32R. I haven't been behind one in quite a while, but its probably closer to the X32 Producer. And its more flexible then it looks because you can multi-select things on the left half and it'll drop those into both of the 8 fader banks (like ch 1-8 and ch 17-24). But the right column of assignments can only go to the right bank.
image

@krocheck, I've actually heard that it can do this, sadly I do not have a M32R or X32 Producer or even Compact that I can test on. Out of curiosity what will be shown when there are 5 different banks selected like in your photo>

In Patrick-Gilles Maillots Unofficial XM32 OSC document though, channel banks only have 4 states and group banks only have 6. Strangely the 5th state (4) is to be determined and the 6th state (5) is from what I can understand channel 9-16 on the right side

(that foot note for state 5 is '46 In order to ensure 16 channels can spread over the left and right banks of X32/M32 Compact or Producer, the chfaderbank parameter should be set to 0 [chi 01‐16].'

channelsAndGroups

@jsnyder886 You say you have the M32R which as @krocheck said is similar to the X32 Producer. Would you perhaps be willing to test some things for me? Not 100% sure that Patrick-Gilles Maillots apps work for the M32R (they are written for X32 so in theory they should) but I do know the one I would want to to run is Windows only 🤔
Basically what I would want you to do is run the one app that sends OSC commands that you type to the console and then query the different states in OSC depending on which fader layer/banks pages you select. Keen?

@jsnyder886 swee whats the easiest way to chat? Also... what time zone are you in 🤣 I'm in GMT+2 so its kinda 01:20 at moment and I should seriously get to to sleep so Im not exhausted at work tomorrow later 🤣

@justingiffard i can't recall exactly, but i feel the state shown is wrong in that pic. There should only be 2 buttons lit up at a time. Even if you press the bus 1-8 and 9-16 on the left together, i think it will light up the left 1-8 and right 9-16 to mirror the physical layout. The console must be in a demo mode for the photo where the rules are broken.

So here are the commands that worked. The chfaderbank command set changes the left bank of 8 faders, while the grpfaderbank command set changes the right bank of 8 faders.

chfaderbank indexes to the following buttons on the "Fader Layer" selection buttons on the M32R:

0="INPUTS 1-8"
1="INPUTS 9-16
2="INPUTS 17-24"
3="INPUTS 25-32"
4="AUX IN USB"
5="FX RET"
6="BUS 1-8" {left side}
7="BUS 9-16" {left side}

grpfaderbank indexes to the following buttons on the "Fader Layer" selection buttons on the M32R. 0-3 select buttons on the right side of the "fader layer selections buttons, while 4-9 select buttons from the left side as above, but activate the selection on the right side of the board. For example, if you push "INPUTS 1-8" and "INPUTS 9-16" on the M32R console simultaneously, 1-8 will be on the left set of faders, and 9-16 will be on the right set of faders.

0="GROUP DCA 1-8"
1="BUS 1-8" {right side}
2="BUS 9-16" {right side}
3="MATRIX MAIN C"
4="INPUTS 1-8"
5="INPUTS 9-16"
6="INPUTS 17-24"
7="INPUTS 25-32"
8="AUX IN USB"
9="FX RET"

One interesting note I stumbled on in testing this... In practice, there is no way to put "INPUTS 1-8" on the left and right sides of the board simultaneously, because you have to push two buttons simultaneously for that to occur. Aside from that, there's obviously no practical reason to do so anyway. However, with the OSC commands, you can do that. It might be worth considering programmatically not allowing that to occur for the sake of consistency with what the board provides. That is to say, chfaderbank can't be 0 while grpfaderbank is 4.

Below are the commands and results of the commands for all of the above as indexed. I've tested them all with the generic OSC instance in companion and they all work perfectly.

One last thing, I'm sure you've thought about it, but if you can provide feedbacks on which banks are active that would be super cool to have available too.

Thanks for your efforts, an hope this helps!

/‐stat/chfaderbank ,s 0
->X, 28 B: /-stat/chfaderbank~~,s~~0~~~

/‐stat/chfaderbank ,s 1
->X, 28 B: /-stat/chfaderbank~~,s~~1~~~

/‐stat/chfaderbank ,s 2
->X, 28 B: /-stat/chfaderbank~~,s~~2~~~

/‐stat/chfaderbank ,s 3
->X, 28 B: /-stat/chfaderbank~~,s~~3~~~

/‐stat/chfaderbank ,s 4
->X, 28 B: /-stat/chfaderbank~~,s~~4~~~

/‐stat/chfaderbank ,s 5
->X, 28 B: /-stat/chfaderbank~~,s~~5~~~

/‐stat/chfaderbank ,s 6
->X, 28 B: /-stat/chfaderbank~~,s~~6~~~

/‐stat/chfaderbank ,s 7
->X, 28 B: /-stat/chfaderbank~~,s~~7~~~

/‐stat/grpfaderbank ,s 0
->X, 28 B: /-stat/grpfaderbank~,s~~0~~~

/‐stat/grpfaderbank ,s 1
->X, 28 B: /-stat/grpfaderbank~,s~~1~~~

/‐stat/grpfaderbank ,s 2
->X, 28 B: /-stat/grpfaderbank~,s~~2~~~

/‐stat/grpfaderbank ,s 3
->X, 28 B: /-stat/grpfaderbank~,s~~3~~~

/‐stat/grpfaderbank ,s 4
->X, 28 B: /-stat/grpfaderbank~,s~~4~~~

/‐stat/grpfaderbank ,s 5
->X, 28 B: /-stat/grpfaderbank~,s~~5~~~

/‐stat/grpfaderbank ,s 6
->X, 28 B: /-stat/grpfaderbank~,s~~6~~~

/‐stat/grpfaderbank ,s 7
->X, 28 B: /-stat/grpfaderbank~,s~~7~~~

/‐stat/grpfaderbank ,s 8
->X, 28 B: /-stat/grpfaderbank~,s~~8~~~

/‐stat/grpfaderbank ,s 9
->X, 28 B: /-stat/grpfaderbank~,s~~9~~~

@jsnyder886 Oh wow! what a champion! This is super helpful
Is there no way to put the group banks on the left side? so like lets say you want DCA on left and MATRIX / MAIN C on the right. In that case there would probably be enums for the group faders on left too wouldn't there?

I was actually thinking about this in the wee hours of the morning in terms of having duplicates on the mixer, yeah you would be able to do that although! How would you be able to get input 1-8 on the right side with buttons anyway because there is no banks lower than that to press or does it put whatever you press first on the left (eg hold FX RTN then press INPUT 1-8 will put it in that order?)

I'm thinking that sure the user can't put the mixer into the left right duplicate state with buttons but they should be able to do it if they really want to (would also make things complicated because if you want to for example slide the banks one block to the left then you wouldn't be able to set left set of faders to be 9-16 before setting the right side to be 17-24)

I actually agree 100% with the feedbacks of what is selected. I actually have that on the XM32 version. (Unrelated note I'm thinking of having 2 different sets of fader bank actions and feedbacks, one set for XM32 and one set for X32C/X32P/M32R) would like your opinion though with this for this case. So on the Console you obviously only have one button for say FX RTN which will glow orange no matter which side of the console it is displaying. In companion we would 2 separate actions one for setting the left side (chfaderbank) and one for setting the right side (grpfaderbank) should the feedback be on a per action basis (i.e. if you activate FX RTN on the channel bank side it will only give feedback for that one) or should it have a joined feedback where if its selected on the left or right side it will change colour of the companion button? I'm thinking the former would be easiest and more useful given there's no way to have the joint actions where you have (like on the console) 12 buttons and you can hold any 2 of them. Would it be worth while making 3 sets of feedbacks?

Just mentioned this in the PR I have up as it will be included in that one :)

@jsnyder886 Oh wow! what a champion! This is super helpful
Is there no way to put the group banks on the left side? so like lets say you want DCA on left and MATRIX / MAIN C on the right. In that case there would probably be enums for the group faders on left too wouldn't there?

No, there is no way to put the DCAs or the Matrix/Main C on the left. The only reason you can put the mix buses on the left is because there are dedicated buttons to do so on the console. I presume this was done so you can see all 16 mix buses at a glance in practice which would obviously be potentially useful...

I was actually thinking about this in the wee hours of the morning in terms of having duplicates on the mixer, yeah you would be able to do that although! How would you be able to get input 1-8 on the right side with buttons anyway because there is no banks lower than that to press or does it put whatever you press first on the left (eg hold FX RTN then press INPUT 1-8 will put it in that order?)

You're right, in practice there is no way to put inputs 1-8 on the right side for the reasons you describe, however with OSC it definitely does work; you can put inputs 1-8 on the right side. This is actually helpful to me because I have a use for putting the aux bus on the left with inputs 1-8 on the right, so I was happy I found it..😉

I'm thinking that sure the user can't put the mixer into the left right duplicate state with buttons but they should be able to do it if they really want to (would also make things complicated because if you want to for example slide the banks one block to the left then you wouldn't be able to set left set of faders to be 9-16 before setting the right side to be 17-24)

I have to agree, you're right. I've played with this more after I wrote the reply you were working off of, and there's really no harm that can come from them setting the duplicate state. Just because it's not useful doesn't mean that you necessarily have to spend any brain power on stopping it. Heck there are lots of "features" out there on products all over the world that aren't useful at all! 😂

I actually agree 100% with the feedbacks of what is selected. I actually have that on the XM32 version. (Unrelated note I'm thinking of having 2 different sets of fader bank actions and feedbacks, one set for XM32 and one set for X32C/X32P/M32R) would like your opinion though with this for this case. So on the Console you obviously only have one button for say FX RTN which will glow orange no matter which side of the console it is displaying. In companion we would 2 separate actions one for setting the left side (chfaderbank) and one for setting the right side (grpfaderbank) should the feedback be on a per action basis (i.e. if you activate FX RTN on the channel bank side it will only give feedback for that one) or should it have a joined feedback where if its selected on the left or right side it will change colour of the companion button? I'm thinking the former would be easiest and more useful given there's no way to have the joint actions where you have (like on the console) 12 buttons and you can hold any 2 of them. Would it be worth while making 3 sets of feedbacks?

I agree with you on two sets of actions and feedbacks. I don't see a practical use for three sets of feedbacks given that if I were really that concerned about it I can stack feedbacks in my companion set up to accomplish the same thing; especially for what I would imagine would be the extreme minority of cases where it might prove useful.

Glad I was able to help with the information you needed! Please don't hesitate to ask if there's anything else I can do to help.

Good morning @jsnyder886, I have implemented the actions and feedbacks on my branch. Would you by chance be able to pull my branch build and test it on your M32R? I can give you the steps if you need them but you seem pretty clued up 😊

https://github.com/justingiffard/companion-module-behringer-x32/tree/feature/x32-channelBanks

I think this is where my "clued up" image may reach the end. I can get to your fork, but I have no idea what to do to pull your build and install it to test. I'll gladly take some direction if you're willing sir.

Thanks!

Do you have sourcetree or another git gui installed? Else do you have git installed that we can work through command prompt/power shell.
Also if you can install Node 14.17.1 (heres instructions)

https://github.com/bitfocus/companion/wiki/Developing-on-Windows-10

to build companion you can can yarn then yarn dev-headless also you need to put the module-companion-behringerer-x32 that you clone from my repository (using sourcetree/git/whatever else I can guide you when I hear what you have) in the module-local-dev folder of companion. You will also need to build the x32 module so navigate to that folder (sorry didnt mention this before not sure if you know but you use the cd command followed by the path to the directory in command prompt or powershell -- or most terminals actual) then run yarn then yarn build

when you are running yarn dev-headless you can go to localhost:8000 in a browser and add x32 extention as an instance and test like normal

I have the git desktop that I installed when I was fooling around with trying to figure out how to contribute code to this project; I never did figure out how it all works incidentally.

In the process of trying to pull your build, the git desktop told me I had to install git, so I just did that. I don't know what that got me, but I did it! Ha!

I'll see if I can figure out node now.

@jsnyder886 did yoy make any progress? Can I help in any way?

Awesome sounds great.
No, no worries. Theres really no rush at all. It probably wont be merged for a while anyway.

Main reason I asked was I was just checking that you weren't still struggling when I could be helping you 😊

Shout if I can assist in anyway

So I got through the point of building companion with no problem.

Building the module not so much. Here's the yarn results. Please let me know if I'm doing something wrong..

$ yarn build
yarn run v1.22.17
$ npx rimraf dist && npx typescript@~4.5 -p tsconfig.build.json
npx: installed 1 in 1.784s
src/actions.ts:90:10 - error TS2339: Property 'oscSend' does not exist on type 'InstanceSkel'.

90 self.oscSend(self.config.host, 10023, cmd, [arg])
~~~~~~~

src/config.ts:23:4 - error TS2322: Type 'string' is not assignable to type 'ConfigValue[]'.

23 default: '',
~~~~~~~

src/index.ts:2:32 - error TS2305: Module '"../../../instance_skel_types"' has no exported member 'CompanionStaticUpgradeScript'.

2 import { CompanionConfigField, CompanionStaticUpgradeScript, CompanionSystem } from '../../../instance_skel_types'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/index.ts:89:16 - error TS2339: Property 'CreateConvertToBooleanFeedbackUpgradeScript' does not exist on type 'typeof X32Instance'.

89 X32Instance.CreateConvertToBooleanFeedbackUpgradeScript(BooleanFeedbackUpgradeMap),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/transitions.ts:30:19 - error TS2339: Property 'oscSend' does not exist on type 'InstanceSkel'.

30 this.instance.oscSend(this.instance.config.host, 10023, cmd, [arg])
~~~~~~~

src/upgrades.ts:5:2 - error TS2724: '"../../../instance_skel_types"' has no exported member named 'CompanionUpgradeContext'. Did you mean 'CompanionUpgradeScript'?

5 CompanionUpgradeContext,


src/variables.ts:55:11 - error TS2551: Property 'setVariables' does not exist on type 'InstanceSkel<X32Config>'. Did you mean 'setVariable'?

55  instance.setVariables({
          ~~~~~~~~~~~~

../../instance_skel.d.ts:88:2
 88  setVariable(variableId: string, value: string): void
     ~~~~~~~~~~~
 'setVariable' is declared here.

src/variables.ts:74:11 - error TS2551: Property 'setVariables' does not exist on type 'InstanceSkel<X32Config>'. Did you mean 'setVariable'?

74  instance.setVariables(variables)
          ~~~~~~~~~~~~

../../instance_skel.d.ts:88:2
 88  setVariable(variableId: string, value: string): void
     ~~~~~~~~~~~
 'setVariable' is declared here.


Found 8 errors.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Well I pushed forward and finally got it all to build. Now when I attempt to connect to localhost:8000, my browser page gives me the error of

Error: ENOENT: no such file or directory, stat 'C:\users\bethelav.bethelumchurch\a\companion\webui\build\index.html'

While the powershell windows gives me the error of

finalhandler default 404 +0ms
Error: ENOENT: no such file or directory, stat 'C:\users\bethelav.bethelumchurch\a\companion\webui\build\index.html'
finalhandler default 404 +41s
Error: ENOENT: no such file or directory, stat 'C:\users\bethelav.bethelumchurch\a\companion\webui\build\index.html'
lib/update update server said status 504 +1m

I'm stuck at this point. I'm willing to take direction, but I've reached the limits of my understanding for now.

Sorry.

Hi @jsnyder886, not 100% sure where you are in the process but just a sanity check for both of us:

  1. Have you cloned the companion project to your computer (from your logs it looks like yes but just making sure)
  2. Did you follow all steps in that "Developing on Windows 10"? Installed Node.js? installed NVM? Installed and switched to Node version 14.17.1? Installed yarn?
  3. Did you run ./tools/update.sh from the companion inside folder?
  4. Did you run yarn dev-headless?

If you can get that running then we can move to the X32 module which is:

  1. did you clone my branch into your module-local-dev its important that the folder is named module-companion-behringerer-x32 (you can clone it anywhere and move it into the folder too)
  2. Did you navigate to inside that folder and run yarn to install dependancies and then yarn build do build the module?
  3. At this point if you still have yarn dev-headless running from inside the companion folder you will see it will automatically refresh and rebuild and hopefully work

I really hope this helps, any more questions feel free to shout else you can always message me too

@jsnyder886 #60 has been merged, will trigger a build by this weekend

@jsnyder886 We we have a build 😃 It's in beta build: companion-2.2.0+3850

https://bitfocus.io/companion/download/builds/

Screenshot 2022-02-03 at 23 05 51