Coder Social home page Coder Social logo

fretl's Introduction

fretl

   9      8      7      6      5      4      3      2      1      0
+--.-------------.-------------.-------------.------------------+
|--C#--|------|--B---|------|--A---|--G#--|------|--F#--|------|| E
|--G#--|------|--F#--|------|--E---|------|--D---|--C#--|------|| B
|--F#--|------|--E---|------|--D---|--C#--|------|--B---|------|| A
|--C#--|------|--B---|------|--A---|--G#--|------|--F#--|------|| E
|--F#--|------|--E---|------|--D---|--C#--|------|--B---|------|| A
|--B---|------|--A---|--G#--|------|--F#--|------|--E---|------|| D
+--.-------------.-------------.-------------.------------------+

fretl is a command-line fretboard specifically designed for mirrored (a.k.a. left-handed) guitars.

Unlike most fretboard diagrams you can found online, fretl

  1. Supports mirrored guitar, since some misfortuned ones learned to reason about notes on guitar the opposite way.
  2. Has first-class support for alternative tunings
  3. Has no assumption about how many strings a guitar should have
  4. Uses unambiguous representation of notes, intervals, and scales, so it can distinguish enharmonic equivalent notes such as C# and Db.

For example, you could print the notes in A major scale in DAEAC#E tuning up to 7th fret by

$ fretl -f7 -rA DAEAC#E < scales/major
   7      6      5      4      3      2      1      0
+--.-------------.-------------.------------------+
|--B---|------|--A---|--G#--|------|--F#--|------|| E
|--G#--|------|--F#--|------|--E---|------|--D---|| C#
|--E---|------|--D---|--C#--|------|--B---|------|| A
|--B---|------|--A---|--G#--|------|--F#--|------|| E
|--E---|------|--D---|--C#--|------|--B---|------|| A
|--A---|--G#--|------|--F#--|------|--E---|------|| D
+--.-------------.-------------.------------------+

or alternatively display in scale degrees.

$ fretl -d -f7 -rA DAEAC#E < scales/major
   7      6      5      4      3      2      1      0
+--.-------------.-------------.------------------+
|--2---|------|--1---|--7---|------|--6---|------|| 5
|--7---|------|--6---|------|--5---|------|--4---|| 3
|--5---|------|--4---|--3---|------|--2---|------|| 1
|--2---|------|--1---|--7---|------|--6---|------|| 5
|--5---|------|--4---|--3---|------|--2---|------|| 1
|--1---|--7---|------|--6---|------|--5---|------|| 4
+--.-------------.-------------.------------------+

Capo is also supported via the -c flag.

$./fretl -c3 -f7 -rC DAEABE < scales/major
   7      6      5      4      3      2      1      0
+---------.-------------.-------------.-----------+
|--D---|------|--C---|--B---|------|--A---|------|| G
|--A---|------|--G---|------|--F---|--E---|------|| D
|--G---|------|--F---|--E---|------|--D---|------|| C
|--D---|------|--C---|--B---|------|--A---|------|| G
|--G---|------|--F---|--E---|------|--D---|------|| C
|--C---|--B---|------|--A---|------|--G---|------|| F
+---------.-------------.-------------.-----------+

You could also pass in other scales as well.

$ fretl -f7 -rD CFCFAC < scales/minor
   7      6      5      4      3      2      1      0
+--.-------------.-------------.------------------+
|--G---|------|--F---|--E---|------|--D---|------|| C
|--E---|------|--D---|------|--C---|------|--Bb--|| A
|--C---|------|--Bb--|--A---|------|--G---|------|| F
|--G---|------|--F---|--E---|------|--D---|------|| C
|--C---|------|--Bb--|--A---|------|--G---|------|| F
|--G---|------|--F---|--E---|------|--D---|------|| C
+--.-------------.-------------.------------------+

Note that you don't need to specify which accidental to use. This is taken care of automatically.

Build

fretl is written in C99. Make sure you have a C99 compatible C compiler to build this program.

Since I separated the parsing and processing of music notes and intervals into separate libraries, you first need to update submodules by

$ git submodule update --init --recursive

Then use make to compile and install it to system:

$ make
# make install

You could also use the PREFIX option to install for current user only:

$ make PREFIX=~/.local install

Further reading

See

$ man 1 fretl

for the explanation of each option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.