Cthugha-L An Oscilloscope on Acid


Node: Top, Next: , Previous: (dir), Up: (dir)


Node: Introduction, Next: , Previous: Top, Up: Top

Introduction


Node: What?, Next: , Up: Introduction

What does this software do then ?

Audio input seeded image processing. Hook up your CD player to the input of your sound card, or use your CD-ROM player (if you've got one). Run cthugha-L -- then play your coolest music. -- and wow, does your screen look like a 90's lava lamp or what?

Cthugha 'listens' to your music, and changes the display dynamically to the sound.

Ever looked at an oscilloscope of your voice or of music? -- Think of this as an oscilloscope on acid.


Node: Flavors, Next: , Previous: What?, Up: Introduction

Flavors of Cthugha-L


cthugha
displays directly on the Linux console. To do that it uses svgalib. Because svgalib does not support new graphics chipsets this version will slowly die.
xcthugha
This program displays the graphics using X11.
glcthugha
is the newest part. Using OpenGL/MesaGL you get the display in 3D. Of course without hardware support this is quite slow.
cthugha-server
This program is used to access a remove sound card. Using cthugha-server you can use one sound card for a lot of other machines to run Cthugha.

Simply start cthugha-server on a machine with soundcard. Then run Cthugha on any machine, but use the additional parameter -N hostname 1.


Node: Fast Start, Next: , Previous: Flavors, Up: Introduction

Fast Start

To use Cthugha for the first time you will need just one parameter, describing what sound source it should use.

Here are some examples.


xcthugha -L 100
to start with sound coming from Line in.
xcthugha -C 100 -c 1
to start with sound coming from CD and to start playing track 1 of the CD. It is a good idea to put an audio CD in the drive before you do that.
xcthugha -x
to just use some random noise

This should be already quite nice, but the display is very small. To get a bigger window you need two more options described in the next section.


Node: Buffer and Display, Previous: Fast Start, Up: Introduction

Buffer and Display

Cthugha uses two options to control the size of the screen.

-S
to specify the size of the buffer. You can use a small integer value for a predefined size or use whatever size you like. For example -S 2 or -S 374x234.

Bigger buffers usually look better, but take more time to compute. I suggest -S 1 or -S 2, depending on what computer you have.

-D
is used to define how big the window for drawing should be. Again you use a predefined value or some special value. Predefined Buffer and Display sizes match, so -S 2 -D 2 makes sense.

But maybe you would like to have a big window, but your computer has not enough power to update the buffer fast enough. Then you can specify a bigger display. For example -S 2 -D 3 2.


Node: Mixed, Next: , Previous: Introduction, Up: Top

Mixed


Node: Hotkeys, Next: , Previous: Mixed, Up: Mixed

Hotkeys

You can store up to 10 settings of the CoreOption (flame, display, palette, ...) to hotkeys.

To save the current setting press h (a message will appear on the bottom of the screen) and then a number key. When using xcthugha you can also use Shift + Number instead.

To restore the settings from the hotkeys, just press 0, 1, ... 9.

The values for the hotkeys are saved in ~/.cthugha.auto when you press a.


Node: Screen Saver, Next: , Previous: Hotkeys, Up: Mixed

Screen Saver

I have removed the "native" screen saver support of xcthugha. So you must use a program like xscreensaver 3.

You should specify the options --root and --verbose=-1. The first will force xcthugha to draw onto the root window, the second will suppress most text displayed. So an entry for the resource database for xcthugha will look like

        xscreensaver.programs: xcthugha --root --verbose=-1
     

Of course you can also add extra arguments to xcthugha as you need them. For example --zoom 1 to prevent xcthugha from filling the whole screen.


Node: Sound Server, Next: , Previous: Screen Saver, Up: Mixed

Sound Server

cthugha and xcthugha now always work as sound servers. Because of that if you want to use cthugha-server and xcthugha on one machine you must use the --srv-port option with one of the two.


Node: Pathes, Next: , Previous: Sound Server, Up: Mixed

Pathes

Cthugha will search in the following directories for translation tables, palette files and pcx images:

  1. Current directory for all 3 kinds of files
  2. ./tab, ./map and ./pcx
  3. In /usr/local/lib/cthugha-L/tab/BUFF_WIDTHxBUFF_HEIGHT for translation tables
  4. /usr/local/lib/cthugha-L/tab,
    /usr/local/lib/cthugha-L/map and
    /usr/local/lib/cthugha-L/pcx
  5. LIB_DIR/tab, LIB_DIR/map and LIB_DIR/pcx. Where LIB_DIR is specified by the parameter --path and BUFF_WIDTHxBUFF_HEIGHT is the size of the buffer in dezimal (e.g. 320x200).


Node: Other OS, Next: , Previous: Pathes, Up: Mixed

Other Operating Systems

You can find the other versions at the official Cthugha home page http://www.afn.org/cthugha.


Node: Rules, Next: , Previous: Other OS, Up: Mixed

Rules

So you want to add/modify the source code, just follow this simple rules.

Rule #1:
Go for it!!! This is a free project - make it big!
Rule #2:
Send me some Email telling me which bits you are playing with, and I will keep you up to date if I (or anyone else) make any major changes to the code.
Rule #3:
Put your name/email address in the code/credits, that way you get to share the fame :-)
Rule #4:
There is no Rule #4
Rule #5:
Please keep me up to date, with any little functions or ideas you have... The program is evolving quickly, and I'd love to incorporate your ideas!
Rule #6:
Translation tables: If you design a weird and wonderful translation table, send me either the table or (even better) the code used to generate it!
Rule #7:
Don't Panic


