Csound Vs. Music V — FIGHT! Pt. 2

The Technology of Computer MusicFirst, I want to make it clear that I’m making many assumptions about Music V that are likely wrong. I have a mixed bag of fossilized Music V bones, and I’m doing my best Emily Deschanel impression to reconstruct them. If you are knowledgable of such things and catch an error, or would like to expand, please post a comment. With that said…

I had to read the Music V manual, but I finally found the bit-depth used for the examples in Mathews’ The Technology of Computer.  12-bit, just as I suspected. According the manual, the digital-analog-converters (DAC) at Bell Telephone Laboratories (BTL) operated with 12-bit samples. (pg. 168)

I don’t recall running across a 12-bit audio-file, ever. They just don’t make them like they used.  I don’t even think Csound natively supports outputting a 12-bit file. However, it does allow us to easily simulate it with the 0dbfs opcode.

I rewrote part the CSD file from part 1 to better preserve the the original structure of the Music V example. Instead of rescaling the audio output signal of instr 1 by a factor of 16, I elminated this multiplier, and set the global dynamic range to 12-bit with 0dbfs = 2048. Original Music V amplitudes can now be used without modyifing the values or making unnecessaring changes to instrument translations. Here is the new CSD: Csound_Vs_MusicV_pt2.csd

Csound makes changing the dynamic range easy. In fact, almost all modern software allows users to choose from a list of several bit depths. Music V, not so much. When Music V was installed at a new installation, parts of the program would have to be coded, in assembly and/or Fortran, specifically for that particular system. Including the dynamic range. In theory, other computer facilities might have used a different dynamic range other than 12-bit, based on the hardware they had on site.

One interesting bit of information I discovered is something that could be considered a precursor to the modern audio buffer.

The General Electric GE645 computer at BTL used a 36-bit word length machine. In BTL’s particular setup, Music V would have to create 3 samples and collect them into a single 36-bit word before sending this word to the digital reel-to-reel. This isn’t too unlike the latency buffer found in programs such as Ableton Live, Max, Reaktor, etc., where n amount of samples are collected into a temporary buffer before sending the buffer to the DAC.

Csound Vs. Music V — FIGHT! Pt. 1

The Technology of Computer Music Mathews

Csound is a direct descendant of the Music-N series of computer music languages developed by Max V. Mathews.  One could make the case that all digital synthesizers are descendants, or at least distant cousins, of Music-N.  Comparing and contrasting Csound with Music V, the similarities are glaringly obvious.

I own a copy of the 1981 edition of Max Mathews’ The Technology of Computer Music. The original was released in 1969 — that’s 40 years ago.  I’ve read it cover to cover.  I’ve translated some of the examples to Csound.  Much of the knowledge contained in that little red hardcover book is still relevant today.

I thought it would be fun to compare and contrast the two languages.  Here is The Simplest Orchestra example from pages 44-46:


1	INS 0 1 ;
2	OSC P5 P6 B2 F2 P30 ;
3	OUT B2 B1 ;
4	END ;
5	GEN 0 1 2 0 0 .999 50 .999 205 -.999 306 -.999 461 0 511 ;
6	NOT 0 1 .50 125 8.45 ;
7	NOT .75 1 .17 250 8.45 ;
8	NOT 1.00 1 .50 500 8.45 ;
9	NOT 1.75 1 .17 1000 8.93 ;
10	NOT 2.00 1 .95 2000 10.04 ;
11	NOT 3.00 1 .95 1000 8.45 ;
12	NOT 4.00 1 .50 500 8.93 ;
13	NOT 4.75 1 .17 500 8.93 ;
14	NOT 5.00 1 .50 700 8.93 ;
15	NOT 5.75 1 .17 1000 13.39 ;
16	NOT 6.00 1 1.95 2000 12.65 ;
17	TER 8.00 ;

A loose translation into Csound looks something like this:

<CsoundSynthesizer>
<CsInstruments>
sr     = 44100
kr     = 44100
ksmps  = 1
nchnls = 1

instr 1	
	a2 oscil p4, cpspch(p5), 2
	out a2 * 16
endin
</CsInstruments>
<CsScore>
f2 0 512 -7 0 50 0.999 155 0.999 101 -0.999 155 -0.999 50 0

i 1 0    0.50  125 8.04
i 1 0.75 0.17  250 8.04
i 1 1.00 0.50  500 8.04
i 1 1.75 0.17 1000 8.05
i 1 2.00 0.95 2000 8.07
i 1 3.00 0.95 1000 8.04
i 1 4.00 0.50  500 8.05
i 1 4.75 0.17  500 8.05
i 1 5.00 0.50  700 8.05
i 1 5.75 0.17 1000 9.00
i 1 6.00 1.95 2000 8.11
e 8
</CsScore>
</CsoundSynthesizer>

I’ll spend the next few blogs breaking down these examples, discussing the many differences and similarities, in hopes that we can learn something about our digital synthesis roots.  In the meantime, you can download this Csound file to listen for yourself: Csound_Vs_MusicV_pt1.csd

The Backlog

I’m reposting all the Csound Blog posts from the original site.  The write-ups are stored within the Csound files themselves.  I’m really looking forward to posting new content, and will hopefully have something up by the end of the week.  Without further ado:

On the Up

The Csound community has been making strides to improve the user-experience, and this effort is really beginning to shine through.

Csound now ships with QuteCsound, a new integrated frontend that comes loaded with extras.  The Csound @ Sourceforge page has been given a facelift, in terms of both looks and content.  The developers are taking much greater care to make sure installers work with as few as problems as possible.  This is only the beginning.

If you have tried Csound in the past, but had problems getting up and running, now is a good time to give it another try. If you do run into problems, don’t keep these issues to yourself.  Report them here or the mailing list, and these problems will be taken care of.

Thanks to all the hard work of the developers and others in the community, as it seems that Csound has a promising future.

Csound Music mp3 Pack

Dr. Boulanger has put up a wondeful collection of Csound mp3s at Csounds.com.

Download 4csoundCompositions.zip (99.1 MB)

The pack comes with 20 songs, with everything from ambient to minimal to cheesy techno (that would be my piece) to synth-generated halloween sound fx.  All of the original source code is included in case you are curious to see what these compositions look like in their original state.

The Csound Blog is moving to Noisepages

Csound Dseq Drum Machine

In 2006, I started The Csound Blog, a site dedicated to all the quirky goodness of Csound. I haven’t touched it in years, but have been pondering starting it back up for quite some time.  I’ve decided to move forward with it, and I’m moving it over to Noisepages in the process.

Starting today, I will begin migrating the original posts to its new home here.  Then after that, the real fun begins.