1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Visual Music From Your Linux Box Issue 17</title>
</HEAD>
<BODY BGCOLOR="#ffebcf" TEXT="#8e4510" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H1>Visual Music: The Linux Port of Cthugha</h1>
<H4>By Larry Ayers,
<a href="mailto:layers@vax2.rainis.net">layers@vax2.rainis.net</a></H4>
</center>
<P> <hr> <P>
<center><h3>Introduction</h3></center>
<p>Around 1993 Kevin Burfitt, an Australian computer science student, began
developing a computer program which would transform recorded music into moving
colored patterns. Programs such as this had been in use for some time,
typically as an adjunct to a rock concert, i.e. part of the "light show".
This program was originally written for DOS, though before long it began to
acquire a trait common to software in the unix world: a multitude of options
and parameters.
<p>Kevin must be a fan of the early 20th-century horror writer
H.P. Lovecraft. How else to account for the distinctive appellation "Cthugha"
which he gave his program? In the Lovecraft stories Cthugha is the name given
to a horrific "elder god" which manifested itself to humans in the form of
shifting colored lights. (This doesn't sound too horrific, but Lovecraft
could make a loaf of bread seem sinister!)
<p>Cthugha has from the early days been available under the aegis of
the Gnu General Public License, making the source freely available. This
opened the door for many other programmers scattered throughout the world who
became involved with the project. Sound familiar? Ports of the
program are now available for the PowerMac, Win95 (in development), and of
course Linux. <a href="mailto: k3096e5@c210.edvz.uni-linz.ac.at">Harald
Deischinger</a> is responsible for the Linux port. He recently released a new
version (0.9) which is available from the following sites:<br>
<ul>
<li> <a href="ftp://sunsite.unc.edu/pub/Linux/apps/sound">Sunsite (may still
be in /pub/Linux/Incoming)</a>
<li><a href="ftp://ftp.afn.org/cthugha/linux">The main Cthugha site</a>
</ul>
<center><h3>What Cthugha Does</h3></center>
<p>The input to the program can be any audio source, such as a microphone, a
CDROM drive (though you must have the drive connected to your soundcard), or
even a sound file. Cthugha takes the digital audio information and, after
passing the data stream through any combination of filters, displays it to the
screen in real time. The keyboard is used to change the various parameters
either specifically or randomly. The simplest displays resemble the screen of
an oscilloscope being fed audio data (Cthugha has been called "an
oscilloscope on acid") but as more optional filters are added the display
becomes baroquely intricate. If too many filters are active the
resulting images can be chaotic, with little discernible relation to the sound
being processed.
<center><h3>Running Cthugha</h3></center>
<p>The Linux version of Cthugha is compiled into two executables: cthugha,
which is a console application (using Svgalib), and xcthugha, which runs
either in an X-window or as a full-screen X application using the new DGA
extensions. This last requires XFree86 3.2 or later. Xcthugha can also be
run as a screensaver; in former releases this was a separate executable.
<p>In this release the X11 version runs faster and smoother than in earlier
releases, but I still prefer the console version. It's the quickest and most
responsive of the three interfaces and (in my experience) the only usable
version on a machine less powerful than a mid-range Pentium.
<p>Running Cthugha reminds me of playing a musical instrument. The first
attempts aren't consistently pleasant, but with practice a measure of control
is gained. Orchestral or loud rock music can benefit from
low gain settings, which help to produce a non-chaotic display. The good sort of
recording to start with is music with few voices or tracks. A vocalist with
minimal accompaniment or solo instrumental music give good results
while you gain a feel for the program.
<p>Cthugha comes with several "translation tables"; these are
filters which map the display to various moving patterns, such as spirals or
the appearance of traveling through a starfield. I don't use them much, as it
seems to me they obscure the relationship between the music and the display.
The tables also tend to increase CPU usage. Try them and see what you think,
as they seem to be popular with other Cthugha users.
<p>The other filter categories are more useful. The "wave" filters control the
general shape of the sound waves. These run the gamut from basic oscilloscope
sine and square waves to angular lightning-like patterns or floating clusters
of fire-flies. The "flame" filters add to the waves trailing clouds of glory
(I've always wanted to use that phrase in a non-ironic sense!).
<p>Using a microphone as input is fun, especially if there are kids around.
Seeing your voice represented as billowing clouds of iridescent plasma is
novel, to say the least. Various musical instruments are interesting to try
as well; if one person plays the instrument while the other keys in parameters,
a combination which seems to reflect the character of the melody can often
be found. If you should happen upon a combination of settings which results
in a particularly pleasing screen just press the <b>a</b> key and those
settings are entered into your Cthugha initialization file.
<p>Another option is the Fast Fourier Transform, an algorithm which gives an
entirely different look to the sound; it's hard to describe, but FFT seems
more three-dimensional and subtle. The sampling rate should be reduced to
22000 hz. (from the default of 44000 hz.) since FFT adds one more level of
computation to the sound-translation process.
<p>Kevin Burfitt's decision to use the Fractint 256-color palette file as the
Cthugha palette file format was fortuitous. Over the years Fractint users
have come up with a multitude of palette files among which can be found
palettes to please anyone's taste. The Fractint fractal generator includes a
handy palette-file editor which can be used to create or modify palettes for
Cthugha. I'm not sure if the palette editor is included with Xfractint -- I
mostly use the DOS Fractint in a Dosemu console session.
<p>Here are a couple of screen-shots of xcthugha running in a 320x200
window:<br>
<hr>
<img src="./gx/ayers/cthugha3.gif" alt="Cthugha image #1">
<img src="./gx/ayers/cthugha4.gif" alt="Cthugha image #2">
<hr>
<p>These are snapshots, of course, and show little of the dynamic quality of
Cthugha reacting to the music. The above images, by the way,
are of an old recording of Sarah Vaughan singing with piano accompaniment.
<p><hr><p>
<!-- hhmts start -->
Last modified: Sun 27 Apr 1997
<!-- hhmts end -->
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright © 1997, Larry Ayers<BR>
Published in Issue 17 of the Linux Gazette, May 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./lg_toc17.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./enl.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./updates_17.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->
|