Node: Press, Next: , Previous: Rules, Up: Mixed

What the press says

The following short quotes are about the original DOS Version of Cthugha. Cthugha-L can do everything the original can, and a lot of things more.

It gives credence to the phrase 'I can see music'...There is no real way to describe the patterns except as weird.
Australian PC Review Oct '94
Wavy Data
Upon first observation, oscilloscopes seems a bit ho-hum. After all, devices that graphically represent electrical waveforms on a display screen tend to fall a bit short on the sex appeal scale. But if you spend some time exploring the ways high-end oscilloscopes can visualize data, you may start to think the machines are on drugs . . . Cthugha 5.1, an oscilloscope program for PC sound cards, has tuned in, turned on, and decidedly dropped out from the humdrum world of scientific analog signal processing. The product of Australian code jock Kevin "Zaph" Burfitt, Cthugha takes your sound card's CD, line, or microphone input and displays it as a swirling, hypnotic, 256-color confection for your eyes. Although Cthugha currently requires MS-DOS, a VGA monitor, and a Sound Blaster or Gravis UltraSound sound card, the complete C source code is part of the package, so you can port it, if you're so inclined.
WIRED 3.03 (p. 156: Music to Your Eyes)


Node: Who?, Next: , Previous: Press, Up: Mixed

Who's this Cthugha dude anyway ?

Cthugha is hard to pronounce (Kuth-ooo-Ga), and spell. The name is an ancient name from the occults. The following is an extract from the texts that describe him (it) the best.

Cthugha resembles an enormous burning mass continually varying in shape. It dwells at or near the star Fomalhaut, from whence it may be called. It is one of the most obscure and remote of all the Great Old Ones.
Call of Cthulhu - Chaosium

When Cthugha is summoned he is always accompanied by Fire Vampires.

There appeared thousands of tiny points of light. ... The myriad points of light were living entities of flame! For wherever they touched, fire sprang up.
The dweller in Darkness, by August Derleth


Node: Tips, Next: , Previous: Who?, Up: Mixed

Tips

Some notes from the Debian maintainer (README.Debian).

How comes ...?

At the time when the basic code for Cthugha-L was written, Linux

Read on for more info and potential windows, sound and OpenGL problems.

