New basic Csound tutorials on youtube

I just happened across these by accident. Apparently they have only been uploaded within the last few weeks.

He shows how to get your first sound out of Csound using the QuteCsound front end.

Search for user “ketchupok” or here are some direct links:

Configure QuteCsound:

60 second intro to Csound (using QuteCsound front end)

I think he may be assuming a little more expertise than a beginner might have, but in any case well worth checking out his short videos.

He’s also using a Macintosh, although the principles are supposed to be the same over all platforms.


Awesome studio/back to Csounding…

Wow and double wow

OK, this week I was able to go to an open house at Southwestern College in Chula Vista (outside San Diego, Calif.) and get a quick tour of the amazing recording studio that has been recently finished there. It’s a resource for their courses in recording engineering technology. I believe I heard that between $5 and$6 million was spent on it.

You can see pictures, panoramic views and see equipment lists here:

I am really envious of the students who get to work in this facility, and the musicians who’ve been able to record there. The professor, Jay Henry, who designed it from the ground up, also knows his stuff to an amazing degree. Check it out…

More Csound progress…

OK, lately (finding myself with a little extra spare time) I plunged back into Csound. In particular, I was working with some files I gathered over the years; some from the thonk processor, a few recorded with a tiny MP3 player on a city bus, and other random field and noise recordings. Nothing was really exciting me sonically, so I thought I’d delve back into the (extensive) granular synthesis and resynthesis tools available in Csound.

(Aside: Each time I do this I feel like I’m learning it from the ground up. Lesson: you definitely need to use it regularly to stay current!)

So I went and ran the various granular synthesis demo programs and listened to them to try to figure out if that kind of processing would allow me to get the sounds I think I’m interested in. There are several opcodes you can use to process either mathematical data or audio samples with granulation.

These are: grain, grain2 and grain3 (the older ones); granule (somewhat newer); and partikkel and partikkelsync (the newest, as far as I know.)

The problem is that, as with fractals, the parameters of the computation make a huge difference in the result. The only way this could be dealt with in the Old Days was to change the parameter, run it again, listen, change parameters again, etc. This is obviously terribly time consuming and inefficient.

[…still being worked on 25 Mar 2010…]

In going through old files and reprints, I came across a great article by Art Hunkins.

It’s not just me…

The nabble discussion group for Csound continues to be lively and informative. There’s (what I consider to be) a really healthy and spirited discussion about the packaging and ease of installation of Csound.

In a posting, Jim Aikin suggested the possibility of there being some institutional support for at least a little professional staff. Although it’s hard to imagine who would be the “angel” for Csound (it would certainly be me if I were hugely wealthy.) The problem with Open Source is that without coherent leadership things can get — diffuse. All the developers of Csound are volunteers, and Herculean work they do accomplish. The software is truly awesome in the real sense of the word. Just to give a tiny idea of the scope of Csound and cognates: the PDF version of the manual is over 2400 pages. Just imagine that.

The universe of Csound is so old and venerable now, that it’s analogous to a huge factory, with workshops and warehouses strewn all over the landscape, some features dead or moribund, and others only partially working. The users of Csound are also incredibly diverse. Some just want to do simple sound or music design writing orchestras and scores in text editors, some want to program it using other languages, others are doing audio and acoustics research and not using it for music at all; others are working on front ends (QuteCsound) and complete composition environments in which Csound is just the engine (e.g. blue.)

Then you have users on not only the Macintosh and Windows platforms, but Linux versions as well.

