Skip to content

Commit 12142b4

Browse files
committed
Update development notes
1 parent 979ca16 commit 12142b4

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

DEVELOPMENT.md

+41-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# MIDIMonster development guide
22

33
This document serves as a reference for contributors interested in the low-level implementation
4-
of the MIDIMonster. It is currently a work in progress and will be extended as problems come
5-
up and need solving ;)
4+
of the MIDIMonster. It will be extended as problems come up and need solving ;)
65

76
## Basics
87

@@ -44,19 +43,55 @@ in spirit rather than by the letter.
4443
* Avoid `atoi()`/`itoa()`, use `strto[u]l[l]()` and `snprintf()`
4544
* Avoid unsafe functions without explicit bounds parameters (eg. `strcat()`).
4645

47-
# Repository layout
46+
## Repository layout
4847

4948
* Keep the root directory as clean as possible
5049
* Files that are not related directly to the MIDIMonster implementation go into the `assets/` directory
5150
* Prefer vendor-neutral names for configuration files where necessary
5251

53-
# Build pipeline
52+
## Build pipeline
5453

5554
* The primary build pipeline is `make`
5655

57-
# Architecture
56+
## Architecture
5857

58+
* Strive to make backends platform-portable
59+
* If that is not possible, try to keep the backend configuration compatible to other backends implementing the same protocol
5960
* If there is significant potential for sharing functionality between backends, consider implementing it in `libmmbackend`
61+
* Place a premium on keeping the MIDIMonster a lightweight tool in terms of installed dependencies and core functionality
62+
* If possible, prefer a local implementation to one which requires additional (dynamic) dependencies
6063

61-
# Debugging
64+
## Language & Communication
6265

66+
* All visible communication (ie. error messages, debug messages) should be complete, correct english sentences
67+
* Strive for each output to have a concrete benefit or information to the reader
68+
* Corollary: If nothing happens, don't send output
69+
* Debug messages are somewhat exempt from this guideline
70+
* For error messages, give enough context to reasonably allow the user to either track down the problem or report a meaningful issue
71+
72+
# Packaging
73+
74+
Packaging the MIDIMonster for release in distributions is an important task. It facilitates easy access to
75+
the MIDIMonster functionality to a wide audience. This section is not strictly relevant for development, but touches
76+
on some of the same principles.
77+
78+
As the MIDIMonster is a tool designed for interfacing between several different protocols, applications and
79+
other tools, to use "all" functionality of the MIDIMonster would imply installing additional software the user
80+
might not actually need. This runs counter to our goal of staying a lightweight tool for translation and control.
81+
82+
The recommended way to package the MIDIMonster for binary distribution would be to split the build artifacts into
83+
multiple packages, separating out the heavier dependencies into separately installable units. If that is not an option,
84+
marking external dependencies of backends as `optional` or `recommended` should be preferred to having them required
85+
to be installed.
86+
87+
Some backends have been marked optional in the repository and are only built when using `make full`.
88+
89+
The recommended grouping into packaging units is as follows (without regard to platform compatibility, which
90+
may further impact the grouping):
91+
92+
* Package `midimonster`: Core, Backends `evdev`, `artnet`, `osc`, `loopback`, `sacn`, `maweb`, `openpixelcontrol`, `rtpmidi`, `visca`, `mqtt`
93+
* External dependencies: `libevdev`, `openssl`
94+
* Package `midimonster-programming`: Backends `lua`, `python`
95+
* External dependencies: `liblua`, `python3`
96+
* Package `midimonster-media`: `midi`, `jack`, `ola`
97+
* External dependencies: `libasound2`, `libjack-jackd2`, `libola`

0 commit comments

Comments
 (0)