7 Thirty Opcodes You Must Know

Thirty? That hardly seems like enough. In this chapter we’ll cover more than fifty opcodes, some of them in depth, some more quickly. In truth, you could make music with Csound using no more than four opcodes (instr, endin, out, and oscil), but you’d have to work awfully hard to produce anything like a satisfying piece of music without adding at least a few more. The more opcodes you know, the more creative options you’ll have.

In some sense, this is the most important chapter in Csound Power! Everything that has come before it is preliminary; everything that comes after it is enhancements. Opcodes are what do the work of synthesis in Csound. Until you understand which opcodes to use and how best to use them, Csound will remain a mystery to you.

Csound boasts more than a thousand unit generators (more familiarly known as opcodes). Almost any of these could be useful to someone, in some piece of music. The word “almost” in that sentence is significant, however. Csound includes a number of opcodes that are deprecated. “Deprecated” is a fancy word for “don’t use this.”

Why should software include features that you’re advised not to use? Primarily so that Csound will remain backward-compatible. That is, to the greatest extent possible, an orchestra and score that were written for Csound 10 or 15 years ago should still produce exactly the same sound output when they’re run in the latest version of Csound. You shouldn’t have to edit an older file so that it will run without errors in the current version. Anyone who has struggled with version changes and changing system resources in other software will appreciate this fact. But you’ll usually find that deprecated opcodes have been replaced by newer opcodes that do the same things in better ways.

The left-side pane in the HTML version of The Canonical Csound Reference Manual groups opcodes into a number of main areas:

image Signal generators—primarily oscillators and envelope generators, as well as noise generators.

image Signal input and output, a category that includes routing real-time audio signals, file operations, and messages printed to the Csound console while the program is running.

image Signal modifiers—primarily filters.

image Instrument control, a complex category that includes if/then/else logic operators, opcodes that can start or stop instruments, and opcodes that construct on-screen sliders.

image Function table operations, which read data from stored data tables or write data to the tables.

image Mathematical operations.

image Pitch converters, which give you some useful ways to convert numerical values from one type to another.

image Real-time MIDI support.

image …and so forth. Consult the manual itself to see the other categories.

In order to keep the discussion between the covers of this book concise enough that you can pick up the book without a forklift, I’ll have to pick and choose among the opcodes. We’ll look at those that seem to me most generally useful and omit hundreds of others. Some of the opcodes that will be omitted from this chapter are rather obscure specialty items of limited utility. Others, while very useful, are so complex that explaining how they work would require many pages. And a few tantalizing opcodes may get skipped simply because I’ve never stumbled onto them! The MIDI and Python opcodes will be covered in Chapter 10, “Using Csound with MIDI, OSC, Pd, Python, and Live Audio.”

We’ll start by discussing the most important tone generators—primarily oscillators and noise sources. Next, we’ll explore some of Csound’s envelope generators, filters, and signal routing methods. But first, let’s look at a few considerations that will apply across the board, no matter what opcode we’re deploying.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.198.159