I created a set of CLI tools that let you pipe mac sensor data around like modular synth audio. Sensor data is outputted via stdout as a mono audio signal, and then it can be piped through filters and sent to outputs like your speaker, screen-brightness, keyboard-brightness, a TUI visualizer, and more.
Some examples of silly things that are possible:
lid-angle | speaker # sounds like a theremin as you move th elid
sudo accelerometer | metronome | screen-brightness # tap on your palmrest and it will flash to the beat
microphone | metronome | speaker # play a tone in sync with whatever beat is audible to the microphone (syncs the phase too)
microphone | bandpass 0.4 6 | volume-shift 2 | tee >(keyboard-brightness) | visualizer
sudo gyroscope | sudo fan-speed
nikisweeting•1h ago
I created a set of CLI tools that let you pipe mac sensor data around like modular synth audio. Sensor data is outputted via stdout as a mono audio signal, and then it can be piped through filters and sent to outputs like your speaker, screen-brightness, keyboard-brightness, a TUI visualizer, and more.
Some examples of silly things that are possible:
Lots more here: https://github.com/pirate/mac-hardware-toys