[ardour-dev] Using USB-HID-devices in Ardour
fbar at footils.org
Sun Feb 15 02:31:19 PST 2004
Frank Barknecht hat gesagt: // Frank Barknecht wrote:
> Jack O'Quin hat gesagt: // Jack O'Quin wrote:
> > My experience implementing fast-forward for JAMin using
> > jack_transport_locate(), suggests that doing a new locate every 5
> > seconds should work quite well.
> To clarify this: The wheels do send any movements immediatly, but in
> the case of the Jog wheel, values other than Zero are repeated
> regularily, while the wheel is not moved. It's faster than 5 seconds,
> it's around once per second.
> I think, this is a bit uncomfortable, and other event devices like the
> position of my mouse do not autorepeat.
Others think, this is uncomfortable, too. ;) Here's a quote from the
Kino sources (jogshuttle.cc):
/* We can get three "kinds" of events:
ev.type == EV_KEY (0x01)
This is a button press. the 13 Keys are laid out from top to
button, left to right, from 0x100 to 0x10c
The actual key that was pressed is in ev.code, ev.value is 0x01 for
key pressed, 0x00 for key released.
ev.type == EV_REL (0x02)
For this type, there are two "codes":
- ev.code == REL_WHEEL (0x08) the outer wheel ev.value indicates
the position, with positive values from 0x01 to 0x07
(inclusive) indicating clockwise twist, and negative values
from -1 to -7 indicating counterclockwise twist. If this value
is different from 0, apparently it is reported approx. every
second. Which is annoying. A 0 value, however, is not
reported. Which is even more annoying.
- ev.code == REL_DIAL (0x07) the inner dial
This event is issued when ever the dial position changes or
approx. every second (or thereabout). Also annoying.
ev.value takes values from 0x01 to 0xff inclusive and increases
with clockwise rotation, decreases with counterclockwise rotation.
Apparantly a value for 0x00 is _not_ issued - this could be problematic!
(A "step" on the dial is missed, it seems. I do not think this is a good
Note: Theoretically one could keep an eye on the events, and if
none are reported for more than a second, it must mean that 0 is the current
value for the missing event. However, the latency is far to great for
that to be of any use.
I have no idea if these problems comes from gnome/gtk/gdk or is a real
The consequences are that the outer ring only have 7 working values and
that the inner ring will "miss a step", once in a while. Annoying.
Modifier keys - we maintain the state of the first key that is
pressed down. This is a "poor man"s way of doing modifier
keys. It means that we can press a single key, keep it down, and
press a number of others. Any key can be used as a modifier key,
although you would probably want to not assign an action to a
modifier key when first pressed. There is no way to react to multiple
modifier keys though.
Frank Barknecht _ ______footils.org__
More information about the Ardour-Dev