Eastman Csound Tutorial
NEXT CHAPTER (Chapter 1) -- Table of Contents
CHAPTER 1 -- CHAPTER 2  --  CHAPTER 3  --   CHAPTER 4  --  CHAPTER 5  --  CHAPTER 6  --  APPENDIX 1  --  APPENDIX 2


Eastman Csound Tutorial


Eastman Computer Music Center

Eastman School of Music

Allan Schindler

ABSTRACT

This tutorial introduces some basic sound synthesis and signal processing operations available within Csound, a software audio processing system. This document is designed as a "getting started" primer on

Sample orchestra and score input files are provided, most of which have been compiled into soundfiles within the /sflib/x directory on ECMC systems. Users of this document additionally should have at hand a current version of the Csound Reference Manual, which in the ECMC studios is available both online (through a link from the Center's Online Documentation web page) and in hard copy printouts. Non-ECMC users can access the manual at http://www.esm.rochester.edu/onlinedocs/Csound/index.html or else from some other site listed at the Csound Front Page: (http://mitpress.mit.edu/e-books/csound/frontpage.html)

This tutorial is designed primarily for students in the ADVANCED COMPUTER MUSIC TECHNIQUES (CMP421-2) course at the Eastman Computer Music Center (ECMC), and therefore includes some studio-specific information and examples on using Csound in conjunction with companion ECMC programs, utilities, macros and aliases designed to simplify or accelerate many common tasks with Csound. Score file examples, for instance, generally are provided here as score11 input files, rather than as standard Csound score (.sco) files. References to the Eastman Csound Library refer to "pre-set" instrument algorithms and companion score11 template and usage example files, available to all ECMC users, and to associated ECMC utilities. Currently, most of these additional Csound-related ECMC resources are available only on ECMC systems. However, we plan to make many of these resources available for online browsing, downloading and use by interested non-ECMC users sometime in the near future.

Non-ECMC users accessing this document by means of an internet web browser or a hard copy printout are welcome to use and to download any of public domain materials herein that they find useful. As noted above, however, such users will encounter information on ECMC resources that are not a part of the standard Csound distribution. For the benefit of non-ECMC users who do not have access to score11, Appendix 1, included in the online but not printed version of this tutorial, provides standard Csound score files, which can be used in place of the score11 file examples within this document.

Document history:
Original postscript version: January, 1989; revisions January 1991, January 1993 and January, 1995.
Original HTML version prepared by James Croson, November, 1996; Revised by A.S. June-Nov. 1998

TABLE OF CONTENTS

INDEX OF ORC/SCO and /sflib/x SOUNDFILE EXAMPLES

CHAPTER 1 : BASICS

1. Introduction

1.1 Orchestra and Score Files

1.2 Orchestra file header

1.3 Audio, Control and Initialization Rates

1.4 A Simple Instrument Algorithm

1.5 oscil and oscili

1.5.1 Interpolating and Truncating Oscillators

1.6 Score files

1.7 Creating Function Table Definitions

1.8 GEN Routines: gen10

1.8.1 gen9

CHAPTER 2 : PITCH CONVERTERS; INIT VARIABLES ; ENVELOPE GENERATORS; READING IN SOUNDFILES

2.1 Pitch Converters

2.2 Initialization Values

2.3 Envelope Generators

2.4 line and expon

2.5 linseg and expseg

2.6 linen and envlpx

2.7 gen5 and gen7

2.8 Creating Envelopes with Oscillators

2.9 Reading Soundfiles into Csound with soundin and diskin

CHAPTER 3 : AMPLITUDE & FREQUENCY MODULATION ; PROGRAMMING CONTROLS

3.1 Amplitude Modulation

3.1 Frequency (phase) Modulation

3.2.1 foscili
3.2.2 Carrier to Modulator Ratios
3.2.3 Modulation Index

3.3 if...else constructions

3.3.1 Conditional Statements
3.3.2 goto statements
3.3.3 Scaling Values By Register

3.4 Reading in Soundfiles with tablei, phasor and gen1

CHAPTER 4 : PULSE TRAIN GENERATORS ; RANDOM NUMBER GENERATORS

4.1 buzz and gbuzz

4.2 Pseudo-random Number Generators

4.2.1 randh and randi
4.2.2 Introducing Attack Chiffs
4.2.3 Combining Periodic and Aperiodic Control Signals
4.2.4. Additional pseudo-rando number generators

CHAPTER 5 : FILTERS ; GLOBAL INSTRUMENTS

5.1 Filters

5.2 Low pass and High pass filters

5.3 balance, rms and gain

5.4 Band pass and band reject filters

5.4.1 Using band-pass filters in parallel
5.4.2 Unit generator table; gen02

5.5 Comb, Alpass and Reverb Filters

5.6 Global Instruments

CHAPTER 6 : PROCESSING FILES WITH M4 ; FINAL EXAMPLES ; WHERE TO GO FOR HELP

6.1 Using m4 To Prepare Orchestra and Score Files

6.1.1 define statements
6.1.2 ifelse and ifdef constructions
6.1.3 include statements
6.1.4 Macros recognized by Csound

6.2 Final orc/sco/soundfile examples

6.3 Quick pointers to some additional Csound resources

6.4 Where to go for more help and information

  --  --  --  --  --  --  --  --  --

APPENDIX 1 : Csound score files

APPENDIX 2 : Extensions to F.M. Procedures : Multiple Carrier and Modulator Algorithms

APPENDIX 3 : Notes on soundfile inputs in the orc/sco examples

Eastman Csound Tutorial: End of Table of Contents

NEXT CHAPTER (Chapter 1) -- Table of Contents
CHAPTER 1 -- CHAPTER 2  --  CHAPTER 3  --   CHAPTER 4  --  CHAPTER 5  --  CHAPTER 6  --  APPENDIX 1  --  APPENDIX 2