[{"data":1,"prerenderedAt":27},["ShallowReactive",2],{"project-libmackie-":3},{"page":4,"others":23},{"slug":5,"src":6,"title":7,"source":8,"toc":9,"html":22},"","README.md","libmackie","https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Flibmackie\u002Fblob\u002F3f45d99be73faaa3f2b103c300c42748cd719d99\u002FREADME.md",[10,13,16,19],{"id":11,"title":12},"where-it-sits","Where it sits",{"id":14,"title":15},"the-control-map","The control map",{"id":17,"title":18},"provenance","Provenance",{"id":20,"title":21},"licence","Licence","\u003Ch1 id=\"libmackie\">libmackie\u003C\u002Fh1>\n\u003Cp>A C library for the Mackie Control (MCU) protocol that motorised MIDI control surfaces such as\nthe Behringer X-Touch speak: encoders and decoders for motor faders, buttons and their lamps,\nV-Pots and their LED rings, the jog wheel, meters, scribble strips and their backlights, the\nseven-segment displays and the host-connection handshake.\u003C\u002Fp>\n\u003Cp>It is a codec and nothing else. Every function is pure, over caller memory: no MIDI port, no\nclock, no thread, no allocation. The host already owns a MIDI transport (ALSA sequencer, raw\nMIDI, a DAW's own) and carries the bytes; libmackie says what they are.\u003C\u002Fp>\n\u003Ch2 id=\"where-it-sits\">Where it sits\u003C\u002Fh2>\n\u003Cp>libmackie is the wire layer under a surface behaviour layer (motor policy, touch, banking,\nrepaint) that is shared by MIDI surfaces and by DigiNet desks such as the Digidesign Control|24\n(\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Flibdiginet\">libdiginet\u003C\u002Fa>). MIDI bytes never cross into that\nlayer: libmackie encodes and decodes them, and the host carries them. The design is on\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Flibdiginet\u002Fissues\u002F29\">libdiginet#29\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"the-control-map\">The control map\u003C\u002Fh2>\n\u003Cp>Which note, CC or pitch-bend channel each control sits on is the surface's, not the\nprotocol's. The host fills a \u003Ccode>struct mackie_map\u003C\u002Fcode> from its own surface profile, the one source\nof every address, and every encoder and decoder reads it. libmackie keeps no second table of\naddresses beside the profile; \u003Ccode>mackie_map_check()\u003C\u002Fcode> refuses a map it cannot use, whole.\u003C\u002Fp>\n\u003Ch2 id=\"provenance\">Provenance\u003C\u002Fh2>\n\u003Cp>The codec is a port of a TypeScript MCU module (the X-Touch adapter's \u003Ccode>mcu.ts\u003C\u002Fcode>) that drives\nX-Touches in production. It is held to that module byte for byte: \u003Ccode>tools\u002Fgen-goldens.mjs\u003C\u002Fcode> ran\nevery TypeScript encoder and decoder over a set of inputs and wrote what they returned into\n\u003Ccode>tests\u002Fgolden\u002Fmcu_golden.h\u003C\u002Fcode>, and \u003Ccode>tests\u002Ftest_golden.c\u003C\u002Fcode> checks every C encoder and decoder\nagainst it. The host-connection handshake is pinned to an exchange captured live on an X-Touch\n(firmware V1.22).\u003C\u002Fp>\n\u003Cp>Building and testing: \u003Ca href=\"\u002Fprojects\u002Flibmackie\u002Fbuilding\">BUILDING.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"licence\">Licence\u003C\u002Fh2>\n\u003Cp>GPL-3.0-or-later. See \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Flibmackie\u002Fblob\u002F3f45d99be73faaa3f2b103c300c42748cd719d99\u002FLICENSE\">LICENSE\u003C\u002Fa>.\u003C\u002Fp>\n",[24],{"slug":25,"title":26},"building","Building libmackie",1793954996285]