Next: , Previous: , Up: Top  


5 Configuration

5.1 ocp.ini

OCP can be widely configured using the ocp.ini file, which should reside in the home directory of the player itself. This file is processed at every startup and informs the player about various modules / plugins and their respective configuration. For average users the default configuration should be sufficient. However if you want to change certain aspects of the player permanently you have to modify this file. You can use every ascii editor to edit the ini file.

The ocp.ini consists of many sections. Each section starts with a section identifier tag in square brackets [ ]. Examples of sections are [general] or [sound]. The sections id tag should be followed by a newline. After a section has been declared with the id tag the options describing the sections follow. Each options takes a single line and consists of a keyword followed by a “=” and the parameters. Example:

mixrate=44100

All options following a section id are options for that section. If a new section starts with a id tag all forthcoming options are assigned to the new section. All options for a section have to be grouped together. Multiple declarations of sections are not valid.

[general]
  link=dos4gfix
[defaultconfig]
  link=mchasm
[general]
  dos4gfix=off

the above example has to be written as:

[general]
  link=dos4gfix
  dos4gfix=off
[defaultconfig]
  link=mchasm
Note that in the above example the option link has not
been overridden by the defaultconfig section. Both sections now
can access an options named link, but both options are totally
independant of each other.

Comments can be placed anywhere in the configuration file and are marked by a ;. The rest of the line starting from the ; is considered as a comment and not processed.

Normally the definition for an option ends with the end of the line. If many parameters are needed to specify an option they may exceed the default line width of 80 characters. Although this is no problem for OCP it is not nice looking. You can extend a line logically by using the unix like backquote at the end of a line to begin a newline without interupting the current option definition.

[example]
  option1=parameter1 parameter2
  option2=parameter1 \
          parameter2

Both options contain exactly the same parameters.

When modifying the configuration you should always start with the default configuration file and configure it to your needs. Building a bug free config file from scratch is difficult. 25

We will now have a look at the individual sections and their options.

5.2 [general]

The general section describes which internal modules or plugins to load at startup. Most of them are required for normal operation of OCP so you should not remove any of the contents. All options listed in this section are loaded every time OCP starts! The default general section looks like:

[general]
  link=cpiface cphlpif fstypes
  prelink=framelock pfilesel
linkthis options describes the modules to load when starting OCP. There is no need to change this option, unless you have coded a basic internal module.
datapathOCP searches for background pictures and animations in its home directory. If you want to store your artwork at a different place use this option to set the right directory.
tempdirthis directory is used for extracting modules from archives. If you have set a DOS environment variable called either TEMP or TMP these will be used.

5.3 [defaultconfig]

The defaultconfig section is very similar to the general section. But unlike the general section which is always processed the settings in the defaultconfig section can be ommited with an alternative section and the -c flag from the command line. If the -c flag is not present the defaultconfig section will be processed.26

[defaultconfig] ; default configuration
  link=devi plrbase mcpbase smpbase arctar mixclip medialib cdrom
  prelink=poutput hardware cphelper sets mchasm compat
linkjust like in the general section this option defines which modules should be loaded at startup. You can delete some entries if you will not need them – however this is not recommended as they do not use much memory and do not require any processor power.
prelinkthese files will be loaded before starting the main module. If something goes wrong here OCP will continue to work.

5.4 [sound]

This section is the most important one for using OCP. If you want to change the configuration permanently you have to modify the entries of this section.

[sound]
  playerdevices=devpOSS devpNone devpDisk
  samplerdevices=devsOSS devsNone
  wavetabledevices=devwMixF devwmixQ devwMix devwNone
  mixrate=44100
  mixprocrate=4096000
  mix16bit=on
  mixstereo=on
  plrbufsize=200
  mixbufsize=200
  samprate=44100
  samp16bit=on
  sampstereo=on
  smpbufsize=2000
  defplayer=
  defsampler=
  defwavetable=
  midichan=64
  itchan=64
  cdsamplelinein=off
  bigmodules=devwMixF
  wavetostereo=1
  waveratetolerance=50
  amplify=100
  panning=100
  volume=100
  balance=0
  reverb=0
  chorus=0
  surround=off
  filter=2