Various Issues

When cthugha seems to hang before it displays a window (eg. KDE 2.1), use the --no-decorate option.
You may also try --root (nice!) with --text-on-term or --panel.
KDE 2.2s window manager is fine, but now kdesktop overlays --root (you could simply kill it, loosing icons and the desktop menu).

Similarly, KDEs soundserver and others' might interfere with cthughas sound device handling, some soundcard drivers give problems too.

If you experience hangs when switching the sound read method from within cthugha, use the command line / config file way to change settings. The config file comes with dsp method set to 2, which seems appropriate for most cards.

Sound

Basically, cthugha records from the soundcard. The soundcard therefore has to be able to record from the sound source that you want to use!

With most soundcards this is no problem for CD, Mic and Line inputs. Using the cthugha mixer page to adjust volumes for any of these sources, switches recording to that source respectively, given that

With KDE for instance you can use the Mixer program directly. You can see which inputs are available for recording and the one actually used.

Today you may want to play eg. mp3's and have cthugha listen to them. The soundcard must be able to record its own output (or the wave channel) to support this (emu10k1 driven cards work fine, most ess have problems).

Cthugha provides the --play option itself to play wavesamples, mp3s and some tracker formats.
Plain samples (.wav files) should work just fine, depending only on the cthugha sound format options (and correct soundcard driver installation).
For mp3 and other formats, cthugha calls external programs to convert them to samples first. This once worked fine, when the number of those programs was small. The current Debian package does not even care which of these programs are available at compile time and so the program may be compiled with no known player at all. This is because some free replacements for eg. mpg123 pretend to replace them but don't actually provide the same functionality.
I'm working on this issue and any input of yours (preferred formats, programs etc.) is appreciated.

Short: if your card is full-duplex and able to record the wave channel, use your favorite external player program and let cthugha listen.

When you find that after cthugha starts you here only one channel, any change to the input (recording) device volume on the Mixer page will reinitialize both channels.

glcthugha

The 3D version glcthugha works best with MESA. You should really have hardware support or at least a 17GHz cpu and agp 23x available ;).

To try without 3D hardware, use the commandline:

     glcthugha -D 0 -X --texture-quality low --mesh-size 16 --max-fps 11
     
and use an external mixer program to set the recording device as you won't be able to read on screen. Also expect your system to be loaded.

XFree86-4 comes with xlibmesa. This is work in progress and changes constantly. Different releases behave differently and, worse, provide different extensions (more in TODO). Expect glcthugha to not be able to set palettes on some releases, which lets it look quite boring. Being a well behaved GL program, glcthugha quieries for the availability of required extensions (EXT_paletted_texture) on startup and exits when they are not available. I disabled(!) the test for this(!) release, so that it may work when run on a local X server. It may also crash.

A nice gfx chip to have would be NVidias TNT or later, if their GLX drivers were FREE! or at least providing the necessary extension (what, i believe, they must do on that too well known os hack anyway). The current situation on Linux is 'sorry, no luck'. glcthugha crashes. Bug them! NVidia-GLX ought to be FREE! and provide EXT_paletted_texture.

UPDATE: Nvidia drivers still ought to be FREE! but current (4496) version provides necessary GL_EXTensions and plays nicely with glcthugha. Mesa and Mesa+ggi do up to 10 fps on an AMD 2400+. Xlibmesa still does not provide the necessary extensions ... I decided to stick with the 'disable test' hack, to avoid splitting the package and conflict with xlibmesa. For proper OpenGL use Mesa or vendor drivers!

Getting into it

cthugha.ini comes with load-on-demand and load-late set to off. This avoids some empty process table entries to hang around until cthugha exits. If you don't mind these, set both to on or simply delete the lines from the ini-file. This gives a faster startup.

Since cthugha already plays a little with itself even without music, it's sometimes hard to say if it get's input at all. You can be sure it doesn't when messages appear on the screen. When messages appear can be set with the Time before silence msg and MinimalNoise options.

