Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Andrew Koenig

Dr. Dobb's Bloggers

Music and programming languages -- again

July 23, 2008

I've been learning about synthesizers lately.

One thing I've learned is just how pervasive synthesizers are: It's hard to see a movie or television show, or listen to the radio, without hearing at least some music played on synthesizers.  So how does this phenomenon relate to programming?

A synthesizer is typically designed as a collection of modules, each of which contributes to the sound in some way, and all of which are connected together.  One module generates the sound, another changes its character, another controls its volume, and so on.  Even a simple synthesizer will have dozens of parameters that control its modules.  Each of these parameters affects the sound--sometimes in obvious ways, other times more subtly.

Because there are so many parameters, just about every synthesizer on the market offers a collection of presets.  A preset is a suite of parameter settings that produce a particular sound.  Pick a preset that represents the sound you want, dial it in, and you're ready to go.

Some musicians never go past the presets on their particular synthesizers: They use what the manufacturer has provided, and that's it.  Others go online and find other parameter settings that other musicians have created for their synthesizer.  Still others tweak the parameters themselves, and some of those musicians make their tweaks available to their peers.  Finally, the most adventurous souls use modular synthesizers, which let you not only change the parameters but also to reconfigure the modules--to the extent of changing which modules are present.

It occurs to me that synthesizers are like programs.  A preset is like a library class: Someone else has done the work needed to make the device do what you might want; all  you have to do is use it.  Programmers exchange (and sell) library code in much the same way that musicians exchange presets.  And modular synthesizers are like template libraries: Not only can you write library code, but you can change the nature of the underlying data structures and how they connect to each other.

However, there is one enormous difference between the synthesizer world and the programming world: An awful lot of programmers start out working at the lowest level, and almost all musicians who play synthesizers start out at the highest level.  In other words, a musician who starts using a new synthesizer usually begins by picking an interesting-looking preset and playing music with it.  The next step might be to try to adjust the preset, and only after a lot of experience does a musician design new presets from scratch.

In contrast, if the comments on Usenet and the design of so many popular textbooks are any guide, C++ programmers are often still starting out by learning to use new and delete (or even malloc and free) for variable-length arrays before learning how to use vectors.  In contrast, most musicians who use (and buy) synthesizers seem to care much more about the variety of sounds available from the presets than they do about the internal architecture.

I wonder why there is such a profound difference in philosophy, and invite comments from readers.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.