updating for 2.0 - pointing old envelope and common sections to pages

RELATED
PRODUCTS

Post

Hi all

my little midimix script needs a small update to work with the simplified 2.0 architecture

As you can see in the code, the old common, macro and envelope sections are controlled by 3 sets of 8 discrete CC's.
I now just want them to address pages 1,2 & 3 of the remote control editor.
CC 57-64 = Page 1
CC 8-15 = Page 2
CC 16-24 = Page 3

Could anyone suggest the code to do this?
Im hopeless reading the API

Code: Select all

// functions.js
var parameters = {
	offset: 25
  ,
	control: function(data1, data2)
 	{
 		if(data1 >= this.offset && data1 < this.offset + 8 ){
			cursorDevice.getParameter(data1 - this.offset).set(data2,128);
 		}
 	},

	envelope: function(data1, data2)
 	{
 		if(data1 >= this.offset - 9 && data1 < this.offset){
			cursorDevice.getEnvelopeParameter(data1 - (this.offset - 9)).set(data2,128);
 		}
 	},

	common: function(data1, data2)
	{
		if(data1 >= this.offset - 17 && data1 < this.offset - 9){
			cursorDevice.getCommonParameter(data1 - (this.offset - 17)).set(data2,128);
		}
	},

	macro: function(data1, data2) {
	    var macroIndex = data1 - (this.offset +32);

	    if (macroIndex >= 0 && macroIndex < 8) {
	         cursorDevice.getMacro(macroIndex).getAmount().set(data2, 128);
	      }
	   },
	pageScroll: function(data1, data2) {
if (data2 != 0) {
if (data1 >= 33 && data1 <= 39)
cursorDevice.setParameterPage(data1 - 30);
if (data1 === 40)
cursorDevice.setParameterPage(10);
if (data1 >= 49 && data1 <= 56)
cursorDevice.setParameterPage(data1 - 38);
}
},

 	update: function()
 	{
 		for(var p = 0; p <8; p ++)
 		{
 			cursorDevice.getParameter(p).setIndication(true)
 		}
 	}

}

Post

Just looking at the API now, not even sure if this will be possible

To control multiple pages simultaneously

Post

Without having testing it, two ideas come to my mind:

1) Create a remote control bank with > 8 controls
2) Create multiple remote control banks

Post

Thanks Moss

Will a remote control bank with > 8 controls, spill over from page one to page two?

ill have a go

Post

dcupmusic wrote:Thanks Moss

Will a remote control bank with > 8 controls, spill over from page one to page two?

ill have a go
I think it should, but as I wrote I have not tested it.

Post

Sorry, I dont know where to begin

My guess is i have to update this function, but i dont know how to make it address only the first page

Code: Select all

envelope: function(data1, data2)
    {
       if(data1 >= this.offset - 9 && data1 < this.offset){
         cursorDevice.getEnvelopeParameter(data1 - (this.offset - 9)).set(data2,128);
       }
    },

Post

I currently struggle with the same topic. From the docs it's not clear to me how the new system works.

Code: Select all

cursorTrack = host.createArrangerCursorTrack(8,0);
cursorDevice = cursorTrack.createCursorDevice("DeskDevice");
cursorPage1 = cursorDevice.createCursorRemoteControlsPage("Fader", 8, "");
I get no error, but also I seem to be unable to set the page index with:

Code: Select all

cursorPage1.selectedPageIndex().set(0);
If I check the selectedPageIndex, it's always -1

Code: Select all

cursorPage1.selectedPageIndex().addValueObserver(function(value) {
	println(value);
});
I basically only want to access the Preset Pages by number...

And I thought the old API was complicated ;-)

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

ThomasHelzle wrote:

Code: Select all

cursorTrack = host.createArrangerCursorTrack(8,0);
Could it be that you are using the method createArrangerCursorTrack as opposed to one of the three createCursorTrack methods that are independent of whether you are looking at the arranger or clip launcher?

From the API:
CursorTrack createArrangerCursorTrack (final int 
numSends, final int 
numScenes )
Returns an object that represents the cursor item of the arranger track selection.
CursorTrack createCursorTrack
(final String 
name, final int 
numSends, final int 
numScenes )

Returns an object that represents a named cursor track, that is independent from the arranger or mixer track selection in the user interface of Bitwig Studio.

Post

Well, I actually need a cursor track that can both be selected with the controller but also follows the user selection. I can of course try it out, but if it was that, I guess it would be a bug?
I didn't make any progress so far, although I tested a lot of things...

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

On another tangent: did anybody get any remote controls to work via the API at all?

It's also not clear to me if and how the per-preset pages would be different from the per-device pages...?

Overall I like the direction of the new API, makes much more sense in general, but some areas I just don't grok at all yet.

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

ThomasHelzle wrote:Well, I actually need a cursor track that can both be selected with the controller but also follows the user selection. I can of course try it out, but if it was that, I guess it would be a bug?
I didn't make any progress so far, although I tested a lot of things...

Cheers,

Tom
There's a third method signature for createCursorTrack that seems to do what you want:
CursorTrack createCursorTrack
(final String id, String name, final int numSends, final int numScenes, boolean shouldFollowSelection )

Post

Does it work for you or are you just theoretically pointing out things odz?

For me it makes no difference which kind of cursorTrack I use and the cursorTrack as such works just fine in my older script and this one, it's the Remote Controls that are not doing anything here.

Maybe it's simply broken, off to support I go...

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

I'm just pointing :) I'm gonna start working on some scripts of my own when I have my thesis done but for now I'm just reading through the API a bit.

Post

Fair enough, but that doesn't really help me... ;-)
If anybody can get Remote Controls to actually work, I'm all ears though!!!

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post

Hey guys,

I got feedback from Nick on this and it seems what I'm doing is basically right, so he assumes it's a bug.
He will work on it ASAP so don't waste any time on this area yet.
I'll report back as soon as I have more info or when there's a fix.

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post Reply

Return to “Controller Scripting”