tree: 636c83a6ca4820c350ea7696e69542354aff2fe7 [path history] [tgz]
  1. OWNERS
  2. README.md
  3. client.cc
  4. client.h
  5. client_tracker.cc
  6. client_tracker.h
  7. constants.h
  8. daemon.cc
  9. daemon.h
  10. dbus_permissions/
  11. device.cc
  12. device.h
  13. device_tracker.cc
  14. device_tracker.h
  15. file_handler.cc
  16. file_handler.h
  17. init/
  18. libmidis.pc.in
  19. libmidis/
  20. main.cc
  21. midis.gyp
  22. mojo/
  23. platform2_preinstall.sh
  24. ports.cc
  25. ports.h
  26. seccomp/
  27. seq_handler.cc
  28. seq_handler.h
  29. seq_handler_interface.h
  30. subdevice_client_fd_holder.cc
  31. subdevice_client_fd_holder.h
  32. tests/
midis/README.md

Midis: MIDI Service

ABOUT

Midis (MIDI service) is a system service for processing MIDI(https://en.wikipedia.org/wiki/MIDI) events. It can communicate information about device connection/disconnection to several client applications, and pass file descriptors to these clients to send and receive MIDI messages to and from hardware, respectively.

KEYWORDS

Client - A userspace process that establishes an IPC connection with midis. Once the connection is established, it can listen for device connection / disconnection messages sent from midis, and can also request for file descriptors to listen to different MIDI H/W devices and write to them.

Device - Representation of a MIDI h/w device in midis. It is considered analogous to the ALSA sequencer concept of a “client”. A device consists of multiple subdevices (referred to in ALSA sequencer parlance as “ports”).

IMPORTANT MISC CLASSES

SeqHandlerBase - Interface which is used to perform all interactions with the ALSA sequencer interface. Each object of class DeviceTracker requires one implementation of SeqHandlerBase to be supplied to it.

DeviceTracker - Performs management and book-keeping of devices. Watches the ALSA sequencer interface for notifications about device connection / disconnection, and accordingly creates / destroys objects of class Device. Also handles all incoming MIDI data from clients to H/W and vice-versa and invokes the requisite callbacks to ensure the data is sent correctly.

ClientTracker - Performs management and book-kepeing of clients. Watches the IPC interface for incoming client connection requests and accordingly creates objects of class Client when required. Also provides a means to remove clients either due to untimely disconnection or during shutdown.