Classes (extension) | Libraries > JoshUGens | UGens > Analysis:Synthesis

LPCSynth : UGen : AbstractFunction : Object
ExtensionExtension

Utilize LPC data
Source: LPCSynth.sc

Description

LPCSynth uses data from a LPC data file to filter a signal.

Class Methods

LPCSynth.ar(buffer, signal, pointer, mul: 1, add: 0)

Arguments:

buffer

The buffer where data is stored from LPCFile (see LPCFile).

signal

The signal to filter.

pointer

A pointer into the LPC data file, where 0 is the begining and 1 is the end.

mul
add

Inherited class methods

Instance Methods

Inherited instance methods

Examples

This uses the fate.lpc file, created with the following command:

lpanal -p 50 -h 300 fate.aiff fate.lpc

Analysis window is 2X the hop size.

s.boot;

// this file came with the JoshUGens... Leonard Bernstein talking about Beethoven.
// Place it in your SC3/sounds directory.
a = LPCFile.new(Platform.resourceDir +/+ "sounds/fate.lpc", server: s).loadToBuffer;

(
z = {
var cps, rmso, err, voc, noise, timepoint, dur;
timepoint = LFSaw.ar(0.4/a.sndDur, 1, 0.5, 0.5);

# cps, rmso, err = LPCVals.ar(a.buffer, timepoint);
// a periodic Blip to filter, amplitude is 1 - error
noise = WhiteNoise.ar(err); // a noise source

voc = Blip.ar(cps, 100);
// the rms values tend to be high... scale them back quite a bit!
Out.ar(0, LPCSynth.ar(a.buffer, voc + noise, timepoint, rmso));
}.play(s)
)
z.free;
// clean up
s.sendBundle(0.1, [\b_free, a.buffer]);