weskoop / Launchpad-Pro-Mk3-for-Bitwig

Launchpad Pro Mk3 Controller Script for Bitwig (Tested on 4+, should work on 3.2.5+)
GNU General Public License v3.0
48 stars 8 forks source link

Restart Script When Layout changes. #15

Closed weskoop closed 2 years ago

weskoop commented 2 years ago

The Handler for the Arrange/Mix toggle gets disconnected, so we'll need to restart the script when the Display Layout changes.

Also disable (LEDs=Off) the Arrange/Mix Toggle for any Display Layout that doesn't support it.

weskoop commented 2 years ago

Tried this handler, but it does not seem to get called on the change.

ext.app.displayProfile().addValueObserver((displayProfile) => {
  let rememberedDisplayProfile: string = "";
  if (rememberedDisplayProfile && rememberedDisplayProfile !== displayProfile) {
    host.restart();
  }
  rememberedDisplayProfile = displayProfile;
  println(`<Display changed='${displayProfile}'/>`);
});

I searched around, have no seen any other scripts observing this device. This may just need to be addressed with Documentation. "Change your Display Profile? Reconnect the LaunchPad Pro"

I will get in touch with Bitwig about this.

weskoop commented 2 years ago

Relevant Changes... 15a058f587dfe8ed33d055419c333ad9aa9ab5c4 e724b807150e887585d95646f8b3298ac55d843e