Gfret renders an svg image template of a fretboard for a stringed instrument. It has a Gtk interface as well as a command line interface and can produce templates for instruments ranging from a piccolo mandolin to an upright bass. Multiscale designs are also supported. Currently, all measurements are expressed in metric units only.
Gfret is distributed primarily in source form. The main repo is at codeberg.org with mirrors at gitlab and gibub.com. Releases are recommended.
Gfret can be used from the command line or using the Gtk+ interface.
```Bash gfret-cli
Output an svg without running the interface
USAGE: gfret cli [OPTIONS] [OUTPUT]
ARGS:
OPTIONS:
-b, --bridge
-c, --count
-e, --external
-h, --help Print help information
-l, --left Multiscale fretboard reversed (left handed)
-m, --multi
-n, --nut
-o, --output
-p, --perpendicular
Calling the program by invoking gfret
without any arguments will run
the Gtk interface. Additionally, a .desktop file and icon are included and
will be installed if the program is installed using the included
Makefile
, and can be used for launching the program from desktop menus
or creating shortcuts.
| Key | Action |
| --- | --- |
| Ctrl/S | save file |
| Ctrl/Shift/S | save file as |
| Ctrl/E | open with an external program |
| Ctrl/O | load a template from file |
| Ctrl/Shift/P | open the preferences
dialog |
| Ctrl/A | open the about
dialog |
| Ctrl/Q | quit the program |
Along with the svg output, Gfret will save the specifications used to generate the rendering in a Toml file with it's name corresponding to the name of the svg file. These templates can be loaded later, either as an argument when invoking the program, in which case the output will be immediately generated, or else loaded from the Gui interface for further editing. This is useful for sharing a common scale among multiple designs to use as a starting point.
On Unix systems the default configuration directory is ~/.config/gfret
.
Gfret will maintain a configuration file here in Toml
format, with the following fields:
```Toml
units = "Metric"
external_program = "inkscape"
border = 10.0
line_weight = 1.0
[fretline_color]
ColorType = "Reduced"
red =
[fretboard_color] ColorType = "Reduced" red = 36 green = 31 blue = 49 alpha = 255
[centerline_color] ColorType = "Reduced" red = 0 green = 0 blue = 255 alpha = 255
[font] family = "Sans" weight = "Normal" ```
Note: The graphical interface has a preferences dialog and will take care of maintaining the preferences file for you. There will be no need to edit this file by hand in normal use.
Building
You will need a Rust toolchain installed, including cargo. Gtk+3x is also
required. To build the program, run cargo build --release
to build a
release binary in target/release.
Alternatively, you can use the included Makefile to build and install the program, adjusting the installation path with the PREFIX and DESTDIR variables.