Copyright (C) 2006  Nathan (Acorn) Pooley

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License (gpl.txt) for more details. 

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact the author, Nathan (Acorn) Pooley, by writing
to Nathan (Acorn) Pooley, 949 Buckeye Drive, Sunnyvale, CA  94086, USA
or through the form at http://www.rawbw.com/~acorn/wand/feedback.html




Accelerometer values

delta	val		what
-----	---		----
		4f  	-1g
6
		55		 0g
7
		5C		+1g


LEFT & RIGHT
------------
accelerate left  = -
accelerate right = +

delta	val		what
-----	---		----
		10		hard tap right
15
		1f		hard wave
32
		3f		light tap right
8
		47		light wave
14
		55		0g
14
		63		light wave
13
		70		light tap left
16
		80		hard wave


UP & DOWN
---------
accelerate up   = -
accelerate down = +

delta	val		what
-----	---		----



CARRY

a + (-b)
a - b    carry set if a>=b
         carry clr if a<b

CPFSLT and CPFSGT

	movf	A,w
	cpfslt	B
	this is done if A<B

	movf	A,w
	cpfsgt	B
	this is done if A>B


TEMPO/RYTHM
-----------
impulse threshholds
	> 0x200 for change of dir
	> 0x100 for start/stop

max mag threshold
	> 0x20 for tap   (ignore nearby samples in similar direction)
