8 Writing a Csound Score

The score portion of a Csound .csd file is found between the <CsScore> and </CsScore> tags. Alternatively, the score can be contained in a separate .sco file if you’re working the old-fashioned way, with separate .orc and .sco text files. The score contains a list of events. When you click the Run button in CsoundQt (or invoke Csound from the command line and pass it some command-line flags, one of which will be the name of your .csd file), Csound first compiles the code in your orchestra into a form that can produce sound. It then sorts the events in the score and puts them in a form that can play the instruments defined in the orchestra. In this chapter we’ll take a close look at exactly how to create Csound scores, and what happens when the score is sorted by the preprocessor.

In the absence of at least one score event, Csound would have nothing to do. Or so we might expect. If you’re using real-time MIDI input to play the instruments in the orchestra, however, you can in fact create a score that contains no events, but simply runs silently for some period of time, waiting for MIDI input. For details, see Chapter 10, “Using Csound with MIDI, OSC, Pd, Python, and Live Audio.”

The Canonical Csound Reference Manual explains the score syntax in detail. In the left pane of the HTML manual, click on The Standard Numeric Score. The syntax of Csound scores is not difficult to master, but there are a few tricky bits. If you’ve been reading straight through this book, you’ve already seen dozens of Csound scores, most of them short and simple. In this chapter we’ll explore scoring in greater detail. We’ll look at the meanings of the various types of score statements and look at the shortcuts that can make producing complex scores somewhat easier.

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

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