Task One - Creating a First Order FIR 2 Point Moving Filter (LP with CF at Nyquist F)

Note: please send all notice of errors to this email address only; gifts will be awarded: in some form or other, on a scale of relative error glaringness to all finders on a first come first served basis. The more horrific the error, the better the prize will be! This is part of a scheme to encourage all users of the group to:

  1. show off your skills (both new and old) and
  2. to keep all information on the site as accurate as possible.

Please don't get overexcited yet: the prizes apply only to the Tutorials, Set Tasks and their final write-ups , not any old user comment in the forums will count. However if you can help in the forums in any way, perhaps with a corrected answer, alternative approach, or a constructive criticism please do so; this is how we will all be continuously learning from one another. We may be a varied group of users, pro's and noob's alike, but here we are all equals : learning, teaching and inspiring each other to further gen~ greatness.

Peace and be gen~erous.

ありがとうございます  マイルズ  よろしくおねがいします


Task One

Implement the first filter in the attached Class Block Diagrams PDF and create a gen~ version. Annotate with comments to make the process clear.

Thank you to David Huff / STRINGTAPPER at the C74 Forums for this source document of relevant diagrams and his accompanying notes below.

David has kindly given us permission to use them and the original Class Block Diagrams PDF file, gained while studying a course lead by Professor Jon Nelson from the composition faculty at The University of North Texas, the person who presumably compiled the list of Class Block Diagrams. The course itself was on delay based digital signal processing mostly using gen~ and a little Csound (most recent version found online and archived here - retrieved 2016/04/16).


Here’s a little key I had in my notes for the class:
x(n) = input
y(n) = output
(n) = "sample of the moment"
(n-1) = delay of one sample
z-1 = single sample delay (history operator)
z-n = some variable sample delay (delay operator)
z-m = "moving" delay (delay operator w/modulation of delay time)
triangle = multiply (*~ or * in Gen)
small ‘-‘ sign = invert a value (subtract instead of add)
circle with "+" = addition operator
black dot = branching point
note: Z^-1 (z-1 in my notes above) is a single sample delay. Use the history

Relevant information extracted here as an image: Class Block Diagrams - Key.

Full thread including key at: https://cycling74.com/forums/topic/good-sources-for-gen-dsp-code-online (also archived here).

