Page 1 of 1

help with "map = {}"

Posted: 29 May 2020, 16:57
by magicmt
I have modified this script and it's working beautifully:

Turning cheap USB numeric keyboard into 4x4 drum pad controller for Ableton
viewtopic.php?f=12&t=529

However, I want to be able to use 2 keyboards (2 numpads to be specific).

Is it possible to have 2 sets of "map = {}", one for each kb?

For example

Keyboard 1
map = {};
map[100] = 'a'; -- numeric keyboard '4'
map[101] = 'b'; -- numeric keyboard '5'
map[102] = 'c'; -- numeric keyboard '6'

Keyboard 2
map = {};
map[100] = '1'; -- numeric keyboard '4'
map[101] = '2'; -- numeric keyboard '5'
map[102] = '3'; -- numeric keyboard '6'

Re: help with "map = {}"

Posted: 30 May 2020, 22:40
by magicmt
I think i got it. This seems to work.

Keyboard 1
map = {};
map[100] = 'a'; -- numeric keyboard '4'
map[101] = 'b'; -- numeric keyboard '5'
map[102] = 'c'; -- numeric keyboard '6'

Keyboard 2
map2 = {};
map2[100] = '1'; -- numeric keyboard '4'
map2[101] = '2'; -- numeric keyboard '5'
map2[102] = '3'; -- numeric keyboard '6'