Eyebrow Tempo

Max for Live patch allowing you to control the master tempo in Ableton Live using your eyebrows via facial landmarking software.

1. Install FaceOSC

First step is to install Face OSC:

https://github.com/kylemcdonald/ofxFaceTracker/releases

This software will use your webcam to track locations on your face and give numeric measurements for a series of values. It will then send this over OSC.

2. Install Ableton Live

You can try Ableton Live free for 30 days which will allow you to experiment with this hack, but will need to purchase it (or borrow a license from a friend, like I am) if you wish to use it for longer.

https://www.ableton.com/en/trial/

3. Open Max for Live

Inside Ableton Live open the Max for Live editor via; 'Max for LIve/Max MIDI Effect/Max MIDI Effect.' Then clicking on the left of the three buttons on the top right of the Device that opens.

This is where you will save the patch.

Max for Live default MIDI Effect Patch

Figure 1 - Pathway for finding the M4L editor.

4. Download the M4L Patch

This is a compressed copy of the M4L patch, copy and paste this into your M4L patch:

<pre><code>

----------begin_max5_patcher----------

3794.3oc6cs0iiaaE94I.4+fpQepXhGd+RAR.Ru7VK5CMukDrP1VyLZisjgr

7jcSP2e6khTxirsjHsLEGiN0KVO1xx9P9wycdH4u+0e0cyVj+ojcyh9yQ+Xz

c286pqbm9ZUW4tlKb2rMweZ453c5abV19MKRJlce8msMtHdSRYRwGRxhWrNo

5d.Men5dSyVmTp+lvVWMeeYykQu9KUt74zrm9PQxxRSah.nyA2Gwkhp+PAUO

iTOG8yMeozU5FU9hO9MDxgFk4mu7yaSL+NylcezrEwYOMK5m02x+4q+pp+p9

y8N2w2jraW7SIGHRYxmzMyYqSeI4C6RJi9gh3k+Rz+L8SIE+sjWRWlDsKW0e

JS1rMeVmXBpaLANDlfHUv.Vp+CTxGFTvC.JSAXrsHeaRQ4midId89DK85Gyy

JyTrO5u42WjFud1kCHXlFBXDT0eDZVEDpG7.yGDOZ2v1k9a5OAp9sFMNkk7q

Jx1MOybUm44YCKq3LBgGDgz7JTAV+G1vHDaXwH8+CMRkuXWRwKsT6bk7SH67

SbflSR.FFsDVPq9QplquK9kjUeP8ioZAeHtrrHcw9RiV46dErta1GTxU6R2U

ljsznk07A0X8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NG8fbZ0z4n6bdzdt.bQ8aePRtL3rk

tIH3uIkE51zUR.So+ot0FNs1h7qXE75jpBXafimRIavEk8YePQmF6gdkd1mq

bgWoG1J87KdRrROhWom8.651Yg5xLOd61Wp1gaMeEColsI9ilhBUbu48oYl2

apS9YEIujt6nMDvYwEKeNsLYY0xYvrxuZ1fdmsIWIjjsOsQNopyVQZc09WUd

961Fa5V5UEvW+Upa3+5wZOaB

-----------end_max5_patcher-----------

</code></pre>

Once pasted into your M4L it should look like this:

image

Figure 2 - 'Eyebrow Tap Tempo' M4L Patch

Then save the patch in your Max MIDI Devices, for ease of use save the patch into the existing M4L devices folder.

5. Adjust the Threshold

Depending on the natural size of your face and distance between eyebrows and eye, an easy threshold for triggering the 'tap' will be different from person to person. You can adjust this threshold to make the tool easier to use.

image

Figure 3 - The Device open in Presentation Mode in the devices bar inside Max for Live.

Here you can see the Device open in Max for Live.

The elements shown are as follows:

Middle Left - Live Eyebrow Analysis (distance from centre of eye to top of eyebrow as measured by FaceOSC.

Bottom Left - Button will flash every time eyebrow is raised above threshold.

Centre - Threshold Control, use this to set comfortable 'tap' height for use with your own face.

Bottom Centre - 'begin/click tap' Use this to begin use of the device or to tap in a tempo using your cursor.

Top Right - BPM/Beats Per Minute, tempo being sent out by the device and also tempo of Ableton Project.

Centre Right - Flashingtempo indicator. In time with Project tempo, turn on and off with Bottom Right.

Bottom Right - Control for flashing tempo indicator.

Enjoy

FaceOSC will now send eyebrow data from your left eyebrow to the patch, triggering 'taps' which allow you to control the tempo of Ableton Live, and so speed up or slow down the music with your face.

View use.mp4 @ Wikifactory

Figure 4 - Me using the device to control tempo (no sound though)

Enjoy!