I am working on a midi project that kind of works like reacTIVision if you haven’t heard of it Google it. It uses a gyroscope in a cube box to tell every 90 degree rotation for x & y
to switch loops/notes/effects and the z rotation to add the effects like pitch/transpose/tempo/etc. Of course every time you rotated the device the axis would have to change relativity.
P.S. They need to be cheap under 15$.