Hi,
On Thu, Sep 22, 2011 at 09:38:51PM +0000, Fons Adriaensen wrote:
Even if it hasn't to work in real time Pd is
probably the
ideal tool to prototype such a system. The alternative
would be to write some ad-hoc C/C++ code, possibly using
existing 'feature extraction' libraries or plugin code.
As a first guess, what you need would be:
- (optional) some pre-filtering to make the trigger
more reliable,
- the trigger itself,
- a delay on the trigger,
and in parallel
- (optional) some pre-filtering for the envelope
follower,
- an envelope follower,
- when the delayed trigger arrives, read the envelope
follower and start the sample playback.
There is an object included in Pd to do quite good onset detections for
percussive sounds, it's called [bonk~]. Another object, [sigmund~], is a
pitch tracker for pitched sounds, but it also detects onsets.
A nice thing about bonk~ is that it can be trained to discriminate
between different kinds of sounds, so for example it can be made to
trigger different samples if you sing "pah" versus singing "tschk".
Another apprroach would be to use some software based on the aubio
library (like the Pd external)
Ciao
--
Frak