How to scroll to track

Post Reply New Topic
RELATED
PRODUCTS

Post

In API Manual it says I can make a track visible by using scrollToChannel ( int position ).

If I make a trackbank for the whole session on init with:

Code: Select all

tracks = host.createTrackBank(100,7,7);
then using this command to make a track visible:

Code: Select all

tracks.scrollToChannel(3);
Doesn't work for me :(
Has anybody got this working?

Post

fhill2 wrote:In API Manual it says I can make a track visible by using scrollToChannel ( int position ).

If I make a trackbank for the whole session on init with:

Code: Select all

tracks = host.createTrackBank(100,7,7);
then using this command to make a track visible:

Code: Select all

tracks.scrollToChannel(3);
Doesn't work for me :(
Has anybody got this working?
You may have run into a bug, send to tech support.

Mike
Michael Schmalle
http://www.teotigraphix.com
Surfing on sine waves

Maschine4Bitwig - Studio, MK2, MikroMK2, MK1
http://www.teotigraphix.com/bitwig/maschine

Post

I don't think it's a bug as the API documentation says "Scrolls the channel bank *window*". With a window size as huge as 100, the trackBank's first page most likely contains all channels of the project, so there is no trackbank window to be moved.

If you had a smaller trackBank window of size 4 and you said trackBank.scrollToChannel(6), the trackBank would correctly switch to its second page. The (absolute) channel index 6 would then be represented by trackBank.getChannel(2).

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Based on my experiences, I suspect that the window is supposed to represent a mapping of the controller to a square of clips on the screen, and "scrollToWindow()" may not necessarily imply actual updating of the GUI.
BufoBufo wrote:a smaller trackBank window of size 4 and you said trackBank.scrollToChannel(6), the trackBank would correctly switch to its second page. The (absolute) channel index 6 would then be represented by trackBank.getChannel(2).
This makes perfect sense, but I've been using a small bank size and it doesn't seem to matter.

What I've tried so far:

Code: Select all (#)

trackBank = host.createMainTrackBank( 8, 0, 8 ); // 8 clips x 8 scenes

trackBank.scrollToScene( 5 ); // selects page but does not scroll to the scene
trackBank.getClipLauncherScenes().launch( 0 );  // launches clip #6 but does not scroll
trackBank.getTrack(0).getClipLauncherSlots().select(0); // selects clip #1 but does not scroll
trackBank.getTrack(0).getClipLauncherSlots().select(5); // selects clip #6 but also does not scroll
I figured that if scrollToScene() does not scroll to the scene, and launch() does not scroll to the scene, maybe "select" would. But it does not.

The other thing I noticed is that getClipLauncherSlots().select() does not respect TrackBank's current scene offset. Bug? Hmm. That's annoying, guess I could create a separate super-wide track bank in order to launch clips directly?

The workaround may be to get/watch the current offset and call "scroll down/up" functions...which seems kind of lame? And may not scroll the window...

[Update] Clearly I misunderstood how the scrollToScene command works. If you call ClipLauncherSlots.setIndication(true) it becomes quickly apparent that page offset can only be selected in exact multiples of the page size, and that the call to scrollToScene() scrolls the page to that screen index, but then any future calls to launch() or select() are truncated to the scene size. Which is weird. Er, so this is a tangent but if anybody finds this via google, the trick to launch() or select() scene 9 in a bank size of 8 is

Code: Select all (#)

trackBank.scrollToScene( 8 ); // will set the window to "page 2" which contains scene 9
 trackBank.getClipLauncherScenes().launch( 0 ); // launch first scene within page 2 (scene % pageSize) 

Post

EDIT: I just read the whole thread. Woops. So I edited this post.

Just to confirm what you're saying, I don't think that "scroll" really means scroll in the GUI. I think it means just to scroll within whatever trackBank you've created. I can't figure out if there is a way to scroll in the GUI though, anyone know if there is one?

Post Reply

Return to “Controller Scripting”