Csound Vs. Music V — FIGHT! Pt. 3

Thanks to Dr. Victor Lazzarini, I now have a working copy of Music V in my possession. I’ve been tinkering with it all weekend to try and get a better understanding of the system, temporarily frying my brain in the process. All in all, it’s been great experience so far.
Sampling Rate. Just as I had mentioned in part 2 that the bit depth of the dynamic range was installation specific, the sampling rate of Music V also depended greatly on the hardware on hand.
In Csound, the sampling rate is determined in the header of the orchestra, and can be overridden with a command-line flag. In Music V, the sampling rate is hard-wired into the Fortran code.
The version of Music V that was sent to me uses 44.1kHz. I created a modified version to run at 20kHz to coincide with sampling rate specified in The Technology of Computer Music. (Mathews, pg. 43) Had to get my hands a little dirty with the Fortran code, though the procedure turned out to be easier than expected — just replaced all instances of 44100 with 20000.
Sampling rate alone doesn’t paint the full picture, as there is also the control rate to consider. Csound fully supports control rates, signals of a usually lower sampling rate used to control / modulate other unit-generators.
Back in the day when computers were *really* slow, and real-time performable digital synths were more fantasy than reality, rendering a short piece of music could take hours. To help reduce this time, control signals were introduced to greatly reduce the number of required computations.
Even today, using a secondary lower sampling rate to control aspects of a digital synth engine or DSP is standard practice. In live situations, a control rate allows musicians to run more effects and instruments than would be possible if everything was computed at the audio rate.  So there is great reason why software like Reaktor fully embraces this older, yet highly effective concept.
In the Csound manual, Berry Vercoe describes how control rates came to be in Csound: “With Music 11 (1973) I took a different tack: the two distinct networks of control and audio signal processing stemmed from my intensive involvement in the preceding years in hardware synthesizer concepts and design. This division has been retained in Csound.”
Unfortunately for Music V, there is no such thing as a control Thanks to Dr. Victor Lazzarini, I now have a working copy of Music V in my possession. I’ve been tinkering with it all weekend to try and get a better understanding of the system, temporarily frying my brain in the process. All in all, it’s been great experience so far.

The Technology of Computer Music MathewsThanks to Dr. Victor Lazzarini, I now have a working copy of Music V in my possession. I tinkered with it all weekend to get a better understanding of the system, temporarily frying my brain in the process.

Sampling Rate. Just as I had mentioned in part 2 that the bit depth of the dynamic range was installation specific, the sampling rate of Music V also depended greatly on the hardware on hand.

In Csound, the sampling rate is determined in the header of the orchestra, and can be overridden with a command-line flag. In Music V, the sampling rate is hard-wired into the Fortran code.

The version of Music V provided to me uses a rate of 44.1kHz. I created a modified version to run at 20kHz to coincide with sampling rate specified in The Technology of Computer Music. (Mathews, pg. 43) Had to get my hands a little dirty with the Fortran code, though the procedure turned out to be easier than expected — just replaced all instances of 44100 with 20000.

Sampling rate alone doesn’t paint the full picture, as there is also the control rate to consider. Csound fully supports control rates, signals of a usually lower sampling rate used to control / modulate other unit-generators.

Back in the day when computers were *really* slow, and real-time performable digital synths were more fantasy than reality, rendering a short piece of music could take hours. To help reduce this time, control signals were introduced to greatly reduce the number of required computations.

Today, using a secondary lower sampling rate to control aspects of a digital synth engine or DSP is standard practice. In live situations, control rates allow musicians to run more effects and instruments at any given time than would be possible if everything was computed at the audio rate.  So there is great reason why software like Reaktor fully embraces this older, yet highly effective concept.

Unfortunately for Music V, there is no such thing as a control rate.

In the preface of Csound manual, Barry Vercoe briefly describes how control rates came to be in Csound:

With Music 11 (1973) I took a different tack: the two distinct networks of control and audio signal processing stemmed from my intensive involvement in the preceding years in hardware synthesizer concepts and design. This division has been retained in Csound.

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