Take some time to play with cthugha until it does to your liking. You can stop automatic changing with <L> when the cursor is not on any option. When it is, you lock only that setting. Hitting <Enter> changes a randomly chosen setting, <SPACE> changes all settings.

Some of my own personal preferences (run from xterm):

    nice -20 glcthugha \
    -D 0 -X --max-fps 11 --texture-quality low --mesh-size 16 \
    --min-time 400 --random-time 800 --quiet-time 50 --min-noise 5 \
    --mixer rec:77 --mixer vol:89 --rate 22050 "$@"
    ps x | grep '[k]deinit: kdesktop' | cut -d \  -f -1 | xargs -r kill
    nice -20 xcthugha \
    -D 3 --max-fps 11 --little \
    --mit-shm --root --text-on-term \
    --min-time 400 --random-time 800 --quiet-time 50 --min-noise 5 \
    --mixer rec:77 --mixer vol:89 --rate 22050 "$@"
The status line (press <.>) helps in finding part of the numbers. T: shows time til change and S: time since silence. Adjust the options (<F3>) Minimal time, Extra random, Quiet change and Minimal Noise. I prefer little changes only together with my other numbers for subtle changes and no messages in short pauses.

Setting the max frames per second helps to control cpu usage, watch out for useless extensive buffer sizes. Reduce until it gets to coarse. Pages and status line cost some extra cpu, switch them off when unused.

If you want to exclude certain displays or other settings, explore the possibilities to control them. <F8> gives control over displays to use, use the cursor keys to reach every other page.

To adjust the input level or similar: Lock the auto-changer. Go to the core options page (<F2>), from top down press <0> (Zero) on every option up to palette (you may find other tables and palettes better). This gives you an oscilloscope-like display. Adjust for no clipping.

Additional Notes


Node: Future, Previous: Tips, Up: Mixed

The Future of Cthugha for Linux

Some plans I have with Cthugha for Linux:


Node: CoreOptions, Next: , Previous: Mixed, Up: Top

CoreOptions

Several options control the way Cthugha displays the sound. In lack of a better name I use CoreOption for those (I you know a better name, please tell me about it).

As you already know Cthugha uses (multiple) buffers that are mapped to the screen. So all the CoreOptions (except the one controlling how the buffers are mapped to the screen) are defined for each buffer.

The CoreOptions are

Display
How the buffers are mapped to the screen
Flame
How the buffers change from one time step to the next.
General Flame
A Parameter used by some flame.
Border
What values to use for the upper and lower border of the buffer.
Translate
Defines a global movement on the buffers
Wave
How the sound data is drawn into the buffer
Sound Processing
Some filters for the sound.
Table
How the palette is used by some of the waves.
WaveScale
A parameter controlling the size of some the waves.
Palette
What colors to use for this buffer.
PCX
The next image that will be used (displayed sometimes). This feature is not working very well.
Flashlight
Change the palette based on beats.

You can lock each of these CoreOptions individually. You can do this either when starting Cthugha for example with --display lock:up or when Cthugha is running: Press o to the a list of the current CoreOptions, select the one you would like to lock and press l.

You can use the function keys (starting from F5) to get lists of the possible values of all the CoreOptions.


Node: Configuration, Next: , Previous: CoreOptions, Up: Top

Configuration

You can set a lot of options for Cthugha. When starting Cthugha searches a lot of places for options (in the given order):

  1. /usr/local/lib/cthugha-L/cthugha.ini
  2. ~/.cthugha.auto This is the file created when you press the a key or if you specify the --save option.
  3. ~/.cthugha.ini
  4. ./cthugha.ini
  5. LIB_DIR/cthugha.ini LIB_DIR is specified by the parameter --path
  6. X11 resource database
  7. Command line options

Format of the entries

Cthugha reads all the ini files, but options in later files override option in more general files. The format of the entries is very much the same, as in the X11 resource database.