playerdevicesOCP uses three different devices to communicate with the hardware. The playerdevices are used to play a stream of samples. As all sound cards support this feature you will find playerdevices for every sound card supported by OCP. This device is needed for playing .ogg, .wav and .mp3 files and if you want/have to use the software (quality) mixer. OCP searches for all devices listed in this option at startup and only those found are actually loaded. You can delete all devices you have not installed to speed up to startup procedure. If you have multiple sound cards installed be sure to list all devices if you want to use more than one sound card.27 If more than one device is listed the first in the list will be used as default.
samplerdevicesthese devices are the least important ones. They are only needed if you want to use OCP when playing cd audio tracks or start the player in sample mode. The sample data is not calculated from files, but sampled from either the cd, line or microphone jack of the sound card. You can then use the graphical screens to view the sounds.
wavetabledevicesfor mixing several channels you have to use wavetabledevices. Most sound cards are only able to play to channels simultaneously normally assigned to the left and right channel or your home stereo. The mixer devices are used to mix the sample data of module files to those two channels. However modern sound cards have special hardware to mix channels “onboard”. But all hardware mixers have a maximum amount of channels to mix28. Especially .it files often use more than 32 channels so an errorfree playback can not be guaranteed when using hardware mixing. You should include one of the software mixers for this case.
mixratethe default mixrate. Unless you have a very old sound card29 or a very old processor30 there is no need to change this option.
mixprocrateif you have a slow cpu31 you might not be able to play 32 channels at full mixrate. This value defines the maximum “calculation power” to which OCP tries to use the full mixrate.
mix16bitLeave this option enabled unless you have a 8bit sound card.
mixstereodito for stereo cards
plrbufsizeWhen using a playerdevice to play sample streams a DMA buffer is used to minimize cpu resources for handling the sample stream. This option sets the DMA buffer length in miliseconds.
mixbufsizeWhen running in a multitasking environment there is no guarantee for constant cpu resources. To avoid a break in the sample stream OCP will calculate in advance. This option sets the buffer lenth in miliseconds.
samprateWhen using a samplerdevice this value will be used.
samp16bitdito
sampstereodito
smpbufsizethis options sets the length of the sample DMA buffer in miliseconds.
defplayerwith this option you can override the default playerdevice. Normally you don’t need to set this option, as the default device can also be set by the order in the playerdevice option. This option can also be specified by using the -sp options from command line.
defwavetablethis option sets the default wavetabledevice. Can also be set with -sw command.
defsamplerthe same as the -ss command line option.
midichanunlike the module file types the MIDI file format does not specify the exact amount of channles to use. Complex .mid files can easily try to play several dozens of channels simultaniously. This option sets the maximum amount of channels to mix when playing .mid files. Note that this value has no effect when a hardware mixing device is used, as the maximum number is limited by the hardware.
itchanthe .it format can play more than one sample per channel simultaniously. A maximum number of channels to mix is required for this file type too. When playing .it files using a hardware mixer the maximum number of channels is again limited to the hardware.
cdsamplelineinIf you select a .cda file the cd input of your sound card is used to sample the current music. If you do not have a cd input or if you have connected your cd-rom to the line-in jack enable this option to change to sample input.
bigmodulesThis option is of interest for users of hardware mixing devices only. Sound cards capable of mixing channels are not only limited by the amount of channels played simultaniously, but by the amount of onboard memory to store the sample data too. If files are marked as “big” in the fileselector this device listed in this option will be used for mixing this module.32
wavetostereoWhen playing a mono wave the sound card can either be switched to mono mode or the wave can be played as a stereo file.33
waveratetoleranceif the sample rate of the wave file is not equal to a sample rate supported by your sound card, OCP will not resample unless this value is exceeded. Divide the value by 1000 to get the percentage.
amplifythe default amplification to use within the player. The following options are described in section see General in detail. The command line option -va overrides this option.
panningthe default panning (command -vp)
volumethe default volume (command -vv)
balancethe default balance (command -vb)
reverbsome sound cards have an onboard effect processor 34 which features a reverb effect. This option controls the intensity of the onboard effect. (command -vr)
chorusdito as reverb (command -vc)
surroundthis options controls the fake surround effect 35 (command -vs)
filterThe software mixer can use a software filter to enhance the playback quality. Different algorithms can be used. (command -vf)
  • 0 - no filter
  • 1 AOI - only filter samples when filtering is necessary
  • 2 FOI - filter every sample even if filtering has no effect

5.5 [screen]

When the player starts it will use the options in this section as the initial appearance.

[screen]
  usepics=*.gif *.tga
  compomode=off
  startupmode=text
  screentype=7
  analyser=on
  mvoltype=1
  pattern=on
  insttype=0
  channeltype=1
  palette=0 1 2 3 4 5 6 7 8 9 a b c d e f
  fps=20
