The 90's - Waveguides

We could use Csound's multiple perspectives to better understand physical models and waveguides. We might start by modeling the clarinet with a series of delay lines and filters and visualize this model in the form of a block diagram as seen in figure 22.


[index] [prev] [next]

[+] Home
[+] Tutorials

Figure 22: Block diagram of a waveguide clarinet.

From here, we might try to convert our model into a Csound instrument by using primitive and basic opcodes as in figure 23, but this would be the hard way to do it for sure. (Thanks to Hans Mikelson for this solution.)

Figure 23: A complex waveguide clarinet built from simple Csound primitives.

Or we could create do it the easy way and design a waveguide clarinet simply by using Csound's wgclar opcode as shown in figure 24. The syntax for wgclar is:

ar  wgclar  kamp, kfreq, kstiff, iatt, idetk, kngain, kvibf, kvamp, ifn[, iminfreq]
Both approaches have obvious advantages - coding with Csound "primitives," or simple opcodes, gives us a clear sense of the algorithm and how the "synthesizer" is designed. Further, there are more places for us to insert some interesting extensions and modifications. On the other hand, using special purpose opcodes (which are virtually complete synthesizers in themselves) allows us to simplify the design, work at a higher level, and optimize the algorithm for better real-time performance.

Figure 24: A simple waveguide clarinet built from a powerful, full-featured and complex Csound opcode.

It would be fun to explore this instrument in real-time using MIDI as well, but I will leave that up to you. Hopefully as you have worked through this little series of exercises, you have begun to realize what is so cool about Csound - that you can explore any form of synthesis with primitive opcodes, high level opcodes or by digging right into the source code itself. Ultimately, you might add an opcode or two of your own! Clearly, it is these multiple levels of access, awareness and understanding that make the language so powerful and enlightening. You can work at whatever level is appropriate for your current interest, need and experience, alternating freely between them and gaining new insights at every stage.

  [next] The New Millennium: Scanned Synthesis