The general form is: cthugha.OPTION: VALUE. Where OPTION is the same as the long option name. For options you can only turn on or off VALUE should be one of on, off, yes, no, 1, 0.

For some examples see cthugha.ini.eg, or ~/.cthugha.auto the file generated automatically if you press 'a' when Cthugha is running.


Node: Parameters, Next: , Previous: Configuration, Up: Top

Parameters

For a (short) list use cthugha --help.

Mose of the options can also be used in a negative form to disable the feature. This is simply done by including a no- in front of the options.

When giving the options at the command line, you can use abbreviations (like --no-ins as short for --no-install).


Node: Sound and CD, Next: , Previous: Parameters, Up: Parameters

Sound, CD and MixerOptions

If you don't specify a special input source, Cthugha uses the DSP device with the the current mixer settings. Cthugha does not change the settings back after exit. You have to do that manually if you want.

You should specify at least one source of input. Where you do that (ini-file or command line) does not matter. But if no sound source is given, it might happen that Cthugha does not get the sound even if you specified a volume with programs like mixer.

Selecting the Sound Device

-x, --no-sound
Debug mode (no sound-source). Cthugha uses some random noise.
-N, --network HOST[:PORT]
Use cthugha-server running at HOST. If the connection should get lost you can reconnect by pressing n.

You can specify the port number used by the server. You should not need to specify that (only if you changed it with --srv-port).

--play NAME
Use a file as source for the sound. Cthugha plays the file over and over again. In future versions playing multiple files will be possible.

Cthugha can play .wav files directly and by using external programs also MOD files and MPEG Layer 3 files. To play .mod and .mp3 files xmp, mpg123 and l3dec are currently supported. The type of the file is identified by the extension only.

If you don't want to use the programs supported the following is possible: NAME might be a fifo file, so you can so things like

          mkfifo fifo.wav
          cat something.wav > fifo.wav &
          xcthugha --play fifo.wav
          

The old options --exec, --mod, ... are no longer needed.

--silent
This causes Cthugha to only read the sound data when using --play, but not to play it.
--once, --loop
Play the sound file only once and exit afterwards, or start playing the file over and over again.

General Sound Device Options

-v, --rate N
Set sample rate to N. The default rate is set to 44000Hz.
-2, --stereo, -1, --mono
Set the number of sound channels to use. (stereo by default).
--snd-format FMT
Set the format of the sound. This can be 8bit signed, 8bit unsigned, 16bit signed le, 16bit signed be, 16bit unsigned le or 16bit unsigned be.

You usually don't need to change this option.

Advanced Dound Device Options

--snd-method M
Sets the sound method used. M is a number from 0 to 3. Lower values correspond to more sophisticated sound reading methods. You can try this method if Cthugha has problems with reading the sound.
--snd-sync
Reset the soundcard after reading the sound. You should not need this switch. You can try it if you have problems, but it will only slow things down, and might produce unwanted clicks.
--snd-fragments N
Sets how many sound fragments should be used. You might try to use a small value, like 2 or 4. (You will then get recording overruns, but that is normal). Simply use the default value (0 = let the system decide).
--dev-dsp DEV
Specify which DSP device to use. This usually /dev/dsp, but on some systems it might be /dev/audio.
--snd-buffer B
Set the size of the sound buffer size to B kB, when using -play.

CD Options


--dev-cd DEV
Set the CD device to DEV
--cd-stop
Stops CD on exit (only if CD was selected as input)
--cd-random
Play tracks in random order.
--cd-loop
Start again after all tracks are played.
--cd-eject
Eject CD at end.
-c, --track N
Use CD as input, and start playing track N. This option does not change the volume used for the CD. So you also also have to use the --cd parameter.

Mixer Options


