Control the sound with your phone

This demo requires three devices - a phone to stream values, a server to collect those values, then a client computer to run this webaudio based on values that the server forwards to us. This demo will use the FM code from earlier in the semester, and control the LFO with the accelerometer in your phone.

Frequency Modulation Synthesis

Control modulator frequency

Control index of modulation

Server Files

Put these files on some other machine (e.g. digital ocean server). Then send a stream of messages to the server. For example, use the HyperIMU app. Any app that streams sensor value to a user selected IP and port is fine.

If you try to conenct with a client over https you will need to server the SSE (server sent events) stream over https as well. This is a pain, so just connect over http with the client.

server.py

cors_helper.py