Crate fretboard_layout[][src]

Expand description

fretboard_layout is a library for turning a set of specifications into a complete template of a stringed musical instrument fretboard, such as a guitar, banjo, or mandolin.

Usage

use fretboard_layout::{Config,Specs};

    // the [Specs] struct constains the specifications used to generate the svg
    let mut specs = Specs::default();
    specs.set_multi(Some(615.0));
    specs.set_scale(675.0);
    // the (optional) [Config] struct fine tunes the visual representation
    let mut cfg = Config::default();
    cfg.set_line_weight(0.5);
    let svg = specs.create_document(Some(cfg));

Re-exports

pub use config::Config;
pub use config::Units;

Modules

Some miscellaneous settings like colors, line styling and measurements

Plots positions and outputs svg

Structs

This struct contains multiplication factors used to convert the raw lengths from bridge to fret into x,y coordinates. It also contains an offset distance used to correctly orient the two scales in a multiscale design so that the desired fret is perpendicular to the centerline.

This struct contains the user data used to create the svg output file

Enums

Whether the output is for right or left handed usage

A monoscale neck is traditional, while a multiscale neck (also known as fan fret) allows for the bass scale to be longer than the treble scale, giving advantages in playability and string tension, at the expense of added complexity.