Lpc ugens and files

I looked up the Lpc ugens, the archives has a message about the fate.lpc , which is a file made in csound, is there a less bulky way to make lpc files? Than having to install csound?
Also, Josh said Nick had great lpc ugens, is that Nick collins and where are those Ugens?


There are the NCAnalysisPlugins in sc3-plugins, which includes LPCAnalyzer for doing realtime lpc. I’ve used this before to interesting effect, but I remember it being kinda crashy and unstable, so be careful :slight_smile:
You don’t need to make LPC files with this, it does the analysis in realtime.

I really like the LPCError UGen. It can get real nasty.


1 Like

LPCAna in the JoshMisc quark can do an analysis for you (so you don’t need the csound tool).

fate.lpc (169.6 KB)

You can download the file above but you’ll need to remove the .txt extension. The forum wouldn’t let me upload a .lpc file

1 Like

I will check it out

Hi Josh
I played with LPCAna.I don’t know how to save the lpc file once it is analyzed.
There are lots of methods. I just don’t know the format


a = LPCAna.new(Platform.resourceDir +/+ "sounds/a11wlk01.wav");
a.ana(50, 400, 0.5, 0, 70, 300, conditionSignal: 2);

// low pass an aspect of the analysis

WARNING: LPCFile couldn’t find a file at: /Applications/SuperCollider.app/Contents/Resources/Users/ss/Downloads/ak.lpc

saveToLPCFile will save it in the same format that csound’s file uses.

You can also use saveToFiles to save as raw lpc and as an AIFF file that can be loaded right into a buffer for use by LPCSynth, etc

The raw LPC file format (from saveToLPCFile or csound) needs to be converted into a buffer that SC Ugens expect. That’s why the aif / sound file step is needed.

I know - it’s confusing - but in short you should be able to:

Use LPCAna for the analysis
Use saveToLPCFile - this will give you a binary LPC file
Use LPCFile to load it into the system, then the loadToBuffer method to get it ready for the UGens

Hope that helps.


1 Like

This warning should not be printed, since it comes from a completely separate class other than LPCAna.

It’s defined in LPCFile.

a.saveToLPCFile is calling LPCAna:saveToLPCFile, which 1/ doesn’t include that warning text, and 2/ uses File, not LPCFile (JoshMisc/AnaUtils.sc at master · supercollider-quarks/JoshMisc · GitHub).

Based on the JoshMisc code at github, I don’t see any way that LPCFile could be called.

The most likely remaining explanation, then, is that perhaps you (or someone else) read the method definition for saveToLPCFile, and thought “that File can’t be right, shouldn’t it be LPCFile,” then you/someone changed it.

But it should be just File here.

Also strange is that you’ve given an absolute file path "/Users..." but it’s being treated as a relative path (prepending the resourceDir).

^^ this is resourceDir...                         ^^ you wrote this bit

I can’t see any reason in the code why the path would have been modified – unless again, somebody modified the class definition.

So I would say, first, revert to exactly the published JoshMisc code and do not mess with it, then try helpfile examples.


1 Like


I made a mistake

a = LPCAna.new(Platform.resourceDir +/+ "sounds/a11wlk01.wav");

a.ana(50, 400, 0.5, 0, 70, 300);


That works

here it is, in case anyone wants a diff lpc file

I must have skipped loading it into LPCFile. The other help files work with it

Maybe I was tired or something

Thanks for the help, Both of you

I’m guessing Sounds is a folder? Try naming the file as well:


1 Like

I did, it’s ak.lpc. Its short. Yes, sounds is in the app, by default. Ill have to learn about this standardizePath method