What is Csound? a programming language for sound generationa programming language for sound...
-
date post
19-Dec-2015 -
Category
Documents
-
view
222 -
download
0
Transcript of What is Csound? a programming language for sound generationa programming language for sound...
What is Csound?What is Csound?What is Csound?What is Csound?
• a programming language for sound generation a programming language for sound generation • uses software synthesis to compile user-defined uses software synthesis to compile user-defined
orchestras and scores to produce music orchestras and scores to produce music • allows users to program whatever synthesis allows users to program whatever synthesis
method or tuning they like method or tuning they like • challenges users to harness its power to produce challenges users to harness its power to produce
music music • no built-in instruments no built-in instruments • only the basic building blocks, just like the C only the basic building blocks, just like the C
programming languageprogramming language
The Csound OrchestraThe Csound OrchestraThe Csound OrchestraThe Csound Orchestra• contains the instrument designs contains the instrument designs • naming convention: the naming convention: the .orc.orc file contains file contains
Csound orchestra Csound orchestra • begins with four header statements, most begins with four header statements, most
commonly the following:commonly the following:
sr = 22050sr = 22050 kr = 2205kr = 2205 ksmps = 10ksmps = 10 nchnls = 1 nchnls = 1
The Header StatementsThe Header StatementsThe Header StatementsThe Header Statements sr = 22050sr = 22050
kr = 2205kr = 2205
ksmps = 10ksmps = 10
nchnls = 1 nchnls = 1 • first header line sets sampling rate first header line sets sampling rate
• number of digital samples for each second of sound number of digital samples for each second of sound • 44100 Hertz — high quality sampling rate of CDs 44100 Hertz — high quality sampling rate of CDs • 22050 Hertz — medium quality sampling rate 22050 Hertz — medium quality sampling rate • 8192 Hertz — low quality telephone sampling rate 8192 Hertz — low quality telephone sampling rate
The Header StatementsThe Header StatementsThe Header StatementsThe Header Statements sr = 22050sr = 22050
kr = 2205kr = 2205
ksmps = 10ksmps = 10
nchnls = 1 nchnls = 1 • second header line sets control rate for more second header line sets control rate for more
slowly varying functions such as amplitude slowly varying functions such as amplitude envelopes envelopes
0
iamp
iattack isustain idecay
The Header StatementsThe Header StatementsThe Header StatementsThe Header Statements sr = 22050sr = 22050
kr = 2205kr = 2205
ksmps = 10ksmps = 10
nchnls = 1 nchnls = 1 • third header line sets number of samples for third header line sets number of samples for
one control period one control period • control period = sampling rate/control rate control period = sampling rate/control rate
• number of digital samples for each second of sound number of digital samples for each second of sound • specifying it makes it easier to remember this requirement specifying it makes it easier to remember this requirement
The Header StatementsThe Header StatementsThe Header StatementsThe Header Statements sr = 22050sr = 22050
kr = 2205kr = 2205
ksmps = 10ksmps = 10
nchnls = 1 nchnls = 1 • last header line sets number of audio channels last header line sets number of audio channels
• 1 — mono soundfiles 1 — mono soundfiles • 2 — stereo soundfiles 2 — stereo soundfiles