[bloopdance release notes] synthesis and control updates

Kawandeep Virdee
2 min readApr 1, 2021

--

I noticed that the bloopdance pitch wasn’t changing based on the accelerometer changes, i.e. from shaking the phone around or tilting it side to side. The frequency cutoff was still working, controlled by a vertical tilt of the phone.

Looking into it seems like there’s some issue with the web audio API in updating the frequency value. For some reason oscillator.frequency.value = pitch stopped working. I updated it to use another method to change the pitch: oscillator.frequency.setValueAtTime(pitch, context.currentTime) . This worked 🎉

However, very slight changes in the accelerometer caused the pitch to waver. I introduced some light smoothing to this. This may have to do with using a new method, or maybe something to do with and update to the devicemotion events API. Idk, but I added a smoothing function. The timbre changed a little, moreso when you’re shaking the phone a bunch — but the quality of it is pretty much the same.

Back last year in February I updated it to include permissions to access the accelerometer. For a while this could only be done through the phone settings, and thankfully after an update it could be triggered from the page itself. Much smoother experience.

Play with it here: https://bloopdance.com/

If you’re wondering what this is, check out this video:

--

--

Kawandeep Virdee

Building. Author of “Feeling Great About My Butt.” Previously: Creators @Medium, Product @embedly, Research @NECSI. http://whichlight.com.