--dev-mixer DEV
Set the mixer device to DEV
--mixer DEV:VOL
Set the mixer "device" DEV to volume VOL. Note that things like "bass" or "treble" are also mixer "devices".
-L, --line VOL
Use Line In as input with volume VOL. This is a shortcut for --mixer line:VOL.
-M, --mic VOL
Use Mic (microphone) as input with volume VOL. This is a shortcut for --mixer mic:VOL.
-C, --cd VOL
Use CD as input with volume VOL. This is a shortcut for --mixer cd:VOL.


Node: Automatic Changer, Next: , Previous: Sound and CD, Up: Parameters

Automatic Changer Options

Cthugha automatically changes the way the data is displayed to the screen after some time, and after special events. All of this features work independently from another.

Setting a timevalue to 0 disables the corresponding feature. You can specify all the times in 1/100th of a second or in seconds. To specify a time in seconds you have to appends sec after the number. So the following two are equivalent: --time 4.2sec and --time 420.


-l, --lock
Start in locked mode. That means that the display is not changed automatically.
--little
Only change one option at a time. You can get nice results if you set low values for --time and --random and enable this option. This way you get a constant change, but no chaos.
-T, --min-time N
Minimum time before changing.

Cthugha will change the display after: time + rand() % random. Where time and random are given by this and the next option.

-R, --random-time N
Extra random time before changing.
--quite-time N
Change display after an "interrupted silence". That means that Cthugha changes the display automatically, when for some time no sound comes in and after that there is again sound (like the pause between two tracks on a CD).
--msg-time N
How long to wait in silence until messages are displayed.
-q, --quiet-file FILE
Load alternate quiet messages from FILE. These are messages are display if for a long time no sound comes in.

If a line in FILE starts with a @ then Cthugha runs fortune to get a message.

--min-noise N
Set the level under which a sound is consider to be silent.
--fire-level N
This controls how often the display is changed on beats. Lower values let the screen change more often.


Node: General CoreOptions, Next: , Previous: Automatic Changer, Up: Parameters

Change options


-S, --buff-size SIZE
Set the buffer size. You can use predefined sizes of specify a value of the form WIDTHxHEIGHT.
--no-trans
Disable translation tables. Translation tables are used to define almost any affect you can think of. Use this option if Cthugha is not running fast enough.
--stretch
Allow stretching of translation tables to fit buffer size.
--load-on-demand
Create and load translation tables only when they are needed. Only one translation table is kept in memory.
--load-late
Load the translation tables only when they are needed. Once a translation table is loaded, it is kept in memory, so each translation table is loaded only once. This can save a lot of time when starting Cthugha.
-X, --no-use-pcx
Disable usage of PCX image files.
-i, --no-ipal
Disable the inbuilt palettes - there is no reason to do this.
-e, --no-epal
Do not load external palettes.
--no-object
Do not load 3D objects (wire frames) used by some wave functions. There are no such files included with Cthugha.
-s, --no-flashlight
Disable usage of Flashlights. Flashes (changes of the palette values with low index) will come up on loud beats.

This feature was called FFT in version 0.8 of Cthugha-L.


Node: Initial Values, Next: , Previous: General CoreOptions, Up: Parameters

Disable options

Please use xcthugha --help for a list of these options.


Node: Display, Next: , Previous: Initial Values, Up: Parameters

Display Options


-D, --disp-mode MODE
Set graphics mode or window size.
--zoom N
Set the zoom factor to N. A value of 0 will cause Cthugha to fill the whole window.
--max-fps N
Set the maximal number of frames per second to N (0 for no limit). You can limit the speed at which Cthugha is running with this option. This might be usefull if you would like to use xcthugha as a desktop decoration.

SVGA Options

-r, --sync
This option causes cthugha to wait for a resync before the buffer is displayed on the screen. So screen update and video refresh are synchronized. --sync causes a slight decrease in speed.
--disp-direct
Display directly to screen when using running in 320x200 mode. When runing on this option some flicker occurs when text is displayed.

X11 Options

