DrumPadBank and scrollPosition().

Post Reply New Topic
RELATED
PRODUCTS

Post

Is there a way to keep the selections the for each DrumPadBank when switching the cursor track?

I'm experiencing every time the cursor track switches, the drumPadBank scrolls to 36 no matter what.

Code: Select all

    drumPadBank = cursorDevice.createDrumPadBank(16);
    drumPadBank.scrollPosition().addValueObserver((i) -> {
              LogUtil.println("Drum Pad Bank Scroll Position: " + i);
    });
Screenshot 2024-06-24 at 1.40.49 PM.png
Anyone have tips about this? or is it just standard behavior at the moment? Perhaps, I should request the ability to maintain scroll position for each cursor track & cursor device changes. (Not sure how to word that).
You do not have the required permissions to view the files attached to this post.
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest

Post

So I just made a strange solution... to store my own scroll position and then reset it when it changes... so something like this...

Code: Select all

    drumPadBank.scrollPosition().addValueObserver((i) -> {
      if(scrollPosition != i) {
        drumPadBank.scrollPosition().set(scrollPosition);
      }
    });


  public void scrollUp() {

    scrollPosition = scrollPosition - 16;
    if(scrollPosition < 0) {
      scrollPosition = 0;
    }
    drumPadBank.scrollPosition().set(scrollPosition);
  }

  public void scrollDown() {
    scrollPosition = scrollPosition + 16;
    if(scrollPosition > 111) {
      scrollPosition = 111;
    }
    drumPadBank.scrollPosition().set(scrollPosition);
  }
Unfortunately, due to the proxys... I can't store the scroll position for each drum machine in play. That would be nice... any suggestions for that?
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”