Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Trackpad synth

Program to generate SKINI or MIDI data from a macbook trackpad.

Binary Installation (use this if you're not sure)

Download the disk image for snow leopard (10.6):

Open it, drag to applications.  Double click on it to run.

You need something to turn my program's midi signals into sound.
SimpleSynth is good:

Download, install, run.  Once it's running, select "touchpad" under
"MIDI Source" and you should hear this play!

Source Installation

Choose either MIDI, SKINI, or Octaveless output.  MIDI lets you choose from more and
better voices, SKINI lets you write new voices with the stanford toolkit, Octaveless
doesn't have octaves.


See the note on SimpleSynth above.


Get a SKINI reader.  I've been using the Standford Synthesis Toolkit.
You can download it from:

Unzip it, run "./configure" and "make" in the stk directory.

Check that it's working:

  cat stk-4.4.2/projects/demo/scores/ | stk-4.4.2/projects/demo/demo Clarinet -or -ip

You should hear something.

Put the stk folder paralell to our test.m and Makefile.


Get octaveless from:

Build it (requires port audio) and check that it works as:

   gcc -o octaveless octaveless.c -lportaudio -Wall
   echo A | ./octaveless

You should hear something; kill it with Ctrl+C.

Copy the octaveless binary to this directory

  cp /path/to/octaveless .

Once you have MIDI, SKINI, or Octaveless working, in this directory run one of:

  # for midi
  ./trackcontroller [options]

  # for skini
  make runskini

  # for octaveless
  make runoctaveless

  # for midi, simple
  just double click on the trackcontrol command line program

Kill it with control C when you're done.  It puts midi on channel 3,
so that's the one you'd twiddle settings for.  Options are:

Usage: trackcontroller [options]

  -k [KEY]  Play in the given key.  Allowable keys are
            'A'-'G' followed by an optional '#' or 'b'.
            Default is D.
  -H        Harmonic minor mode
  -r        Relative/natural minor mode
  -x        Mixolidian mode
  -K        A Klezmer mode (flat 2, sharp 6)
  -5        Pentatonic scale
  -C [nnn]  Specify scale (ex: '024579B')
  -S        Send SKINI to stdout instead of MIDI from a
            virtual source.
  -V        Use the far left of the controller as a
            volume control.
  -o [N]    Divide the trackpad vertically into this many
            octaves.  Default is 5.
  -s [N]    Octave Shift: how far down to shift from the
            top of our range.  Default is 3.
  -v        Use velocity.  When pressing keys, set midi
            velocity to the finger width detected on the
  -a        Send aftertouch midi messages based on how fat
            each finger is
  -c [N]    Send on channel N.  Default is 3.
  -p        Send channel pressure messages based on how fat
            all the fingers are on average,
  -P        Fake channel pressure using volume instead.
  -h        Print this usage.

(run "./trackcontroller -h" for the most up to date usage info)


There are 5 rows (-o option) each of which has a major scale (change
'scale') of 7 notes.  It's polyphonic, so move your fingers around.
If using midi output, it can do velocity, aftertouch, channel
pressure, and a kind of faking channel pressure by setting the volume,
all depending on how much of your finger is in contact with the pad
(and if your midi synthesizer supports it).  These are off be default
and can be enabled with the -v, -a, -p, or -P options.

If you don't want a major scale, the -h, -r, -x, and -K options choose
other scales; see above.  You can also specify arbitrary scales with
-C.  The format is:

  ./trackcontroller -k C -C 0123456789AB

This would make a fully chromatic trackpad starting on C (with even
divisions).  To leave notes out, don't include their numbers:

  ./trackcontroller -k C -C 024579B

This would include the notes of the major scale.  You can make
sections wider by repeating them:

  ./trackcontroller -k C -C 0057

This would divide the pad with the left half sounding 'C' and the
right half divided into 'F' and 'G'.


Started with multitouch code from:

For writing midi output I used the source of vmpk as a guide:

All code gpl


Make music with a macbook trackpad



No releases published


No packages published
You can’t perform that action at this time.