Using CC to switch user pages of a device map?

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Post Sat Feb 10, 2018 9:28 am

If I have created a device map with more than one user page is there a way to add to the controller script to assign pages 1-8 to specific CC's? I can do this in Live but don't see how it's done in Bitwig scripting.

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Thu Feb 15, 2018 1:08 pm

Apparently this is possible - the question is how to script it?

pc999
KVRian
1289 posts since 19 Aug, 2009

Re: Using CC to switch user pages of a device map?

Post Thu Feb 15, 2018 7:17 pm

No clues on other scripts?

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Fri Feb 16, 2018 12:20 am

The example scripts don't seem to do this and the third party ones I've looked at get too complex for me to understand

User avatar
moss
KVRian
1407 posts since 13 May, 2004

Re: Using CC to switch user pages of a device map?

Post Fri Feb 16, 2018 3:50 am

aMUSEd wrote:The example scripts don't seem to do this and the third party ones I've looked at get too complex for me to understand
That's pretty simple:
1) Create a note input which filters for your MIDI CC (B0xxxx).
2) Create a remote control bank
3) If you receive the midi CC, select the page you want depending on the CC value.
4) Assign your knobs/faders to the 8 remote controls.

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Fri Feb 16, 2018 1:32 pm

Thanks - not sure what you mean by remote control bank unless by 'bank' you mean what it means in Live which is user page?

Anyway found this code which shows how to scroll pages using note input but what I want is to map the 8 buttons of my Komplete Kontrol to the first 8 pages of a mapped device (already made those)

https://www.keithmcmillen.com/blog/cont ... io-part-7/

This is the script I'm using so far (just based on the default one)

https://www.dropbox.com/s/748mwedkbzh8o ... s.zip?dl=1

User avatar
moss
KVRian
1407 posts since 13 May, 2004

Re: Using CC to switch user pages of a device map?

Post Sat Feb 17, 2018 1:55 am

aMUSEd wrote:This is the script I'm using so far (just based on the default one)

https://www.dropbox.com/s/748mwedkbzh8o ... s.zip?dl=1
It does exactly what I wrote. You only need to add to scroll up and down on the object "remoteControls".
I suggest also to remove the "createUserControls", which is not really need anymore.

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Sat Feb 17, 2018 2:10 am

Cool thanks - so here?

Code: Select all

remoteControls = cursorDevice.createCursorRemoteControlsPage(16);

	for ( var i = 0; i < 16; i++)
	{
		var p = remoteControls.getParameter(i).getAmount();
		p.setIndication(true);
		p.setLabel("P" + (i + 1));
}

What exactly do I need to add? (not familiar with scripting so pretty much winging it)

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Sat Feb 17, 2018 2:11 am

Isn't this the part that tells it to map hardware knobs to the device controls though? Why would I want to take it out?

Code: Select all

userControls = host.createUserControls(HIGHEST_CC - LOWEST_CC + 1 - 16);

	for ( var i = LOWEST_CC; i < HIGHEST_CC; i++)
	{
		if (!isInDeviceParametersRange(i))
		{
			var index = userIndexFromCC(i);
			userControls.getControl(index).setLabel("CC" + i);
		}

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Mon Feb 19, 2018 1:44 pm

aMUSEd wrote:Cool thanks - so here?

Code: Select all

remoteControls = cursorDevice.createCursorRemoteControlsPage(16);

	for ( var i = 0; i < 16; i++)
	{
		var p = remoteControls.getParameter(i).getAmount();
		p.setIndication(true);
		p.setLabel("P" + (i + 1));
}

What exactly do I need to add? (not familiar with scripting so pretty much winging it)
OK tried adding this but I just keep making it crash

Code: Select all

controlPageCursor.selectNextPage(true);
			}
			else if (cc = 22)
			{
		controlPageCursor.selectPreviousPage(true);
			}
			else if (cc = 23)

User avatar
aMUSEd
KVRAF
30075 posts since 14 Sep, 2002 from In teh net

Re: Using CC to switch user pages of a device map?

Post Sat Mar 10, 2018 2:36 pm

Well I've just hit a dead end with this, not getting anywhere

Return to “Controller Scripting”