usepicsWhen using graphics modes you can use a picture to show in the background. OCP will load any TGA files with 640x384 dimensions and 256 colors. As the TGA format is poorly implemented in modern graphic programs this might change in the future. As some colors out of the 256 are used by OCP you should leave either the first or the last 16 colors in the palette black. The pictures should be copied to the home directory of ocp, unless you specify a different location in the defaultconfig section.
compomodethis option will enable the compo mode. Section see Using the Compo mode describes the details.
startupmodestart the player in either text or graphic mode:
  • coolhelp - show help screen
  • dots - show note nots
  • graph - show graphical spectrum analyzer
  • links - show currenty linked DLLs/shared libraries
  • msg - show module message
  • phase - show phase analyzer
  • scope - show oscilloscopes
  • text - show standard text screen
  • wuerfel2 - show animation
screentypethe default screentextmode:
  • 0 - 80x25
  • 1 - 80x30
  • 2 - 80x50
  • 3 - 80x60
  • 4 - 132x25
  • 5 - 132x30
  • 6 - 132x50
  • 7 - 132x60
analyzerif the player starts in textmode show the analyzer (or not)
mvoltypethe appearance of the peak power levels:
  • 1 - big
  • 2 - small
patternshow the tracklist when starting OCP in textmode
insttypethe appearance of the instrument function:
  • 0 - short
  • 1 - long
  • 2 - side (only in 132 column modes)
channeltypethe appearance of the channels in textmode:
  • 0 - short
  • 1 - long
  • 2 - side (only in 132 column mode)
palettewith this options you can redefine the default colors used in textmode. The first entry defines which color to use for the original color with number 0. Leave things as they are if you are satisfied with the visual appearance of OCP. We will provide new color schemes in the future.
fpsThis tells how many frames per second OCP should try to use, since UNIX isn’t a real-time system, this is needed.

5.6 [fileselector]

Except the first two options all options can also be specified at runtime by pressing ALT+z in the fileselector. However to make changes permanent you have to modify the fileselector section.

[fileselector] ; default fileselector section
  modextensions=MOD S3M XM IT MDL DMF ULT AMS MTM 669 NST WOW \
                OKT PTM MXM MID WAV RMI MP1 MP2 MP3 OGG SID DAT \
		PLS M3U PLT OGG
  movepath=  ; default path to move files
  screentype=2
  typecolors=on
  editwin=on
  writeinfo=on
  scanmdz=on
  scaninarcs=on
  scanmnodinfo=on
  scanarchives=on
  putarchives=on
  playonce=on
  randomplay=on
  loop=on
  path=.
modextensionsfiles containing these extensions will be scanned by the fileselector. Only those files will be shown. If you want to load files with different extensions you have to specify them at the command line.36
movepaththe standard path to move files into. This is describend in section See Advanced usage.
screentypethe textmode to use within the fileselector. The options are the same as in the screen section.
typecolorsshow files in different colors depending on the file type
editwinshow the edit window at the bottom of the screen
writeinfowrite the info to the information database located in the home directory of OCP. This speeds up the processing of directories, as files have to be scanned only once.
scanmdzif .mdz files are found in the current directory, they will be scanned and the included information used.
scanmodinfoscan inside the music files for module information.
scanarchivesif archives (like .zip or .rar) are found in the current directory the are scanned for modules.
putarchivesshow archives in the fileselector, so they can be used just like subdirectories.
playonceplay every file only once (thus not looping it) and then procede with the next file in the playlist. If the file contains a loop command the loop command is ignored.
randomplayplay files in the playlist in random order.
looploop files after the end.
paththe default path to use when starting the fileselector the first time. The default is the current directory (.). If you keep all your music files in one directory you can specfiy this directory here.

5.7 device configuration

The following sections define the various devices for the player. Unless you really know what to do you should not change the following options. As most entries are similar only some educational examples are listed here. For a complete reference have a look at your personal ocp.ini file for details.

The general form of a device looks like:

[handle]
  link=...
  subtype=...
  port=...
  port2=...
  irq=...
  irq2=...
  dma=...
  dma2=...
  bypass=...
  keep=...
handleThe internal name to use within the player. The ocp.ini file must contain all handles listed in the devices options of the devices section.
linkthe name of the dll function this device will be linked to.
port(2)the primary/secondary port of the sound card. This value has to be given in hexadecimal with preceeding 0x or appending h!
irq(2)the primary/secondary IRQ of the sound card
dma(2)the primary/secondary DMA channel of the card
bypassskip the autodetection if it may encounter problems
keep
keep the driver resident in memory, even it is not currently needed.

