const_hoisted_1=/* @__PURE__ */createStaticVNode('<h1id="midi"tabindex="-1">MIDI<aclass="header-anchor"href="#midi"aria-label="Permalink to "MIDI""></a></h1><h2id="usage"tabindex="-1">Usage<aclass="header-anchor"href="#usage"aria-label="Permalinkto"Usage""></a></h2><p>First,enableMIDIbyaddingthefollowingtoyour<code>rules.mk</code>:</p><divclass="language-makevp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">make</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MIDI_ENABLE=yes</span></span></code></pre></div><p>TherearetwoMIDIsystemsinQMK:basicandadvanced.WithbasicMIDIyouwillonlybeabletosendNoteOnandNoteOffmessagesusingthenotekeycodes,meaningthatkeycodeslike<code>MI_OCTU</code>and<code>MI_OCTD</code>willnotwork.AdvancedMIDIallowsyoutodothingslikeoctaveshifts,channelchanges,velocitychanges,modulation,andmore.</p><h3id="caveats"tabindex="-1">Caveats<aclass="header-anchor"href="#caveats"aria-label="Permalinkto"Caveats""></a></h3><p>MIDIrequires2USBendpointsandassuchmaynotworkonsomehardwaresuchasV-USBcontrollers.</p><h3id="basic-midi"tabindex="-1">BasicMIDI<aclass="header-anchor"href="#basic-midi"aria-label="Permalinkto"BasicMIDI""></a></h3><p>ToenablebasicMIDI,addthefollowingtoyour<code>config.h</code>:</p><divclass="language-cvp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">c</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MIDI_BASIC</span></span></code></pre></div><h3id="advanced-midi"tabindex="-1">AdvancedMIDI<aclass="header-anchor"href="#advanced-midi"aria-label="Permalinkto"AdvancedMIDI""></a></h3><p>ToenableadvancedMIDI,addthefollowingtoyour<code>config.h</code>:</p><divclass="language-cvp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">c</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MIDI_ADVANCED</span></span></code></pre></div><h4id="sending-control-change-cc-messages"tabindex="-1">SendingControlChange(CC)Messages<aclass="header-anchor"href="#sending-control-change-cc-messages"aria-label="Permalinkto"SendingControlChange(CC)Messages""></a></h4><p>Ifyou'reaimingtoemulatethefeaturesofsomethinglikeaLaunchpadorotherMIDIcontrolleryou'llneedtoaccesstheinternalMIDIdevicedirectly.</p><p>BecausetherearesomanypossibleCCmessages,notallofthemareimplementedaskeycodes.Additionally,youmightneedtoprovidemorethanjusttwovaluesthatyouwouldgetfromakeycode(pressedandreleased)-forexample,theanalogvaluesfromafaderorapotentiometer.So,youwillneedtoimplement<ahref="./../feature_macros">customkeycodes</a>ifyouwanttousetheminyourkeymapdirectlyusing<code>process_record_user()</code>.</p><p>Forreferenceofallthepossiblecontrolcodenumberssee<ahref="#midi-specification">MIDISpecification</a></p><h4id="example-code-for-using-generic-on-off-switches-as-per-midi-specification"tabindex="-1">ExamplecodeforusingGenericOnOffSwitchesasperMIDISpecification.<aclass="header-anchor"href="#example-code-for-using-generic-on-off-switches-as-per-midi-specification"aria-label="Permalinkto"ExamplecodeforusingGenericOnOffSwitchesasperMIDISpecification.""></a></h4><divclass="language-cvp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">c</span><preclass="shikishiki-themes