Soundspin

QRcode for sound spin website

Soundspin

This website comes with an unusual request. It is best experienced on a mobile device sitting in a chair that spins 360 degrees (that's two PI radians for you nerds). The phone or tablet must be held vertically (also called "portrait"). It will work on a desktop computer, or in a normal chair but mobile, spinning, and vertical is the best experience.
Soundspin is an instrument like a player piano or a crank music box that you can program yourself to play different songs or noises. As you spin in the chair you play the notes, so your rate of spin determines how fast or slow or even what direction the song plays.

Demo

Press the HB button to load "Happy Birthday" into the Soundspiner, and rotate clockwise to play. Press "reset" to clear when you are done.

Creating sounds

The top row of green buttons creates sounds of varying length. The sound will be created at the blue dot that is in the center of the screen. The higher up and down you look the higher or lower the frequency of the sound that's created. You can test the current sound at the location you are pointing by pressing the "test" button.

Deleing Notes

Place the center dot over a note until the note turns green. Press the delete button to get rid of that note.

Note/Hz

The "Note/Hz" button toggles between creating a sound that "snaps" to the frequency of a typical note vs playing any frequency. The note indicator at the top center of the screen will show if you are on HZ or notes mode. Notes mode is good for making traditional songs.

Saving and loading songs

Click the "•••" button in the upper left to open the save and load buttons.
To load a song, paste the song data into the white box and press the load song button.
Pressing the save button downloads a .txt file with the current song data. It also replaces the instuctional text with the song data which you can copy and paste into any text edtor, if that's easier.

This is the code for Happy Birthday.
102.2390, -087.0869, -194.8003, 0.2: 145.8869, -017.5191, -164.6723, 0.2: 181.0564, -002.4987, -124.9742, 0.2: -146.4939, 025.4189, 164.1326, 0.2: -181.8497, 043.9676, 123.8170, 0.2: -205.7297, -015.0698, 077.9440, 0.2: -181.1989, 025.4189, -124.7675, 0.2: -146.3506, 043.9676, -164.2604, 0.2: -103.1141, -060.5182, -194.3385, 0.2: 206.2688, 025.4189, -076.5058, 0.2: 181.9577, -085.2923, 123.6583, 0.2: 145.9201, -015.0698, 164.6429, 0.2: 100.0489, -048.5534, 195.9342, 0.2: -218.7948, -002.4987, 022.9962, 0.4: -053.2228, -017.5191, -213.4650, 0.4: 218.2410, 025.0639, -027.7637, 0.4: 050.4240, -017.5191, 214.1434, 0.4: -196.4553, 049.6189, -099.0216, 0.2: -208.0140, 049.6189, -071.6249, 0.1: -100.7322, 049.6189, 195.5837, 0.1: -122.2254, 049.6189, 182.9233, 0.2: 055.0836, 049.6189, -212.9924, 0.1: 083.3026, 049.6189, -203.6189, 0.2: 206.0678, -107.1381, 077.0456, 0.1: 195.1423, -107.1381, 101.5846, 0.2:

This is the code for Sakura Sakura.
220.0000, 049.6189, 000.0000, 0.2: 219.2444, 049.6189, 018.2178, 0.2: 217.2914, 025.0639, 034.4155, 0.2: 208.9338, 049.6189, 068.8960, 0.2: 202.8842, 049.6189, 085.0764, 0.2: 196.4553, 025.0639, 099.0216, 0.2: 177.9837, 049.6189, 129.3127, 0.2: 166.6642, 049.6189, 143.6071, 0.2: 156.2407, 011.6803, 154.8832, 0.2: 142.8785, 025.0639, 167.2893, 0.2: 128.5349, 049.6189, 178.5462, 0.2: 118.2059, 025.0639, 185.5461, 0.1: 109.1676, 049.6189, 191.0037, 0.1: 097.3035, 090.9846, 197.3120, 0.2: 067.9837, 099.9156, 209.2324, 0.2: 051.3579, 130.9053, 213.9213, 0.2: 035.3633, 099.9156, 217.1392, 0.2: 018.2178, 090.9846, 219.2444, 0.2: -000.9599, 099.9156, 219.9979, 0.2: -067.9837, 149.8721, 209.2324, 0.4: -067.9837, 049.6189, 209.2324, 0.2: -084.1903, 025.0639, 203.2534, 0.2: -099.0216, 011.6803, 196.4553, 0.2: -099.8779, 090.9846, 196.0214, 0.2: -114.9496, 025.0639, 187.5808, 0.2: -130.0881, 149.8721, 177.4178, 0.4: -129.3127, 049.6189, 177.9837, 0.2: -139.9372, 025.0639, 169.7574, 0.1: -148.6298, 049.6189, 162.2010, 0.1: -156.2407, 090.9846, 154.8832, 0.2: -155.5634, 137.5959, 155.5634, 0.4: -178.5462, 149.8721, 128.5349, 0.4: -197.3120, 170.5549, 097.3035, 0.4: -178.5462, 099.9156, 128.5349, 0.2: -189.0694, 130.9053, 112.4844, 0.2: -196.4553, 099.9156, 099.0216, 0.2: -203.2534, 090.9846, 084.1903, 0.2: -209.5270, 149.8721, 067.0701, 0.4: -209.5270, 099.9156, 067.0701, 0.2: -213.9213, 099.9156, 051.3579, 0.1: -215.9579, 130.9053, 041.9779, 0.1: -217.7233, 137.5959, 031.5683, 0.4: -220.0000, 149.8721, 002.6942, 0.4: -217.1392, 149.8721, -035.3633, 0.4: -219.9979, 025.0639, -000.9599, 0.4: -216.9828, 011.6803, -036.3104, 0.2: -216.9828, 090.9846, -036.3104, 0.2: -213.6952, 025.0639, -052.2908, 0.2: -209.5270, 149.8721, -067.0701, 0.4: -195.1423, 137.5959, -101.5846, 0.4: -209.2324, 049.6189, -067.9837, 0.2: -203.2534, 049.6189, -084.1903, 0.1: -200.1914, 090.9846, -091.2325, 0.1: -194.6972, 099.9156, -102.4351, 0.2: -176.8485, 149.8721, -130.8610, 0.4: -155.5634, 149.8721, -155.5634, 0.4: -177.9837, 049.6189, -129.3127, 0.2: -167.2893, 049.6189, -142.8785, 0.2: -154.8832, 025.0639, -156.2407, 0.2: -154.8832, 170.5549, -156.2407, 0.2: -128.5349, 149.8721, -178.5462, 0.4: -098.1635, 149.8721, -196.8855, 0.4: -098.1635, 170.5549, -196.8855, 0.2: -129.3127, 049.6189, -177.9837, 0.2: -114.1301, 049.6189, -188.0806, 0.2: -098.1635, 025.0639, -196.8855, 0.2: -067.0701, 149.8721, -209.5270, 0.4: -031.5683, 149.8721, -217.7233, 0.4: -067.9837, 049.6189, -209.2324, 0.2: -052.2908, 025.0639, -213.6952, 0.2: -036.3104, 011.6803, -216.9828, 0.2: -032.5180, 170.5549, -217.5834, 0.2: -019.1742, 025.0639, -219.1628, 0.2: -004.0413, 049.6189, -220.0000, 0.2: 017.2610, 025.0639, -219.3218, 0.1: 025.8582, 049.6189, -218.4750, 0.1: 035.3633, 090.9846, -217.1392, 0.2: -004.0413, 149.8721, -220.0000, 0.4: 038.2025, 149.8721, -216.6577, 0.4: 085.9608, 170.5549, -202.5110, 0.2: 067.9837, 175.0230, -209.2324, 0.2: 097.3035, 137.5959, -197.3120, 0.1: 106.6581, 149.8721, -192.4163, 0.1: 114.9496, 170.5549, -187.5808, 0.2: 129.3127, 170.5549, -177.9837, 0.4: 156.2407, 170.5549, -154.8832, 0.4: 190.2369, 149.8721, -110.4984, 0.4: 190.2369, 175.0230, -110.4984, 0.4: -217.9120, 170.5549, 030.2378, 0.2: -035.7422, 137.5959, 217.0771, 0.4: -023.3780, 130.9053, 218.7543, 0.1: -016.6867, 099.9156, 219.3662, 0.2:

Notes

iOS users will need to allow permission to access the sensor data. Nothing is being collected or monitored.
Some older versions of Safari want you to set the rotation permission through the settings. If you do that it should still work.
On the desktop, pressing the right direction arrow simulates spinning. Press again to stop. Savings also saves a txt file to your downloads folder.

credit

This project was created with p5.js
Thanks to the YouTuber dizicode for the excellent tutorial on how to access sensors in iOS.