I think Mr Aikins’ idea is good; but it’s hard to imagine this happening realistically. Chuck ( ongoing development is languishing as well–labors of love are romantic but they don’t put top ramen on the table.

Perhaps a model might be OpenOffice. This was supported by Sun (now Oracle). It is extremely solid, full featured, trivial to install, well-documented and evolving. Maybe like it (cf. StarOffice) and Linux, there could be an inexpensive “supported” version and a free “all the source code you can eat” version.

Returning the favor

The folks at thumbuki graciously linked over to here for Csound beginners. Once you’re a little comfortable with writing and reading Csound instruments and scores, you should study the stuff on his site as well. It’s chock full of interesting experiments and tips. And besides that it’s a WordPress blog which is nice.

Csound: licensing and jargon

An issue that’s been batted around quite a bit on the mailing list is that of external libraries whose licensing status is not clear/not OpenSource, but Csound and/or its various components rely on. To include the compiled versions makes things very complicated, but there might not be permission to include the source code. I’m not sure where that all stands at the moment.

In a way I don’t want to know too much about the internal guts of Csound; but it is a huge and vast collection of software tools and it probably is good to have sort of an overview of it.

Someone, somewhere ought to make a big list of all the names associated with Csound and explain, on one line, what they are, what their status is, for instance to name a few off the top of my head:

  • QuteCsound
  • blue
  • Cecilia
  • FLTK
  • WinXound (?)
  • ATS Opcodes
  • Loris opcodes
  • Tcl/Tk interface
  • etc. etc. etc. etc.

and so on…

last edited 20100910

ChucK meets Csound

I also have experimented with converting a Csound instrument (#1706) to ChucK which seemed to work:

I had to upload the files with .doc format since I’m using this free blog software. Hopefully you can decode them.


This is really a zip archive I renamed with a .doc extension so I could upload it in wordpress. It has the original csound files, and my chuck version.

Some months ago, there was a great discussion on the ChucK discussion list ( called “One-line ChucK Crazy.” People contributed their own tiny ChucK programs to make interesting sounds/music as long as it fit on only one line.

One of the most active and creative contributors to the list is user “kijjaz” from Thailand. He submitted an amazing little program that used three oscillators hooked up in an FM configuration that created a bizarre drone if left to run for several minutes (or longer).

I’ve been tinkering with that algorithm, and want to experiment with various parameters and variables. And as an exercise, I’m also going to try to rewrite it as a Csound instrument.

I don’t have the Csound .orc finished yet, so I’m just going to give the ChucK program here. If you don’t know about ChucK, you need to learn! See other posts on this blog for pointers.

Note once again that I had to upload the file with a “.doc” extension to make wordpress happy. I don’t think ChucK cares very much what the file is named that you launch, but for consistency I always name executable ChucK programs with a .ck


The THX™ sound from Csound

I don’t have very much time to do this, but I’ve been wanting to get this post out there.

Over the past year or two, I’ll been listening to and studying the thousands of Csound instruments and examples that are out there.

In a folder of examples written by Hans Mikelson, I found a little example (with no comments in it, as is usual with most of them) called gran2.orc (and its associated score gran2.sco). On executing it, I was amazed to see that it created a 6 second emulation of the famous THX sound you hear before movies that use that technology. It wasn’t perfect (sort of short and ended abruptly, etc.) so I tinkered with it and wrote a lot of comments for my own benefit.

The original version wouldn’t run in real time. In fact it took like 90 seconds to compute the 6.4 second output. So I converted it from using the “grain” opcode to using “grain3”. When I did that the example would run in real time so I could tweak it.

There are still lots of explorations one could do with the parameters of this, but for the time being I just want to present it to you for your consideration. (I’ve wrapped the original files into a .csd).

(P.S. I’ve uploaded a copy of the file as well in case this text gets garbled due to line wraps, etc. Because of wordpress limitations I had to call it a .doc file, but it’s really just a .csd. You can get it at this URL: 06-gran3-02csd) )

Granular Synthesis using grain3 instead of grain
BASED ON: gran2.orc/.sco ORIGINALLY BY: H. Mikelson
20080723 tps Does a credible job of approximating the THX sound!
This was also originally from the Mikelson collection
Uses the grain3 opcode. This version is stereoized by computing
the left and right audio outputs separately using a different
seed for each side.
v01 20070713 tps
OK, now that we have gran2.csd working, let's try to replace the
grain opcode with grain3. With grain, ksmps = 2 and computing l and
r channels separately, it takes about 170 sec. With grain3 the 
computation can easily run in real time with CPU load less than 50%. 
Obviously this is a fruitful way to experiment...
My first cut at this does not sound quite as good as the gran2
example; will have to tweak some parameters and envelopes. 
v02 20080808 tps
Added parameters so a different fade in and fade out can be used
for the envelope. Lengthened the sound from 6.4 to 8 sec.
sr        =         44100
kr    =   4410
ksmps     =         10
nchnls    =         2
 Try using the grain3 opcode instead of grain...
instr 2  ;  Granular Synthesis using the grain3 opcode
idur       =       p3    ; length in sec (as always)
iamp       =       ampdbfs(p4)  ; amplitude in dB
ifqc       =       cpspch(p5)  ; pitch (in octave.note)
igrtab     =       p6    ; graintable to use (only #7 for now)
iwintab    =       p7    ; window to use (table #4 for now)
ifrngtab   =       p8    ; frequency range table (10,11 or 12)
idens      =       p9    ; grain density
ifadein     =       p10    ; fade in time (sec)
ifadeout =  p11    ; fade out time (sec)
ibndtab    =      p12    ; pitch bend table (20,21 or 22)
igdur     =     0.20   ; grain duration (sec) 
kamp  linseg  0, ifadein, 1, idur-2*(ifadein+ifadeout), 1, \
      ifadeout, 0
kbend      oscil   1, 1/idur, ibndtab ; could a phasor do this?
kfrng      oscil   1, 1/idur, ifrngtab
; grain3 defaults
imode  =  0
iseedl  =  0
iseedr  =  0.17
imaxovr  =  20    ; grain overlap limit
kphs  =  0.5
kfmd  =  0
kpmd  =  0.5
kfrpow  =  0    ; power distribution factor
kprpow  =  0    ; (0=uniform)
;               AMP  FQC         DENSE  AMPOFF PITCHOFF    GRDUR 
aoutl  grain3  ifqc*kbend, kphs, kfmd, kpmd, igdur, idens, imaxovr, \
   igrtab, iwintab, kfrpow, kprpow, iseedl, imode
; stereoize it by computing another grain with all the same
;  parameters but a slightly different seed
aoutr  grain3  ifqc*kbend, kphs, kfmd, kpmd, igdur, idens, imaxovr, \
   igrtab, iwintab, kfrpow, kprpow, iseedr, imode
; Note:
; I'm not sure if there's a simpler way to do this. In any case
;  grain3 is faster enough than grain that you can hear the output
;  of this in real time. Using grain takes about 90 sec to computer
;  just 8 seconds of sound
kscale  = kamp*iamp ; save a few multiplies
  outs    aoutl*kscale, aoutr*kscale
 Could get fancy and add a reverb/chorus/etc here... but not for
 now perhaps
endin ;  instr 2
; SCORE is similar to that used in the other granular synth examples...
f2 0 1024  7 0 224 1 800 0
f3 0 8192  7 1 8192 -1
f4 0 1024  7 0 512 1 512 0
f5 0 1024 10 1 .3 .1 0 .2 .02 0 .1 .04
f6 0 1024 10 1 0 .5 0 .33 0 .25 0 .2 0 .167
 The table used as the basic for granulating was a GEN10 table
 consisting of the sum of n harmonics where n=[1..12] where the
 level of harmonic n is 1/n (approximately).
 For some reason, n=8 is omitted. A typo or intentional?
; f7 0 1024 10 1 .5 .333 .24 .2 .1667 .14286 .1111 .1 .09091 .08333
f7 0 1024 10 1 .5 .333 .24 .2 .1667 .14286 .125 .1111 .1 .09091 .08333
f10 0 1024  -7 .21  512 .01 512 .001
f11 0 1024  -7 .31  512 .01 512 .001
f12 0 1024  -7 .21  512 .01 512 .001
f20 0 1024  -7 8     512 .99  512 1.00
f21 0 1024  -7 .125  512 1.01 512 1.00
f22 0 1024  -7 .5    512 1.02 512 1.00
;  Start  Dur  Amp  Freq  GrTab  WinTab  FqcRng  Dens  Fade-In -Out PBend
i2   0.0  8   -25   6.00  7      4       10      100   .01   .3  20
i2   0.0  8   -25   8.00  7      4       11      100   .01   .3  21
i2   0.0  8   -25  10.00  7      4       12      100   .01   .3  22
i2   0.0  8   -25   6.07  7      4       10      100   .01   .3  20
i2   0.0  8   -25   8.07  7      4       11      100   .01   .3  21
i2   0.0  10   -25  10.07 7      4       12      100   .01   .3  22