Skip to content

Control MIDI APC40II

Pete edited this page Aug 2, 2020 · 8 revisions

APC 40 Mark 2

Until convinced otherwise, I am going to use MIDI In and not MIDI In Map.

Comp will be Container, mostly for visual feedback of MIDI status

Each Container will be a "bank". It will get it's bank number (MIDI Channel number) from me.digits

MIDI In

Options:

  • MIDI In is inside Container?
    • more portable?
  • MIDI In gets connected to only input of Container
    • more backward compatible?

Outs

should probably be individual Out CHOP for each function?

  • Out 6 - Knob
  • Out 5 - Clips (includes 5 clip buttons and clip stop?)
    • these may need to keep original MIDI name for feedback later?
    • or feedback / button mode is built into this COMP?
  • Out 4 - DevKnobs
  • Out 3 - DevButtons
  • Out 2 - Buttons
  • Out 1 - Fader

Device Knobs

Current Version: uses mode 0x40, allows config of LED feedback and Math CHOP remapping Uses Logic CHOPs, need to switch to CHOP Executes? Python

LED Configs: Off, Single, Volume Style, Pan Style

Probably should limit to Off, Volume, Pan. Single is sometimes hard to see around the knob.

Also has buttons to reset all LED modes and reset knob positions (out, half, full) troubles getting UI to update with knobs. More Python

Sending MIDI to the APC40MK2:

Knobs MIDI (aka MIDI CC?):

  • 0xB# where # = MIDI Channel (0-8 aka which track)
  • 0x## where ## = Control ID (aka which knob)
  • 0x## where ## = Control Value

Track Knobs

Set Value: (indicator position)

Track 1 2 3 4 5 6 7 8
0xHEX 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
Deci 48 49 50 51 52 53 54 55

Set Mode: (indicator style) 0=Off, 1=Single, 2=Volume, 3=Pan

Knob 1 2 3 4 5 6 7 8
0xHEX 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F
Decimal 56 57 58 59 60 61 62 63

Device Knobs MIDI Channel 0-7 = Track Number 1-8, MIDI Channel 8 = Master

Set Value: (indicator position)

Knob 1 2 3 4 5 6 7 8
0xHEX 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
Deci 16 17 18 19 20 21 22 23

Set Mode: (indicator style) 0=Off, 1=Single, 2=Volume, 3=Pan

Knob 1 2 3 4 5 6 7 8
0xHEX 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
Deci 24 25 26 27 28 29 30 31

Clip Buttons

color coding - maybe based on connected module?

can make some be grouped? up to 2 groups (only way to split 5 buttons...)?

toggle or momentary (or "radio" for grouped mode...)

Master Section

probably a couple COMPs...

MIDI Commands Reference

You can send raw MIDI packets to the control via python using either the send() or sendExclusive() methods, and you can actually still send "SysEx" messages raw with the send() method:

op('midiout1').sendExclusive(...) or:
op('midiout1').send(0xF0, ..., 0xF7)

You may also use hexadecimal or regular decimal values when sending:

op('midiout1').send(0xF0, ..., 0xF7) or:
op('midiout1').send(240, ..., 247)

"Magic" Packet

AKA switches the APC40MK2 between it's three different operating modes.
You have to do this everytime the controller is restarted if you want mode 2 or 3.

Send a System Exclusive MIDI packet to the controller in the following format, only changing the seventh "Config" byte (eighth if you count the SysEx header)

op('midiout1').send(0xF0, 0x47, 0x00, 0x29, 0x60, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0xF7) Using Hexadecimal
op('midiout1').send( 240,   71,    0,   41,   96,    0,    4,   64,    0,    0,    0,  247) Using Decimal
SysEx Manu DvID MdID MTyp szMS szLS CNFG verH verL bgfx /SysEx
HEX 0xF0 0x47 0x00 0x29 0x60 0x00 0x04 0x40 0x00 0x00 0x00 0xF7
DEC 240 71 0 41 96 0 4 64 0 0 0 247
  • Mode 1 - Internal Banking / Automatic LEDs - DEFAULT

op('midiout1').sendExclusive(0x47, 0x00, 0x29, 0x60, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00)

  • Mode 2 - No Banking / Automatic LEDs

op('midiout1').sendExclusive(0x47, 0x00, 0x29, 0x60, 0x00, 0x04, 0x41, 0x00, 0x00, 0x00)

  • Mode 3 - No Banking / Manual LEDs

op('midiout1').sendExclusive(0x47, 0x00, 0x29, 0x60, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00)

Clone this wiki locally