Re: [Audacity-nyquist] INTRODUCTION TO DIGITAL FILTERS--Help with individual signal ...
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: <msz...@ao...> - 2009-06-20 17:53:18
|
Hi Roger, First, thank you for the tips. The documentation in Nyquists functions for CONVOLVE is sparse. I'll need to research this one a bit more. I was going to approach things by sample indexes where I changed the sound s to an array using SND-FETCH or SND-FETCH-ARRAY and proceed with f(i). But I do see that your suggestion maybe easier. When using convolve with a signal-of-f(i) and s, since f(i) is short (15 samples) then does f(i) have to be repeat over and over (at s's sampling rate) in the creation of the signal-of-f(i) to make it the same length as the sound signal s?? I was wondering about boundary conditions. I thought I would create the new signal from however many 15 sample "windows" I got from the original signal. This shortens the new signal. Your zero-padding suggestion does not shorten the new signal. Is zero-padding what's used in Nyquist's function to calculate RMS values of some signal and is this a "standard" approach found other places? ? Also, any suggestion on a good (easy to understand) Lisp tutorial. Have a good day. Mark. -----Original Message----- From: paul beach <sni...@fa...> To: Discussion of developing Nyquist plug-ins for Audacity <aud...@li...> Sent: Sat, Jun 20, 2009 7:58 am Subject: [Audacity-nyquist] INTRODUCTION TO DIGITAL FILTERS--Help with individual signal ... http://ccrma.stanford.edu/~jos/filters/ INTRODUCTION TO DIGITAL FILTERS WITH AUDIO APPLICATIONS JULIUS O. SMITH III Center for Computer Research in Music and Acoustics (CCRMA) Department of Music, Stanford University, Stanford, California 94305 USA On Sat, 20 Jun 2009 10:13:10 -0400, "Roger Dannenberg" <rb...@cs...> said: > Here's a high-level view and answer: > > What you are computing is called convolution. Convolution is a common > way to implement an FIR filter. In Nyquist, convolution by a short > signal like f(i) is implemented efficiently by CONVOLVE. You can > construct a signal like f(i) using SND-FROM-ARRAY, and you can construct > an array by allocating a new one using MAKE-ARRAY and filling in the > values with SETF, or you can call VECTOR to create and initialize an > array from arguments. Nyquist signals are indexed by non-negative time, > not by integers, so you will have to map your problem to the time domain > and think about boundary conditions -- you didn't say what is the origin > (initial index) of the input or output signals. You might have to pad > with zeros or remove some result samples to get the result you want. > When you construct a signal to represent f(i), give it the same sample > rate as s(j). > > -Roger > > msz...@ao... wrote: > > I posted something similar on an Audacity forum but was referred to > > Appendix 1 on extending Nyquist with C programming. > > Since programming is a hobby and I don't know C or Lisp I thought a > > Nyquist-Lisp type solution might be easier but I'm not sure. > > Here is what I need. > > > > Say f(i) is a function of sampling index i and f(i) is fully defined > > on just 15 index values. > > > > Specifically, f(i) = 27/16(i^3 + 2i^2 + i) for i = -7 to 7. > > Now, there is some sound signal s(j) where j is it's sampling index. > > I wanted to form a new sound signal n(j) by summing the multiplied > > pairs f(i)s(j+i) for i = -7 to +7 for each possible j. > > > > f(-7)s(j-7) > > f(-6)s(j-6) > > f(-5)s(j-5) > > ... > > f(6)s(j+6) > > f(7)s(j+7) > > -------------- > > SUM the above to give a single value of n at some value of index j. > > -------------- > > Furthermore, I want to do this across all possible values of j for > > signal s to form the new signal n. > > Nyquist has some filter functions but none are cubic and I don't see a > > way to specify ones own filter function that would do what I want. > > How do you set this thing up? > > > > Thanks. > > > > ------------------------------------------------------------------------ > > Make your summer sizzle with fast and easy recipes > > <http://food.aol.com/grilling?ncid=emlcntusfood00000003> for the grill. > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------------ > > Are you an open source citizen? Join us for the Open Source Bridge conference! > > Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. > > Need another reason to go? 24-hour hacker lounge. Register today! > > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Audacity-nyquist mailing list > > Aud...@li... > > https://lists.sourceforge.net/lists/listinfo/audacity-nyquist > > -- paul beach sni...@fa... ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ Audacity-nyquist mailing list Aud...@li... https://lists.sourceforge.net/lists/listinfo/audacity-nyquist |