How-To Control Csound with a Custom Midi Controller: Introduction (1 of 2)
posted Aug 23rd 2005 5:30am by fabienneserrierefiled under: Uncategorized
Csound is a free language for sound synthesis and processing. It has a rich history and is still used today by musicians, composers and sound designers including Brian Eno, Richard James (aka Aphex Twin), NIN, DJ Spooky, and many more. Why is Csound still in existence today? It is a simple language which veers quickly to complex auditory experiences. This coupled with a quick learning curve has kept Csound a popular audio synthesis language since its creation in 1985 by Barry Vercoe.
This How-To is one of a two part installment. Part One is an introductory leap into Csound. Part Two next week will have you building a physical interface to control a Csound environment via Midi. Please note that this intro is a small daub of paint in the universe that is Csound creation. Many books, entire webpages, and courses have been taught on Csound. This introduction is meant to offer a glimpse into the rich world of audio creation and to hopefully inspire the reader to invest more time in Csound.
You will need for this How-To: a computer with an audio card, and a Mac (OS X or OS 9), Windows, or Linux operating system. This How-To will focus on the lastest Mac OS X version of Csound, but should allow extrapolation to your OS.
Find and install Csound for your OS of choice:
Mac OS X
Mac OS 9
Windows
Linux (also here)
If you are in doubt about which version to grab go to the Csound front page and choose “Execs” and navigate to the download for your operating system or alternatively see the sourceforge page for Csound.
Launch the Csound application. Notice you have “orc” and “sco” tabs at the top of the main window. Orc stands for orchestra which is the area where you will define what your instruments will sound like. Sco stands for Score, the section in which you will define the notes and durations and parameters for each instrument.
Delete the text in the “orc” window and cut and paste this text to replace it (or download both orc and score files from here):
COPY AND PASTE THE TEXT BELOW THIS LINE
=======================================
;Fabienne Serriere
;engadget.com
;23rd August 2005
;feel free to redistribute! please use me and re-use me.
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
instr 10
idur = p3
iamp = ampdb(p4)
ifrq = cpspch(p5)
ifun = p6
iatk = p7
irel = p8
iatkfun = p9
index1 = p10
index2 = p11
kenv envlpx iamp, iatk, idur, irel, iatkfun, .7, .01
kmodswp expon index1, idur, index2
kbuzswp expon 20, idur, 1
afab grain 10000, ifrq*.04, 55, 10000, 10, .05, 1, 1, 1
asig3 foscil kenv, ifrq, 1, 1, kmodswp, ifun
asig2 buzz kenv, ifrq*.99, kbuzswp+1, ifun
asig1 pluck iamp, ifrq*.5, ifrq, 0, 1
amix = asig1+asig2+asig3+afab
out amix*.5
endin
instr 20
idur = p3
iamp = ampdb(p4)
ifrq = cpspch(p5)
iatk = p6
irel = p7
ivibdel = p8
imoddpt = p9
imodfrq = p10
iharm = p11
kenv linen iamp, iatk, idur, irel
kvibenv linseg 0, ivibdel, 1, idur-ivibdel, .3
klfo oscil kvibenv*imoddpt, imodfrq, 2
asig buzz kenv, ifrq+klfo, iharm, 2
out asig
endin
instr 30 ; 3D Sample Wave Terrain
ilevl = p4*32767 ; Output level
ipitch = (p5 < 10 ? cpspch(p5) : p5) ; Pitch in cpspch or Hz
iposx1 = p6 ; X position start
iposx2 = p7 ; X position finish
iposy1 = p8 ; Y position start
iposy2 = p9 ; Y position finish
iradi1 = p10/1000 ; Radius start (scaled)
iradi2 = p11/1000








Why is the entire article up on the home page?