--root
Draw onto the root window (the background of your desktop).
--install
Install a private colormap when running in a PseudoColor visual (8bit). This increases performance, but the windows of all the other windows will be displayed wrong then.
--mit-shm
Use the MIT Shared Memory Extensions when displaying with X11. This option brings an significant increase in speed.

You should only deactivate it if you have problems.

--full-screen
Let xcthugha fill the whole screen. To do that xcthugha fights with the window manager so I am not sure how reliable this really is.
--panel
Show a control panel with some buttons for common operations.
--position NN
Set the position of the Cthugha window. Use for example as --position +10+20. The normal -geometry option is not working (it sets the position of the control panel).
--text-on-term
Display all text messages in the calling xterm or print all text messages over the buffer or into the control panel.
--no-decorate
Do not decoreate the window (set is Cthugha sets the override_redirect flag).
--font F
Set the font to use when displaying text messages.

GL Options


--mesh-size S
Set how fine to make the mesh for 3D displays. Bigger values will make a finer mesh and will take longer to display.
--texture-quality Q
Set the quality of the texture (low, medium, high) to use.
--hints H
Set the glHints for perspective correction and fog to fast (better quality) or nice (faster).
--dither
Turn on or off dithering. This influences the speed of glcthugha.
-window, --full-screen
Run glcthugha in a window or full screen. This only has an effect when using Mesa and a 3Dfx card. Running full screen is usually much faster, while for debugging a window is very usefull.


Node: General, Next: , Previous: Display, Up: Parameters

General Options

-E, --path LIB_DIR
Specifies an additional directory where to search for tab, map and pcx-files. Cthugha also searches for an ini file LIB_DIR/cthugha.ini.
--keymap KEYMAP
Load extra keyboard bindings from KEYMAP.
--dbl-load
Allow loading of 2 or more palettes, translation tables or PCX images with the same name.
--prt-file FILE
File used to save screen at PrintScreen. The extensions and a number are appended automatically. So the first saved file is FILE.pcx, the second is FILE.1.pcx, the third is FILE.2.pcx and so on. When saving under xcthugha the images are in Xpm format.
--no-esc
If this option is given then the esc-key is ignored. You should no longer need this switch, I still keep it just in case.
--save
Save current wave, flame, display and some more things at end. The settings are saved in the file ${HOME}/.cthugha.auto.
--verbose=LVL
Set the amount of extra information to print. The higher LVL, the more information. The parameter is optional. Using only --verbose sets a level of 3.
-?, --help
Print help information.


Node: Server, Previous: General, Up: Parameters

Server options

-W, --srv-wait
Time to wait after the saver sent the sound to its clients. The default value is 0, that is not to wait.

If you set a high value here cthugha-server sends not so much data of the network. But if the value is too high, not enough data is sent (the clients have to wait - delays in the display). On the other hand if you set a very low value very much data is sent - waste of resources.

--srv-port
The port used by the server (cthugha-server or cthugha/xcthugha in server mode).

Default value is 5555. You should change this only if you have problems. Don't forget to specify this port also for the clients accessing the server (with --network).

--clt-port
The port used by the clients to receive sounds from the server. The default value is 5556. The clients use the port specified and the next one.

You can use this option to use more than one client on one machine (e.g. xcthugha-saver and xcthugha at the same time).


Node: Keymaps, Next: , Previous: Parameters, Up: Top

Keymaps

Since version 1.4 of Cthugha-L you can define your own keyboard bindings.

#keymap name marks the beginning of a new keymap. There must be no white spaces after name. Then the keybindings are of the form key action1(param1) action2(param2) .... Commenets start with an # at the beginning of the line. For an example of a keymap file see src/default.keymap.

Key presses in Cthugha are handled by a series of keymaps. When one keymap can not handle the key, it is passed on to the next general one. The sequence of keymaps is depending on the current interface mode

main interface
extraKeymap (as defined by the setExtraKeymap action)
main
default
Options, CoreOptions, Sound, ...
CoreOptionElement (only for CoreOptions), OptionElement
CoreOption for CoreOptions Option or Sound, ...
default
Screen, Flame, ... Lists
Option for the yes/no value in each line, and to move the selection
Screen or Flame, ...
List
default

