# -*- mode: org; coding: utf-8; -*- #+LaTeX_CLASS: zzkt-article #+LateX_Header: \setcounter{secnumdepth}{0} #+OPTIONS: toc:2 num:nil html-style:nil #+title: XONE:K2 file:img/XONE-K2-squared.jpg * install & setup requirements #+BEGIN_SRC shell :dir :wrap SRC text :results raw python -m pip install oscpy mido python-rtmidi argparse #+END_SRC make it go #+BEGIN_SRC shell :dir :wrap SRC text :results raw python k2-misc.py #+END_SRC usage #+BEGIN_SRC text usage: k2-misc [-h] [--host OSC-host] [--port OSC-port] [--midi MIDI-port] [-v verbose] [-q quiet] MIDI->OSC bridge for Allen & Heath XONE:K2 controller options: -h, --help show this help message and exit --host OSC-host hostname or address of OSC destination --port OSC-port port for OSC messages --midi MIDI-port port name of MIDI device -v verbose -q quiet #+END_SRC defaults #+BEGIN_SRC shell :dir :wrap SRC text :results raw python k2-misc.py --host "127.0.0.1" --port 5111 --midi 'XONE:K2' #+END_SRC * Overview * Physical layout XONE:K2 Publication AP8509 ** Rotary Encoders Turning an encoder produces MIDI CC (continuous controller) messages with a unique controller number in two’s compliment binary encoding These encoders feature a built in momentary push switch. Pressing down on the encoder knob activates the switch and sends a “Note On” MIDI message, releasing the switch sends a corresponding “Note Off” message. The window below the top row of encoders can be used to display the state of the encoder switch in the same manner as the other switches. ** Rotary Potentiometers These controls are standard potentiometers with end stops. Turning a pot from left to right will send MIDI messages with a unique CC number and a control value from 0 to 127. ** Pot Switches Each rotary potentiometer has a switch with tri-colour illumination below it. ** Linear Faders Moving a linear fader will send a MIDI message with a unique CC number and a control value from 0 (bottom) to 127 (top). ** Switch Matrix The switch matrix consists of 16 back-lit tri-colour switches. ** Layer Button The Layer button is completely user assignable but can also function as an embedded layer button. * OSC layout & mapping Physical controls are numbered L->R and top->down [[file:img/K2-layout.png]] ** Rotary potentiometers Rotary potentiometers are numbered 1-12 (soft sync/pickup?) and send value 0-127 when turned, and =pressed= / =released= messages are sent when knobs are pressed (and released). #+BEGIN_SRC text /xone/k2/rp/ /xone/k2/rp//pressed /xone/k2/rp//released #+END_SRC ** Rotary encoders Rotary encoders on the top row are numbered 1-4 and the bottom row are numbered 5 and 6. Encoders send =inc= messages when turned right (clockwise) or =dec= when lurned left (widdershins). While turned & pressed, the encoder sends =inc-fine= and =dec-fine= messages. #+BEGIN_SRC text /xone/k2/re//inc /xone/k2/re//dec /xone/k2/re//inc-fine /xone/k2/re//dec-fine #+END_SRC ** Linear faders Linear faders are numbered 1-4 and send values from 0 (fully down) up to 127 (fully up). #+BEGIN_SRC text /xone/k2/fader//value #+END_SRC ** Buttons The upper block of buttons (above the faders) are numbered from 1-12 and the lower block (grid below the faders) are named =A-P=, =LAYER=, and =SHIFT= as labled) #+BEGIN_SRC text /xone/k2/button//pressed /xone/k2/button//released #+END_SRC set button colour (not yet implemented) #+BEGIN_SRC text /xone/k2/button//set = red, orange, green, off (string) #+END_SRC * MIDI layout (MIDI IMPLEMENTATION SEND / RETURN) By default the MIDI Channel number is set to 15 (14) to prevent control interaction with Xone DB series mixers which default to channel 16 (15). [[file:img/XONE-K2-layers.jpg]] * MIDI NOTE IMPLEMENTATION TABLE | DEC | HEX | NOTE | | 0 | 00 | C-1 | | 1 | 01 | C#-1 | | 2 | 02 | D-1 | | 3 | 03 | D#-1 | | 4 | 04 | E-1 | | 5 | 05 | F-1 | | 6 | 06 | F#-1 | | 7 | 07 | G-1 | | 8 | 08 | G#-1 | | 9 | 09 | A-1 | | 10 | 0A | A#-1 | | 11 | 0B | B-1 | | 12 | 0C | C0 | | 13 | 0D | C#0 | | 14 | 0E | D0 | | 15 | 0F | D#0 | | 16 | 10 | E0 | | 17 | 11 | F0 | | 18 | 12 | F#0 | | 19 | 13 | G0 | | 20 | 14 | G#0 | | 21 | 15 | A0 | | 22 | 16 | A#0 | | 23 | 17 | B0 | | 24 | 18 | C1 | | 25 | 19 | C#1 | | 26 | 1A | D1 | | 27 | 1B | D#1 | | 28 | 1C | E1 | | 29 | 1D | F1 | | 30 | 1E | F#1 | | 31 | 1F | G1 | | 32 | 20 | G#1 | | 33 | 21 | A1 | | 34 | 22 | A#1 | | 35 | 23 | B1 | | 36 | 24 | C2 | | 37 | 25 | C#2 | | 38 | 26 | D2 | | 39 | 27 | D#2 | | 40 | 28 | E2 | | 41 | 29 | F2 | | 42 | 2A | F#2 | | 43 | 2B | G2 | | 44 | 2C | G#2 | | 45 | 2D | A2 | | 46 | 2E | A#2 | | 47 | 2F | B2 | | 48 | 30 | C3 | | 49 | 31 | C#3 | | 50 | 32 | D3 | | 51 | 33 | D#3 | | 52 | 34 | E3 | | 53 | 35 | F3 | | 54 | 36 | F#3 | | 55 | 37 | G3 | | 56 | 38 | G#3 | | 57 | 39 | A3 | | 58 | 3A | A#3 | | 59 | 3B | B3 | | 60 | 3C | C4 | | 61 | 3D | C#4 | | 62 | 3E | D4 | | 63 | 3F | D#4 | | 64 | 40 | E4 | | 65 | 41 | F4 | | 66 | 42 | F#4 | | 67 | 43 | G4 | | 68 | 44 | G#4 | | 69 | 45 | A4 | | 70 | 46 | A#4 | | 71 | 47 | B4 | | 72 | 48 | C5 | | 73 | 49 | C#5 | | 74 | 4A | D5 | | 75 | 4B | D#5 | | 76 | 4C | E5 | | 77 | 4D | F5 | | 78 | 4E | F#5 | | 79 | 4F | G5 | | 80 | 50 | G#5 | | 81 | 51 | A5 | | 82 | 52 | A#5 | | 83 | 53 | B5 | | 84 | 54 | C6 | | 85 | 55 | C#6 | | 86 | 56 | D6 | | 87 | 57 | D#6 | | 88 | 58 | E6 | | 89 | 59 | F6 | | 90 | 5A | F#6 | | 91 | 5B | G6 | | 92 | 5C | G#6 | | 93 | 5D | A6 | | 94 | 5E | A#6 | | 95 | 5F | B6 | | 96 | 60 | C7 | | 97 | 61 | C#7 | | 98 | 62 | D7 | | 99 | 63 | D#7 | | 100 | 64 | E7 | | 101 | 65 | F7 | | 102 | 66 | F#7 | | 103 | 67 | G7 | | 104 | 68 | G#7 | | 105 | 69 | A7 | | 106 | 6A | A#7 | | 107 | 6B | B7 | | 108 | 6C | C8 | | 109 | 6D | C#8 | | 110 | 6E | D8 | | 111 | 6F | D#8 | | 112 | 70 | E8 | | 113 | 71 | F8 | | 114 | 72 | F#8 | | 115 | 73 | G8 | | 116 | 74 | G#8 | | 117 | 75 | A8 | | 118 | 76 | A#8 | | 119 | 77 | B8 | | 120 | 78 | C9 | | 121 | 79 | C#9 | | 122 | 7A | D9 | | 123 | 7B | D#9 | | 124 | 7C | E9 | | 125 | 7D | F9 | | 126 | 7E | F#9 | | 127 | 7F | G9 | * various - Allen & Heath [[https://www.allen-heath.com/hardware/xone-series/xonek2/][hardware notes]] & MIDI docs - see also https://github.com/taw10/x1k2-midi-osc-alsa