Along with the generous resources above, in this breakdown of Task One - Creating a First Order FIR 2 Point Moving Filter (LP with CF at Nyquist F) I have made considerable use of two indispensable resources:

  1. The Computer Music Tutorial - Edited by Curtis Roads (an essential addition for all computer music aficionados).

  2. BasicSynth: Creating a Music Synthesizer in Software - By Daniel R. Mitchell (brilliant for doing what it says on the tin and a great use of C++ (presented in a readable manner, of which I previously knew nothing and am finding extremely useful and easy to follow and learn from). Also with great and very relevant excerpts to us available at: www.basicsynth.com.

For more essential resources please see add to and organise if you're up for it, the editable document in the files section of the gen~ facebook page : Books, Journals and Free Online Resources.

The Journey Beyond

In gen~ the vast majority of work is realised with delays; in the digital world all filters are delays. With this key fact in mind...

Curtis Roads in The Computer Music Tutorial (p.397) states:

"A committee of signal-processing engineers defined a filter as:

A digital filter is a computational process or algorithm by which a digital signal or sequence of numbers (acting as input) is transformed into a second sequence of numbers termed the output digital signal. (Rabiner et al. 1972)

Thus, any device with an input and an output is a filter! The most common use of the term describes devices that boost or attenuate regions of a sound spectrum.

Reverberators and audio delay lines are also filters. This should hint at the fact that a filter can change not only the spectrum of an input signal, but also its temporal structure - either on a fine scale (delaying the certain frequency regions by a few microseconds), or on a large scale (delaying the entire signal for hundreds of milliseconds)."—   Curtis Roads, The Computer Music Tutorial.

This is why we have started with Task One being a simple filter: with Curtis Roads a pioneer and leading expert in the filed of of digital music telling us this, we can begin to see there are no easy to follow gen~ roadmaps, merely signs, directions and destinations far, far more exciting than we could previously have imagined.

(Alternative archived source of video here)

Now that we are even more excited (and a little scared shitless) for upcoming future instalments and tasks in this group - there is clearly currently no decent road infrastructure. There are plenty of signs along the journey however and the Max/MSP community is a great one for hitching rides with (even at 88mph)!

So, firstly then, let us break down what we've got here already in Task One:

Where x is our input and n is the number of the sample in our continuous digital signal input, when x(n) enters the delay line it goes to two places:

  1. the delay (represented by the box in the bottom half of the filter's flowchart / diagram), where Z-1 is equal to a delay of 1 sample (in gen~ [history] is our friend).
  2. and simultanesously, the circle with a + inside (representing addition. Here x(n) and x(n-1) are combined (summed).

The sum of these two values reach the triangle which represents multiplication. Here the triangle is equivalent to *~ in msp and * in gen~. The two values we have been dealing with (our original undelayed sample x(n) and our delayed sample n-1) are then multiplied by 0.5 (or divided by two as pointed out by Bob Bob Bob:

This is correct (kind of), Bob Bob Bob also correctly suggests the following equation:

The sample x(n) and our delayed sample n-1 are summed and multiplied by 0.5. Essentially the difference between multiplication by 0.5 or dividing by 2 are negligible and garner the same result, this is true however, Mark Smith states correctly though that multiplying is more CPU efficient than the division. Or read this thread on the C74 Forum: Addition vs Multipilication [sic], also archived here.

Forum user SEEJAYJAMES, in the C74 thread sums it up the best I think:

November 19, 2010 | 12:50 am

[There is p]lenty of info out there about multiplication vs. division, but if you consider that computers really are just adding, multiplication is more straightforward (no carries etc.) In the example [*0.5 vs /2] it’s negligible but in other cases it’s definitely a concern. Any time you can do multiplication instead (which is most cases) it’s better... one time you couldn’t would be when you don’t know beforehand what the divisor will be. (Even then you could use a lookup table, but there are limits to how many you want to include :)

Anyhow, the final filtered output is y(n); y meaning the output and n the currently outputed sample, therefore: y(n).

This filter's output is the continuous averaging of the current and preceding sample.

Daniel R. Mitchell in his wonderfully useful book BasicSynth: Creating a Music Synthesizer in Software (some of which is excerpted online at BasicSynth.com states perfectly in relation to a very similar filter we have just made and will build upon in Task Two):

"We can implement a filter very simply by taking the average of the current sample and the previous sample. This filter has a frequency response from 0Hz to fs/2 with a very slow roll-off. As a general audio filter it has limited usefulness. However, there are a few situations where it is quite useful, despite its simplicity. [...] If we apply a one-sample averaging filter to [a noise signal] we can reduce the upper frequencies and produce an approximation of pink noise. We can call it a pinkish noise generator."

He also states: "Implemented as a computer program, a digital filter is simply the sum of the input and delayed samples multiplied by their respective coefficients."

- (Mitchell, 2008. p105)

Coefficients you ask? Well so has Ideins Idzwei in this post .

Here we have the essence of Task Two: Using Coefficients, Setting CutOff points for a Filter, Poles / Cuf-off slopes and adding multiple Delay Lines. The title is subject to change, but this illustrates the potential content... Anyhow, back to Task One.

Off the top of my head a low pass filter with a cut off frequency that is half the sampling rate would be useful as an anti-aliasing filter but we would have to examine the pole or cut-off slope and resonance etc. Poles etc. will be part of Task Two.

The Winners of the first task

The first person to correctly implement the layout of the filter within the gen~ environment and clearly label them with comments (an exceptionally important, professional and ultimately essential necessity as patches will tend to become more and more unwieldy) was Reuben Thomas, answered here. Go and give him a like or whatever knew facebook emoji ripoffs are on offer!

Seen below here it is clear to see.

Note: Unlike Max, or MSP, everything happens at once, that is to say, there is no order of events, For example, in Max/MSP the order of outlets and the arrangement of objects on the page have an influence on the order of the patches' operation. In gen~ everything happens contiguously or simultaneously.

The GenExpr code reads:

History history_1(0);
add_2 = in1 + history_1;
add_3 = add_2 + 0.5;
out1 = add_3;
history_1_next_4 = in1;
history_1 = history_1_next_4;

Also of similar noteworthy is Evan Bogunia who gives us the same answer in a codebox version. "Both ways are totally fine, and to people more comfortable with max patching, than writing code, it's probably a bit more intuitive. I've been pretty fond of codebox lately though", he says:


Again, go and give him all the thumbs up etc available to show him you love him.

Note: GenExpr is not C or C++ it is its own thing, but should make sense if you get even a bit of C, C++ or JavaScript. I personally have very little knowledge at all of C, C++ or GenExpr, just a pretty good grasp of a little html, css and javascript and a lot of reliable resources that get me through well enough; anything internet web-based (so html, css, javascript, jquery, writing mobile apps - I should have said everything rather than anything you start with w3schools.

Bob Bob Bob also discovered this, a potential future Task I had prepared for Task 2, now included here as part of Task One's experimentation; but there you go, learning by discovery is best!:

Looking at this closely we see he is right (click to enlarge the image):

In summary, so far by delaying the input by one sample and combining it with the next (current) sample we have created a low pass filter, whose cut-off frequency is half the sample rate: fs/2. The gen~ operator for delaying a single sample in gen~ [history].

Break it down (Baby)

(Alternative archived source of video here)

As we realised above, this filter's output is the continuous averaging of the current and preceding sample.

In essence a filter (in digital, mostly all filters) are delays and when we have a delay we have an altering, or interference of phase. Phasing is usually perceived as that whooshing sound, where two pieces of audio are played out of sync, but more importantly, gradually getting more and more out of sync; this is what causes the whooshing to fall in pitch as the two get more and more out of time, or rise as the two become closer together in alignment. This leads us to need to talk about phasing and its two lovely acoustical phenomena.

If you don't have two record decks and two identical records (remember those things?) then try it out for yourself here: Phasing Patch.

Constructive and Destructive Interference

All periodic waveforms can be represented as a multitude of sine waves (see any reliable source on Fourier if you don't believe me). So having read and absorbed all of that homework just set, if you take one sine wave (a) and another (b) that are slightly out of phase (or pitch causing phase issues) you get a new waveform (c):




The third diagram here (c) is an example showing a beat frequency, not what is happening in our filter, but a good example of constructive and destructive interference. Here the sine waves from peak to trough go from 1 to -1. If the two values combined are positive we get constructive interference, if they are positive and negative we get destructive interference.

So by delaying the sample and averaging with the current sample, we have created interference, one sample at a time. This is the simplest of digital filters we could have made, why I chose it and probably why it was at the top of the PDF file! Usually a simple Low Pass Filter is not that useful unless you want to get rid of interference, but remember as quoted above, Mitchell, D, R. in BasicSynth stated: "As a general audio filter it has limited usefulness. However, there are a few situations where it is quite useful, despite its simplicity".

So, ignoring the fact that we are working at sample rate with our filter and staying with two sine waves for simplicity at the moment "If we add a sinusoid to itself the resulting signal will be of the same phase and frequency but doubled in amplitude [constructive interference]" ( Mitchell, D, R. - BasicSynth p102):

"If we shift the input signal by 180° before adding, the input values cancel and produce no output [deconstructive interference]" (Mitchell, D, R. - BasicSynth p103):

"As the phase difference of the two waveforms increases from 0 to 180°, the amplitude of the sum decreases from 2 [total peak amplitudes of each waveform being 1, so 2*1] to 0. For example, at 90° phase difference, the amplitude of the output signal is 1.4142. The phase of the output signal is shifted as well [anyone who wants to explain the maths here please PM me.]" (Mitchell, D, R. - BasicSynth p103):

"We can represent the sum of the signal and delayed sample with a diagram as shown [below]. The delayed sample is represented by the box labelled z-1. An amplitude multiplier is shown by a triangle." (Mitchell, D, R. - BasicSynth p103):

Hmmm. That looks familiar. I've seen something like that before:

So what are the differences? The triangles represent amplitude multipliers. In our version we multiply after the addition, in Mitchell's version we multiply the individual input signals before the addition. This is where things can be interesting, especially when we play with the values. Again we'll come to that in the future. Please note: when I say in the future, or later on, as I may have done previously, I mean Future Tasks, not later in this one!

Now we know what we have built, let's talk about the operators... Max, MSP, Jitter, Gen~, they all look similar, but what look like objects in gen~ are not objects, they are operators. A big difference and important to understand. So what have we got then?

The Documentation

(Alternative archived source of video here)

When working with gen~ (gen or jit.gen) the first place to look is in the help... section which I try to say without irony here. Over time this area will build with gen~ tutorials and proper help pages for each operator as there are for each object I hope, but for now we've got what we've got and with a little digging there is quite a bit; navigating it all and finding the information you are after is just a bit trickier, compared to finding everything in one go about the [zl] object for example by selecting "Open zl Help" from the object itself.

Here's a list of the two main places to begin:

  1. Gen Beta (Max6) documentation, discussed here, original document (archived here)
  2. The Max 7 Documentation (online at C74) here, and hopefully staying put as I have no intention of archiving the lot! ;-)

Looking at the Max 7 Documentation (online at C74), for starters there are three main sections starting from the top: Max, MSP and Jitter.

A bias or just a lot of catching up to do? Alright to be fair Max/MSP/Jitter have years of work to pick, choose and adapt from, but Max for Live and Gen are certainly not that new so why the lack of tutorials for them still? Let me be clear though I love C74 and would love to be a part of helping build this up. Hint hint! :-)

In the contents section (further down on the left) you have five main sections: Max, MSP, Jitter, Max for Live and Gen.

Anyone sly enough to notice

  1. repeating patterns, or
  2. breaks in repeating patterns
will notice that Max for Live and Gen~ fall into the later category:

Something is missing: Tutorials; Tutorials are the Max/MSP 101 of learning!

Noob question: "how do you...?", regular users' answer: "have you done the tutorials?" - well, there aren't any so that's why we're here now.

Now let's not blame C74. I'm sure Tutorials can be made soon enough by any members of their team or, well, us. If they are good enough they can go in there (someone at C74 correct me if I'm wrong). There are more than enough C74 staff in this group alone to make a few, maybe C74 want to release them all in one go. But I know myself and plenty of others would happily take a job, be it freelance, part-time or full-time to get these tutorials and proper help files done; and as for Max for Live? I'd be all over it and perfectly qualified, like a lot of us here and on the main Max/MSP forums and Facebook groups.

C74 - accepting CV's? ;-)

But for now, anyway, it is therefore up to us to trundle on. Building up as many gen~ articles, Tasks, tips, examples, answers, existential gen~ related dream ideals ad infinitum within our group, may be someone will feed these ideas along with the members' user name up the chain...

...There are however plenty of Examples though and I mean P L E N T Y of Examples.

In Max: Help>Examples>Gen.

Loads and loads... More than I can be bothered to count. More than can fit on my screen...

So let's say they haven't put the evidence and help in some places we had hoped to find it, but as with many Max/MSP Examples, this is what they are: Examples, not Help Files, not Tutorials, but blimey there are a lot of gen~ Examples, however with very little annotation within them. We need to take the advice given to the noobs: "Have you read the documentation?". We need to. Take the gen~ Filters examples in the "Help", again trying to hold back the irony of the word "help" here: loads of filters implemented, but little to no annotation. Nothing like we've been trying to achieve: how they work, or why; No Annotation At All (at least in the ones I have perused to be fair). What is the comment box to be used for then? Headings? Pah!

Despite the misgivings at this early-ish stage of implementation, there are plenty of C, C++ knowledgeable folks who can jump right in. Great. If any have time to put into writing Tutorials, annotating the examples or making YouTube videos then the response would be overwhelming and will ultimately make you feel a little more joyous as you receive the response and online feedback you deserve! And you will both deserve it and I assure, you get it multiplex tempora.

I would like to point out that this group is for everyone and there will be no RTFM responses... instead helpful links to sources of information, or discussion of ideas new users bring to the table will help both the questioner and inspire new ideas in others, no matter how advanced a user they are. Here is the difference between the C74 forums and the Facebook groups. I am happy and have some small feeling of self affirmation when I answer a question on the Max/MSP group, because I know the answer or a way of leading someone to the answer. This I find is less accessible on C74 the Forums. If you've done your homework, all of it, cut and pasted your patches correctly and made sure no one has asked and solved anything similar before, then go ahead with the Forums. If you're really stuck that's the place to go.

If you're feeling things out and don't really want someone looking down their nose at you, you do the facebook group thing. Anyone agree or disagree?

So for the sake of Task One, we will look through the available documentation that is relevant to the task, along with how you can access more information when working with the operators themselves; this works in a similar way to getting help on an object in Max/MSP, but does not give you the all important hackable help pages we all know and love. Let's also point out this is the first time I have used gen~ with a particular purpose and why I set up the group. To encourage noobs and pro's alike, to help each other, encourage suggestions, support and influence, enticing and exciting new ideas, a melting pot of "gen~unine" support!

Note again: I knew very, very little about gen~ except for what I have taught myself before this week:

  1. A couple of Sam Tarakajian's / dude837's tutorials. See otherbirds.com... a rather slow loading site for such a genius who gave us Mira. No digging at you Sam, just digging you a lot! (and I watched these ages ago, in order as they came out, as I am a subscriber to his channel, so a while ago now).
  2. The Gen 6 Beta Documentation mentioned earlier archived here
  3. The three Getting started... videos
  4. This sneaky little mofo of a video showing us how to take code from the internet and adapt it for codebox in gen~. This is what started me on this whole mission and led me to the the thread with the source of the Class Block Diagrams PDF in the first place.

It was also a little of these (note, that I have separated them from the list above)...

  1. Working my way through a little of these Gen topic Including Gregory Taylor's excellent gen~ The Garden of Earthly Delays
  2. Common Operators
  3. Gen Overview
  4. Gen~ Operators
  5. GenExpr
  6. But have yet to look at these Gen Jitter Docs
  7. The gen forums

So why the separation? List two is the the official gen / gen~ jit gen documentation other than the "ahem" help pop-ups and Operator information linked / duplicated from the list, not directly listed but which itself is an improvement:

Gregory Taylor: "What you’ll find there is that material, relocated. And Wesley’s probably too humble to mention that nearly everything about the current Gen documentation has improved, and is improving (I am particularly enjoying the ability to option-click on a Gen operator to receive a compact and succinct description of the operator’s function. Bravo!). As for further tutorial materials, please stay tuned..."

We are Gregory, we are! :-)

For a newcomer to gen / gen~ etc (I'm just gonna say gen~ from now on ok?) That list is the default help or otherwise source of information and documentation.

However, the most interesting stuff is hidden away in the examples folder we talked about earlier, in Max/Msp {Help Menu > Examples > Gen > OMG!!!}, which needs some bloody annotation! So, play away by all means, and break away by all means too is the more likely scenario. Tweaking gen~ is not like tweaking Max or MSP, unless you have some at least fundamental understanding of the bloodly thing you're screwed, and so is the patch... literally and permanently (well it's a pain in the bum-hole to get out... think surgery!) which leads me to this advice: NEVER, JAMAIS, NIE , 決して; NEVER SAVE THE EXAMPLE PATCHES. So here we are. Learning the stuff behind and inside that stuff to make more stuff that's even cooler stuff by combining all the stuff we know with all the stuff we are fiddling around with.

Consider this (definitions from: www.vocabulary.com):

We need to put in a lot of effort to learn the basic principles, fundamentals , tricks of the trade and what us musicians call the chops. This means gaining the knowledge.

Without this, if we took a gen~ example patch and started to adjust it, change some numbers here and there, unpatch this, patch up that add a few more operators, without The Knowledge we would be operating under instinct (we recognise some similar looking GUI things and know we can join things together) but we would just be achieving nothing but breaking the patch. Hence, DO NOT SAVE OVER THE EXAMPLE PATCHES! Remember to cut and paste the example into a new patcher. Do that before any editing or fiddling.

Once we have done our homework, gaining the knowledge, we can operate at the same speed as we did under instinct, but our adjustments and additions are made with the knowledge happening for us in the background, without us even thinking about it. Working like this is working with Intuition.This is not going to happen anytime soon for some of us gen~wise, or ever (me included), but this is what we are aiming for and the level most of the examples expect us to be at. So strap in and prepare to start travelling at 88mph!

So Back On Track

(Alternative archived source of video here)

Seriously get yourself The Computer Music Tutorial - Edited by Curtis Roads. It's the most aesthetic of books as it flops open at the page you want. However, google books can be quite helpful, and although I don't agree with it at all the internet can be quite naughty.

Also, seriously get yourself BasicSynth: Creating a Music Synthesizer in Software - By Daniel R. Mitchell, or at least peruse the excellent and useful excerpts are available for free at http://www.basicsynth.com and start reading the C74 Documentation both lots! and use the 'slightly odd' pop-up info you get instead of the traditional Help Files for each Operator. There is a wealth of gen~ info hiding away there, just not in the exact way way we are used to finding and using it.

Each operator and its arguments, workings etc all have a page, they're just a little different to what we're used to - it is gen~ not Max/MSP after all so let's give a man a break man!

I do suggest we make a C74 Gen Documentation wish-list to add to the documents section; I will begin:

  1. Proper operator help files, with gen~ patches that include explanations of the operator, proper example patches that show ALL the permutations and possibilities, in the traditional cut and paste ethos of Max/MSP's learning curve. Sorry Gregory, (have you joined our group? Someone invite him please? Sam?). Gregory, but your love and newfound excitement for "particularly enjoying the ability to option-click on a Gen operator to receive a compact and succinct description of the operator’s function." was declared in December 19, 2012 | 4:59 pm. Still as excited? or perhaps you can see the logic of having Max, MSP and Gen~ [click Open...Help] give us the same level of detail, adaptability and hack-ability that is the basis of most of Max/MSP's workflow?
  2. Now your turn... gen~ Facebook Group people. I've made it, now you add to it, please! (and be realistic)

Having had my little rant, which was rather unfair (grossly some may say), there is a lot of information available about gen~ in the main documents if you work your way through them, so let's commit to changing the overused RTFM conversation now: Noob question: "how do you...?", Regular Users' answer: "have you done the tutorials?" into the now gen~ appropriate, Noob question: "how do you...?", Regular Users' answer: "have you read through the documentation?". That still applies to us if we're following this Task / Tutorial. Have we read through the Gen~ documentation and 'help pop-ups'? Gen~ is new to many of us, even if we are Max/MSP/Jitter whizzes, but if we don't get gen~ then we are the noobs.

Smooth Operator(s)

(Alternative archived source of video here)

So let's break this filter down operator by operator and see what can we find out and hopefully some useful operators for the Next Task.

Firstly we need a parent patcher for our gen~ patcher to live inside. So let's make a new patcher containing a gen~ object. Note that the gen~ object has two inlets and two outlets; these relate to the in and out operators inside the default gen~ object:

Inside the gen~ object, for the sake of this example, we can get rid of the second [in] operator.

Following the diagram the input goes to two places:

  1. Something that delays it by one sample
  2. Something that combines the original and delayed samples

As the + operator is already in the default patch, let's take a look at that first. It looks like an object; in fact it looks like the + object. It's meant to. Many operators in gen~ mimic their max or msp equivalents, but they are not objects, they are operators and there are some subtle differences.

OK. So let's look at the help patcher, oh yeah that's right, there isn't one. So what do we get instead?

Gee. Thanks for that C74. But wait hang on what's that little i? Ahhhh, a link to some more information. The documentation for the common operators.

If we look at the page for +,add we find all the information we need on the + operator.

Great. Kinda... some examples would be nice but hey what ya gonna do? There are a couple of things worth a mention while we are here though:

  • Arguments are set. Give an operator an argument and that is its job. Its ONLY job. Don't expect behaviour changing the value of what you think is an initial setting via the right inlet.
  • All numbers are floats, whether declared or not.

The two values we are adding for the filter are the current sample (as hooked up already) and the previous one. There is a specific operator for currently keeping the previous sample in memory for access and that is the [history] operator. So let's put this along with the straight input to add them together

We then multiply by half (or divide by two as discussed above) and come out our one outlet.

So here's my final gen~ patch for the task:

And the overall task (which you can download here or clicking on the image):


Well after all that worry before using gen~ and looking at the diagram, that wasn't too bad after all.

So what does the name or title of the diagram for the filter actually mean?

First order FIR, 2-point moving average filter (LP with CF at Nyquist F)

    First order
    This is to do with how many stages we have in our filter, e.g. 2, 3, 4, 5 ... n. In this example we have delayed and combined a sample once, each time, meaning there is only one stage to our filter. Hence, first order.
    FIR stands for Finite Impulse Response. Roads states:
    "In a digital system, the briefest possible signal lasts just one sample. This signal contains energy at all frequencies that can be represented a the given sampling frequency. [...] The output signal generated by a filter that is fed a unit impulse is called the impulse response (IR) of the filter." - Roads, C - The Computer Music Tutorial p400.
    In digital filter design we have two main types that we will come across (FIR) Finite Impulse Response and (IIR) Infinite Impulse Response. A simple way of differentiating between the two is that an FIR filter has feedback that at some point stops. This means that the feedback (and therefore the impulse response is finite). The IIR filter's design has a feedback loop that is continuous and therefore infinite. As we are only adding the current and the previous samples together, one at a time, for every new sample input our filter is finite and has a finite impulse response.
    2-point moving average filter
    In statistics a moving average is when you take an average over a period of time, for example data from each week, or month. The 'points' are how many weeks, months etc you include and the moving bit is the fact that you are recalculating the average each week, month or so on. In our case we have a two point moving average, so we are taking the average every two points, in our case samples. This means that we average each incoming sample with the previous sample (in our case stored by the [history] operator).
    LP is Low Pass, the type of filter named by how it acts in the frequency domain. If you don't know at least what some of these are by now, how the hell did you end up reading this far down the page! Bob Bob Bob showed us how to make the high pass (HP) filter. There is a lovely diagram of four of these over at KVRaudio.com
    with CF
    CFstands for Cut Off frequency, this is the frequency at which the filter begins to act. So in a Low Pass filter the Cut Off point is the frequency at which other frequencies below (it's a Low Pass) may pass.
    at Nyquist F
    Nyquist F is the Nyquist Frequency (our cut off point here). Well if you did your Fourier homework set above you know what this is. If not tough. Not really, here we go. Without going into aliasing here, or ADC or DAC (if you want an explanation of aliasing, quantisation noise and bit crushing then let me know), the Nyquist frequency is half the sampling rate. If you want a detailed explanation then you want Steven W. Smith PhD's fantastic site www.dspguide.com

Tasks Two and Three

So this all brings us to task two. Bob Bob Bob already stole task two straight away by making a HP filter. Ideins and Patrice discovered the difficulty of setting a new cut-off point.

So let's take Daniel R. Mitchell's diagram for another simple filter where the multiplication happens before the addition and see what impulse responses we can derive from it.

Finally let's build a 2nd, 3rd or 4th order general pole-zero IRR filter.

Oh and I'm having internet access issues at the moment so sorry if I Haven't been keeping up and won't be able to respond on the group very quickly for a while.