Touch-Free Music Remote
Last updated
Last updated
Have you ever been doing the dishes, jamming to your favorite tunes, but then a "skip" comes on and kills your vibe, but you can't skip it because your hands are wet? Whether you have experienced any variation of this incredibly specific situation, or in general you want to change how you interact with your music, this is the project for you.
Before starting, turn on your IF Magic Device and clear all existing equations and modules. Plug your gesture module into Port 3 of the Device / Bare² and set the port to a gesture module in the app. Test out your gesture module by waving your hand back and forth across the module. The port should read "left", "right," "up," and "down" - get a sense for which direction is which and what orientation you want to set the hardware in so that the correct swipe will lead to the correct keycode command.
The next step is to build an equation that matches the logic shown here:
To do so, first add a "when" statement by tapping the blue plus button and choosing logic. Tap "when this happens."
Next, tap "this happens" in the sentence, choose "gesture" under inputs, and select "left."
To add the keyboard "previous track command," tap "do this" in the sentence, select "Keyboard" under outputs, and choose "previous track."
Repeat the above steps for the other gesture directions and keyboard outputs:
Right - Next Track
Up - Volume Up
Down - Volume Down
Once you have the project working, you can add further features until you have the music control of your dreams. Here are some ideas to get you started:
Add a play / pause keycode that is triggered by a clap using the sound module or by hovering your hand over a distance module
Set play / pause to trigger when your door is opened using a distance module or the IMU
Adjust the volume of your music based on ambient volume using a sound module (example logic: when sound is greater than [value], send Volume Down keycode).
Now that you have your music controller, why not add some light outputs as well? Use a glow module to add a light show to your music (example logic: when distance is less than [value], send Play/Pause keycode, set glow color to "Fade" pattern, with brightness set to sound).