The theremin is an electronic music instrument that modulates pitch and amplitude based on the positions of the player’s hands around the antennas.
ThereminXR brings the theremin into a webapp for Oculus headsets! Below is a demo of the app.
Technical Implementation
The application uses Three.js to render the VR content and handy.js provide hand controls.
Theremin audio is generated by the Web Audio API. Handy provides an API to get the location of hands in 3D space, and those values are compared to the fixed locations of the antennas to determine the pitch and amplitude of the wave generated by the Web Audio API.
Credits
A demo of this app was built hackathon-style with Timothy Aveni in the better part of an afternoon. Nathaniel Romero generously provided the 3D model for the theremin!