Project: SC_LightMeter

Access the ambient light sensors of a MacBook Pro via SuperCollider.

title: SC_LightMeter
platform: OS X on MBP only
language: C++/SC
license: GPLv2
created: 2007/09/01
tags: supercollider, osx, light

Download (tgz, 8KB)

Following work done by Amit Singh, this is a SuperCollider UGen bridge to the light detection subsystem of Mac OS X, using the ambient light sensors provided under the speaker grilles of the current MacBook Pro.

Two integer values are provided (0 .. 2000), corresponding to the light level detected by the left and right sensors. Note that there is some latency inherent to the system, with response times to light level changes around ~0.3s.


SynthDef(\lmu_test, {
	var data;
	var light =;
	var light_freq =, 0, 2000, 40, 5000), 0.1);

	data = * 0.3;
	data = data +, 0.1, 0.1, 2.0, 0.2);,;