[Audacity-nyquist] RE: Nyquist trouble saving sound file
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Roger B. D. <rb...@cs...> - 2004-11-30 16:23:24
|
Eivind, I can only give you a quick reply at the moment, but if this doesn't help let me know and we can get to the bottom of this. First, if your goal is calculating differences between samples, there is already a fast function, SLOPE, which I found by looking up "derivative" in the manual index. Or if you are trying to take the difference between two sounds, try (sum (scale -1 s1) s2). Normally, you should avoid processing sample-by-sample in Lisp -- it will be 100 to 1000 times slower than most built-in functions. If your goal is to learn about processing samples, you are on the right track. Since Nyquist uses lazy evaluation, nothing is actually = read or computed until you call s-save. Your bug probably has nothing to do with saving a file. When you get the prompt "1>", that's telling you that you = are in the debugger. I suggest typing (bt) to get a backtrace, or (baktrace = 20) if you need to see further down in the stack. Hopefully this will help = you find the expression that was getting NIL instead of something it was expecting. Finally, when you typed "(s-save new-snd ...)" to the debugging prompt, you were recursively evaluating a new expression. Although I'd prefer that Nyquist wouldn't die in cases like this, I'm pleased that at least it tried to tell you something before it quit. In this case it is telling you that you have a badly formed sound structure (probably = created by SND-FROMOBJECT because something went wrong with the sample-returning object. -Roger |