An example keymap, that lets you select the flames by just one keypress.

     #keymap main
     # turn on new flame keys
     f   setExtraKeymap(flame)
     
     
     #keymap flame
     
     # go back to normal mode
     q   setExtraKeymap()
     
     a   flame(0)
     # or use the flame name:  flame(clear)
     s   flame(1)
     d   flame(2)
     ...
     


Node: Technical Stuff, Next: , Previous: Keymaps, Up: Top

Technical Stuff


Node: General Stuff, Next: , Up: Technical Stuff

General Stuff


Node: Palette Files, Next: , Previous: General Stuff, Up: Technical Stuff

Palette Files

The format is the same that fractint uses. If not all color indexes are specified then they default to black. The color values are specified in RGB tuples (0-255), where 0 is black -- one line per color index. Easy !

     255 255 255 comments index 0
     ... ... ...
     255 255 255 comments color index 255
     


Node: Translation Tables, Next: , Previous: Palette Files, Up: Technical Stuff

Translation Tables

These tables (TAB files) are used to design just about any effect, without recompiling the source to Cthugha!!!

Since version 1.0 you can use the translation table in 2 different ways. Cthugha can generate the table when it is starting, or you can generate the tables in advance. The later is used for for which you don't have the source.

Some of the program to create the translation tables have quite a lot of options, experiment with them - if you create a new nice translation table send me the options you used (or the modifications to the code you made).

Here's how they work

This is a bit technical. You need this part only if you want to write new translation-table-generation-programs (nice word, isn't it).

You generate a table, BUFF_WIDTHxBUFF_HEIGHT, of integers. The integer represents the source pixel for this destination pixel. In other words: The numbers specify where each pixel comes from.

     e.g  in a small 3x3 world, to rotate to the left.. 
     
     1, 2, 0,   so pixel 1 is moved to position 0, and so on
     4, 5, 3,
     7, 8, 6
     

What kind of integers are used (short or long) depends on the size of the buffer (If > 64k longs are used). tint and utint are defined in cth_buffer.h to give you the right kind of integer to use.

Read the source of some mk*.c files to try to work out how it works, or send me some email!

Translation tables on demand

Since translation tables need quite a lot of disk space, take lots of time to load and need stretching to fit different buffer sizes, I included a new method to generate translation tables.

The generation program is activated when the translation table is needed. It gets the desired size for the table as parameters and should write the table to stdout. The output is just the table (always as longs without any header).

An additional file (.cmd) defines the description and what arguments are passed to the generation program. So one program can be used to generate lots of different translation tables.

tabheader, tabinfo

Since version 0.3 Cthugha uses an improved format for tab-files. The new format starts with a header (tab_header defined in translate.h).

You can convert (add the header) old tab-files to new ones by using tabheader. To display the header use tabinfo.

Usage of tabheader and tabinfo:

     tabheader [in-tab-file] [size-x  size-y] [description] > [out-tab-file]
     tabinfo [tab-file]
     


Node: PCX Files, Previous: Translation Tables, Up: Technical Stuff

PCX Files

PCX files are pictures uses by Cthugha. They are display from time to time when the display is changed. You can also force the next PCX to the screen by pressing <X>. Cthugha also uses the palette stored in a PCX file.

For information about the format of such an image, read a book about file formats. PCX is a very simple form of saving pictures, it is used mainly for historic reasons (the DOS version used it). Maybe in future versions also other file formats will be supported.


Node: Contact, Previous: Technical Stuff, Up: Top

Contact

If you write your postcard or mail in German, please use Du (and not Sie).

Table of Contents


Footnotes

  1. hostname is the name of the machine running cthugha-server

  2. Use --full-screen to make the display as big as possible

  3. see http://people.netscape.com/jwz/xscreensaver