How yatinj30/macmonium works
MacMonium turns a MacBook into a keyboard-played harmonium: keyboard notes sound only while lid movement pumps a virtual air reservoir. The README documents scale selection, note legends, and fading as product capabilities. Source excerpts cover interfaces rather than implementations, so the module assignments below follow the repository tree; edges are limited to README-documented behavior, and internal call ownership cannot be verified from the available excerpts.
Main entry points: AppDelegate.m Note mapping · HarmoniumAudioEngine.m Audio engine · KeyCaptureView.m Key capture · LidAngleSensor.m Lid sensor
Components 10
Input and control
- App controller
LidAngleSensor/AppDelegate.m - Key capture
LidAngleSensor/KeyCaptureView.m - Lid sensor
LidAngleSensor/LidAngleSensor.m - Air pressure
LidAngleSensor/AppDelegate.m
Musical interface
- Scale selection
LidAngleSensor/AppDelegate.m - Note mapping
LidAngleSensor/AppDelegate.m - Note legend
LidAngleSensor/AppDelegate.m
Sound engine
- Audio engine
LidAngleSensor/HarmoniumAudioEngine.m - Harmonium samples
Sounds
Other components
- Player
Connections 9
- Player → Key capture: presses keys
- Player → Lid sensor: moves lid
- Key capture → App controller: sends key events
- Lid sensor → Air pressure: pumps air
- Air pressure → Audio engine: sets loudness
- Scale selection → Note mapping: selects notes
- Note mapping → Audio engine: plays notes
- Note mapping → Note legend: shows note names
- Audio engine → Harmonium samples: plays samples