PagedMKtl:
Filter:
Modality-toolkit/Classes (extension) | Undocumented classes

PagedMKtl
ExtensionExtension

polyphonic control and paging for MKtls

Description

In Modality, one can have several MKtls for the same device, and switch between them, like hardware controller pages. One can also activate them polyphically if desired, e.g. to control multiple similar processes from the same gestures.

A PagedMKtl lets one make such pages for a single physical controller. It has a dict of several MKtls, which are all controlled from the same physical interface. Paging to one contained MKtl enables it, and disables all other pages/mktls.

NOTE: Due to the current implementation of HIDMKtlDevice, all MKtls will point to the same instance of HIDMKtlDevice.

First code examples:

Class Methods

.all

all PagedMktls by name.

.new

make a paged MKtl

Arguments:

name

name for the PagedMKtl

mktlNames

an array of names of MKtl names which already exist, and which are usually all controlled from the same physical interface.

pageNames

an optional list of names for the pages, which can be different from the MKtl names.

Instance Methods

.name

the name of the PagedMKtl

.mktlDict

the dict of mktls used as pages

.pageNames

get the list of pageNames

.currMktl

get currently active MKtl/page

.currPage

get the currently active page name

.currIndex

get the index of the currently active page name

.up

.down

step pages by + 1 / -1

.page

page to a name or index

.pageByIndex

Arguments:

index
wrap

.pageByName

Arguments:

pageKey

.allOff

turn all pages off