Most device functions of the standard dll contain autodetection routines for the supported sound cards, so there is normally no need to specify any of the port, irq or dma options. However if OCP is not able to detect your sound cards settings you can try to insert the appropriate values in the configuration file.

The next subsections will look at the special features the different sound cards and drivers support. The original order of the ocp.ini has been slightly modified for the purpose of documentation.

5.7.1 OSS

Open Sound Sysstem is a generic portable UNIX sound interface for playing/recording pcm data, and adjusting mixer settings.

[devpOSS]
  link=devposs
  revstereo=on
  path=/dev/dsp
  mixer=/dev/mixer

[devsOSS]
  link=devsoss
  revstereo=on
  path=/dev/dsp
  mixer=/dev/mixer
  igain=1
pathwhere /dev/dsp is located. If you have more soundcards, this can be set to for instance /dev/dsp3. You can override config with the DSP environment variable.
mixerwhat mixerdevice to use. Override with the MIXER environment variable.
igainif you don’t input from cdrom, try to set igain. With this option, you can automatically set igain to a given value (or -1 for not touching it)

5.7.2 software mixers

By default OCP will use its own routines for mixing several channels to the two stereo output channels. You have the choice between to mixers. The normal mixer is faster in calculating, thus can mix more channels at the same time. The quality mixer however produces better sound ouput. For average modules and a pentium processor the quality mixer should be fast enough for sufficient playback. If many channels are used you may have to change back to the normal mixer 37

Both mixers take identical options. As the mixers will be rewritten in the future the options are likely to change. Therefore they are not documented here. Please have a look at future versions of this document if you want to change to mixer settings. However these devices never have caused any trouble/bugs and there should be no need for change.

5.8 archivers

When processing files inside archives OCP has to know how to call the programs. The following sections define the usage of different archivers supported by the OCP fileselector.

When substituting the command line 4 special variables are processed by the fileselector for accessing the archives:

%%evaluates to “%”
%aevaluates to the archiv name preceeded by the path to process.
%nevaluates to the filename of the file to process inside the archive.
%devaluates to the destination directory used to extract files out of archive.

Three default command are defined for the arc modules:

getthis command is used when a file should be extracted out of an archive.
putif a file should be added to the archive this command line is used.
deletewith ALT+k you can delete files out of archives.

The following two archivers contain special options described below:

[arcZIP]
  get=pkunzip %a %d %n
  put=pkzip %a %n
  delete=pkzip -d %a %n
  deleteempty=on
deleteemptythe program pkzip/pkunzip used by OCP to process .zip files have a bug when deleting the last file inside an archive. An empty archive of 22 bytes is left on the hard disk. With this option enabled the fileselector will delete those “zip zombies”.
[arcACE]
  get=ace32 e %a %n %d
  scaninsolid=false
scaninsolidscan in solid archives. As this takes more time you can disable this feature.

5.9 Filetypes

The ocp.ini file contains descriptions for all supported file types. These features will be included in the file loader devices in the next version of OCP, so these options will soon be obsolete. There should be no need to modify any of the file types.

5.10 MIDI

If you want to hear MIDI music you need samples for the general midi instrument set.38 This secion contains the paths to the midi patches. Section see MIDI files describes how to set up OCP for midi playback. For use of timidity, /etc/timidity.cfg must be configured.

[midi]
  use=....  to force which option to use [ultradir fff freepats timidity]
  fff=c:\iw\gsfull4m.fff
  ultradir=/home/user/ultradir
  freepats=/usr/local/share/freepats
useif you want to force usage of a specific patch-system, set this variable to one of these values: ultradir fff freepats timidity
fffpath where the fff font is located
ultradirpath where ULTRADIR.INI is stored. Please checkout ultrafix.sh for fixing cases in filenames.
freepatspath to where freepats is located

Footnotes

(25)

And remember to make backups before changing vital parts of the ocp.ini

(26)

Therefore it was named defaultconfig...

(27)

you can change devices by using the special setup: drive described in section See fileselector.

(28)

mostly 32 channels

(29)

SoundBlaster 1.x or SoundBlaster Pro and compatibles

(30)

Something like 386SX

(31)

<486DX

(32)

See section see bigmodules for details about this feature

(33)

switching the soundcard may cause problems so enable this option.

(34)

currently the SoundBlasterAWE and the TerraTecEWS

(35)

this has little to do with real Dolby Surround although there should be a certain effect if you have such an amplifier

(36)

however files with different extensions are likely to be no valid module format, so they will be refused to load

(37)

You can toggle by using the bigmodule feature described in See bigmodules.

(38)

a so called midi patch set


Next: , Previous: , Up: Top