diff --git a/src/app/devices/known-devices/known-devices.ts b/src/app/devices/known-devices/known-devices.ts index 2e19415..32f5e48 100644 --- a/src/app/devices/known-devices/known-devices.ts +++ b/src/app/devices/known-devices/known-devices.ts @@ -1,7 +1,8 @@ import { Controller, Selector } from '../device/device.types'; import { novationLaunchpadX } from './novation-launchpad-x'; import { novationLaunchControlXl } from './novation-launch-control-xl'; -import { novationLaunchpadMini } from './novation-launchpad-mini'; +import { novationLaunchpadMiniMk2 } from './novation-launchpad-mini-mk2'; +import { novationLaunchpadMiniMk3 } from './novation-launchpad-mini-mk3'; /** * List of known devices. @@ -9,5 +10,6 @@ import { novationLaunchpadMini } from './novation-launchpad-mini'; export const knownDevices: (Selector | Controller)[] = [ novationLaunchpadX, novationLaunchControlXl, - novationLaunchpadMini, + novationLaunchpadMiniMk2, + novationLaunchpadMiniMk3, ]; diff --git a/src/app/devices/known-devices/novation-launchpad-mini.ts b/src/app/devices/known-devices/novation-launchpad-mini-mk2.ts similarity index 87% rename from src/app/devices/known-devices/novation-launchpad-mini.ts rename to src/app/devices/known-devices/novation-launchpad-mini-mk2.ts index 9abee34..7e4d74a 100644 --- a/src/app/devices/known-devices/novation-launchpad-mini.ts +++ b/src/app/devices/known-devices/novation-launchpad-mini-mk2.ts @@ -1,14 +1,14 @@ -import { Selector, DeviceCategory } from '../device/device.types'; +import {Selector, DeviceCategory} from '../device/device.types'; /** - * Novation Launchpad Mini + * Novation Launchpad Mini Mk2 * * @see http://leemans.ch/latex/doc_launchpad-programmers-reference.pdf */ -export const novationLaunchpadMini: Selector = { +export const novationLaunchpadMiniMk2: Selector = { category: DeviceCategory.selector, manufacturer: 'Focusrite A.E. Ltd', - name: 'Launchpad Mini', + name: 'Launchpad Mini MIDI', channels: { input: 'all', output: 1, @@ -41,7 +41,7 @@ export const novationLaunchpadMini: Selector = { yellow: 62, green: 60, }, - get colorByState () { + get colorByState() { return { inputOn: this.colors.red, inputOff: this.colors.black, @@ -61,7 +61,7 @@ export const novationLaunchpadMini: Selector = { defaultDuration: 500, longClick: 400, }, - get bootSequence () { + get bootSequence() { return { color: this.colors.red, sysex: { diff --git a/src/app/devices/known-devices/novation-launchpad-mini-mk3.ts b/src/app/devices/known-devices/novation-launchpad-mini-mk3.ts new file mode 100644 index 0000000..60b5780 --- /dev/null +++ b/src/app/devices/known-devices/novation-launchpad-mini-mk3.ts @@ -0,0 +1,21 @@ +import { Selector, DeviceCategory } from '../device/device.types'; +import { novationLaunchpadX } from './novation-launchpad-x'; + +/** + * Novation Launchpad Mini Mk3 + * + * @see Novation resources https://downloads.novationmusic.com/novation/launchpad-mk3/launchpad-mini-mk3-0 + */ +export const novationLaunchpadMiniMk3 = { + ...novationLaunchpadX, // shallow copy but it is probably not meant to be mutated anyway + name: 'Launchpad Mini MK3', // https://github.com/rienheuver/launchpad-mini-mk3/blob/master/index.js#L7 , mine is 'Launchpad Mini MK3 LPMiniMK3 MI' + get bootSequence () { + return { + color: novationLaunchpadX.colors.red, + sysex: { + manufacturer: 0, + data: [32, 41, 2, 13, 14, 1], // https://github.com/FMMT666/launchpad.py/blob/master/launchpad_py/launchpad.py#L2375 + }, + }; + }, +} as Selector;