# ---------------------------------------------------------------------------
# midi — the instrument as a USB MIDI device.
# ---------------------------------------------------------------------------
#
# One source file. It installs the TinyUSB device stack with a single MIDI
# interface, parses the messages the host sends — the notes, and the transport and
# clock they are played to — and hands them to the instrument through
# synth_app_midi_note_on()/_off(), synth_app_midi_clock() and
# synth_app_midi_transport().
#
# REQUIRES synth_app because those two calls are the seam, and they are the
# whole of the traffic: the MIDI side never touches a voice, a parameter or the
# engine — it only places an event in a ring the audio task drains (see the
# long note in synth_app.h). Keeping that edge explicit here is what makes the
# rule visible in the build graph rather than only in a comment.
#
# esp_tinyusb is private: tinyusb.h is included by midi_in.c and by nothing that
# depends on this component.

idf_component_register(
    SRCS
        "src/midi_in.c"
    INCLUDE_DIRS
        "include"
    REQUIRES
        synth_app
    PRIV_REQUIRES
        esp_tinyusb
)
