# Configuration

This chapter covers configuration aspects of Granule.

## General Preferences

]]> ]]>

grapp-prefs-general.png

General preferences allows you to:

- Customize fonts of each text field in a DeckPlayer window.

- Configure Granule to either keep or remove duplicates when adding cards from a Deck to a partition of the CardBox (default).

- Keep dynamic links from CardBox to individual Cards in Decks as relative paths (default). Unchecking this option will configure Granule to record absolute paths.

- Configure the size of the history list of most recently-visited CardBoxes.

## Scheduling Preferences

]]> ]]>

grapp-prefs-scheduling.png

Scheduling preferences control when to mark a flashcard in a partition of the CardBox as expired. See explegend for details.

## Sound Preferences

]]> ]]>

grapp-prefs-sound.png

Sound preferences let you control the way Granule finds and plays sound files. The defaults are:

    Sound player command:   sox
    Sound player arguments: %s -t ossdsp -v 1.7  -r 48000 /dev/dsp
    Default sound path:     /usr/share/WyabdcRealPeopleTTS/

You have to have the sound dictionary installed on your system. A sound dictionary is a directory that holds sound files grouped in the subdirectories by the first name of each sound file name. For example, a popular free English sound dictionary, WyabdcRealPeopleTTS, has the following tree structure:

    % cd /usr/share/WyabdcRealPeopleTTS/
    % ls

    a/  c/  e/  g/  i/  k/  m/  o/  q/  s/  u/  w/  y/
    b/  d/  f/  h/  j/  l/  n/  p/  r/  t/  v/  x/  z/

Each subdirectory holds a collection of WAV files that start with the same first letter. For example, if we were to look at "`g/`" subdirectory, we would see:

    % ls g

    gabbler.wav           gesticulative.wav   granddaughter.wav
    gabble.wav            gestural.wav        grandeur.wav
    gabbling.wav          gesture.wav         grandfatherly.wav
    gadfly.wav            getatable.wav       grandfather.wav
    gadgeteer.wav         get.wav             grandiloquence.wav

    ...

If we were to play our test card, freedom, based on default setting Granule would try to execute UNIX command:

    % sox /usr/share/WyabdcRealPeopleTTS/f/freedom.wav -t ossdsp -v 1.7  -r 48000 /dev/dsp

To test if your sound works, you should be able to cut-n-paste this command into your UNIX terminal window and hear the sound.

## Geometry Preferences

]]> ]]>

grapp-prefs-geometry.png

Geometry preferences lets you control the the size of each of the dialogs.

The aspect ratio option forces DeckPlayer dialog to a specified ratio if enabled.

## Configuration File

Granule stores its configuration file in `$HOME/.granule` text file. Here is an example of our test configuration file:

    [options]
    gtk_options=--g-fatal-warnings
    log_level=0
    log_stdout=false
    mask=0

    [History]
    0=/export/home/vlad/English/Words/Travels/Homework_01.cdf
    1=/export/home/vlad/English/Words/Travels/travels_all.cdf

    [Default]
    filesel_path=/export/home/vlad/English/Words/Travels/
    question_font_desc=Times New Roman 24
    answer_font_desc=Sans 14
    example_font_desc=Sans 14
    mainwin_geometry=350x430
    cardview_geometry=386x643
    deckplayer_geometry=350x583
    deckplayer_keep_aspect=true
    deckplayer_aspect=3x5
    snd_player_cmd=sox
    snd_player_args=%s -t ossdsp -v 1.7  -r 48000 /dev/dsp
    remove_duplicates=true
    snd_archive_path=/usr/share/WyabdcRealPeopleTTS/

    [FlipSide]
    front_0=/export/home/vlad/English/Words/Travels/Travels_p133.dkf
    front_1=/export/home/vlad/English/Words/Travels/Travels_p147.dkf
    front_2=/export/home/vlad/English/Words/Travels/Travels_p167.dkf
    front_3=/export/home/vlad/English/Words/Travels/Travels_p159.dkf
    back_4=/export/home/vlad/English/Words/Travels/Travels_p186.dkf
    front_5=/export/home/vlad/English/Words/Travels/Travels_pp_1-132.dkf
    front_6=/export/home/vlad/English/Words/Travels/Travels_p201.dkf
    front_7=/export/home/vlad/English/Words/Travels/Travels_p211.dkf
    front_8=/export/home/vlad/English/Words/Travels/Lesson_01.dkf

    [Scheduling]
    1=4/0
    2=0/1
    3=0/2
    4=0/3
    5=0/4

options section

- Holds various command-line arguments you can pass to Granule. See % granule --help for details.

History section

- Keeps track of last five opened CardBoxes. CardFile Open Recent menu is filled with these entries.

Default section

- Holds all configurable parameters of the Preferences dialog.

FlipSide section

- Remembers which side of the Deck should be questioned next time it is loaded into Granule.

Scheduling section

- Holds Preferences Scheduling options of the Preferences dialog.

A default configuration file is installed with Granule installation on your system.