CHAPTER 4

A Bell and an Organ Pipe

This chapter develops a program that generates waveforms of “bells” or “organ pipes,” using only the discrete-time versions of a simple harmonic oscillator developed in Chapter 3. The difference between the sound of a bell and that of an organ pipe is principally whether the system is driven with an impulse, representing a hammer blow, or white noise, representing a turbulent air flow.

The programs developed in this chapter intentionally use the “old style” C programming techniques. These techniques are sufficient to the purposes of this chapter. However, in Chapter 5, old style programming will not suffice. In that chapter, many bells and organ pipes are needed to produce a full bell choir or bank of organ pipes. The old style programming techniques used in this chapter become quite cumbersome in such situations. Old style techniques are sufficient only for simple programs.

4.1 THE EQUATIONS

In Chapter 3 it was shown that a continuous-time harmonic oscillator following the equation

images

where z = –d + jω is the continuous-time frequency, translates to the discrete-time recurrence relation, Equation 3.17,

images

where Δt is the time interval between sample points and is a linear transformation defined by the iterated integral in Equation 3.16. It was also ...

Get Signal Processing in C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.