You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
464 B
Plaintext
20 lines
464 B
Plaintext
b = Buffer.read(s, "/Users/lcoogan/snd/samples/freesound/vocals/ymaaela/333264__ymaaela__female-vocal-cut-ups-collage.wav");
|
|
|
|
(
|
|
{
|
|
var sig = PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 0);
|
|
|
|
// Hilbert transform
|
|
var imag = HilbertH.ar(sig);
|
|
|
|
// Envelope
|
|
var envelope = (sig.squared + imag.squared).sqrt;
|
|
|
|
// Listen to the extracted envelope (amplified to be audible)
|
|
|
|
// envelope = RLPF.ar(envelope, 1200, 0.3);
|
|
|
|
envelope * 0.5
|
|
}.play;
|
|
)
|