help with "map = {}"

Announcements, questions
Post Reply
magicmt
Posts: 2
Joined: 29 May 2020, 16:42

help with "map = {}"

Post by magicmt » 29 May 2020, 16:57

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'

magicmt
Posts: 2
Joined: 29 May 2020, 16:42

Re: help with "map = {}"

Post by magicmt » 30 May 2020, 22:40

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'

Post Reply