Skip to content

This code generates a tone that changes with the angle of the Mac screen

Notifications You must be signed in to change notification settings

Petess/MacLidPythonSound

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

MacLidPythonSound

This shows an image and generates a tone that changes with the angle of the Mac screen.

It was inspired by this :

https://news.ycombinator.com/item?id=45158968

And the code here.

https://github.com/samhenrigold/LidAngleSensor

This reads the sensors using the 'pybooklid' library and uses pygame to generate a tone and show instructions

Tested platforms

This has been tested on a Macbook Air M4

Requirements

A Mac that can work with the 'pybooklid' library.

You can check if your Mac can read the sensor with the following script

https://gist.github.com/samhenrigold/42b5a92d1ee8aaf2b840be34bff28591

The following needs to be installed via uv or pip :

pygame numpy sounddevice pybooklid

Notes

Claude AI was used to develop this with some documentation.

About

This code generates a tone that changes with the angle of the Mac screen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages