Re: force feedback envelope incomplete

From: emard
Date: Mon Oct 17 2005 - 17:22:06 EST


> > > struct ff_envelope {
> > > __u16 attack_length; /* Duration of attack (ms) */
> > > __u16 attack_level; /* Level at beginning of attack */
> > > __u16 sustain_length; /* Duration of sustain (ms) */
> > > __u16 sustain_level; /* Sustain Level at end of attack and beginning of fade */
> > > __u16 fade_length; /* Duration of fade (ms) */
> > > __u16 fade_level; /* Level at end of fade */
> > > };
> >
> > You might want to talk to Vojtech about this (CC-ed).
>
> Your proposal seems reasonable. Please send me a patch that adds the
> sustain members to the envelope, and uses it in some driver, while
> making sure existing binary-only apps (if there are any) don't break.

I have thought about this.

I can not imagine ANY existing driver supporting such envelope
other than using this 64 bit field as a binary container for
it's private interpretation of the mechanical vibration envelope.

We may not go too far on with supporting such software
(I even don't know of any).

So we actually need this

struct ff_envelope {
__u16 attack_length;
__u16 attack_level; /* level at the beginning of attack */
__u16 decay_length;
__u16 decay_level; /* level at the beginning of decay */
__u16 sustain_length;
__u16 sustain_level; /* level at the end of decay and beginning of fade */
__u16 fade_length;
__u16 fade_level; /* level at the end of fade */
};

WHY:

*** About the vibration envelope ***

As I understand the envelope, it's there to simulate physical
behaviour of transient vibrations of a string when triggered.

Such envelope has ATTACK, DECAY, SUSTAIN and FADE. (ADSF)

Microsoft simplified this by implementing only
ATTACK, SUSTAIN and FADE (ASF).

But what linux has? Attack and fade without sustain.
That is slighty out of sense, because in this case we can not
calculate the SLOPES of the attack and fade, making them
out of sense too.

I would use attack, decay sustain and fade. That's
the way synthesizers handle triggered wire vibrations
like in guitars or pianos.
ASF may be sufficient only for short length of low
frequency vibrations <50Hz. Some joysticks are capable only of that.
But for frequencies >100 Hz, like tactile mice, ADSF envelope
can produce additional exciting vibrant feel and sophisticated
vibrations over high dynamic range making it very realistic.
That makes much difference compared to those crippled ASF only
envelopes.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/