Chord Shapes
Closed this issue · 5 comments
I see in your road map you have plans to add Chord Shapes to fretboard.js. Do you plan on having this based off of a static database such as tombatossals / chords-db , or auto generated based on notes?
I am not planning to generate anything inside the library because there are good external resources already ^^
I implemented a shorthand fretboard.renderChord(chord: string)
method, see docs - for instance:
const fretboard = new Fretboard({ ... });
fretboard.renderChord('x32010');
Renders a C major in open position. See other examples online.
Do you plan on adding support for Barres and or fingering or are you leaving that to other projects such as svguitar ?
If by fingering you mean just displaying 1-4 inside the dot, one can already use the dotText
param:
const fretboard = new Fretboard({
el: '#fretboard',
dotText: ({ finger }) => finger
});
fretboard.render([
{
string: 5,
fret: 3,
finger: 3
},
{
string: 4,
fret: 2,
finger: 2
},
{
string: 2,
fret: 1,
finger: 1
},
]);
Barres were already planned, something like barre(fret, stringFrom, stringTo)
should do (with possibility to pass an array of tuples for multiple barres).
ah.. light bulb moment in understanding that I can pass any arbitrary string in to use as the dotText! ...
that solution for Barres is similar to svguitar:
barres: [{ fromString: 4, toString: 1, fret: 3, text: '3', }]
Would be nice if muting was included in the render object instead as its own function
{ string: 6, muted: true },
that said, it would be nice if there was a standardized structure for guitar chords between the most popular guitar chord oriented libraries..
As soon as I have time I will have a look at the barre feature, thanks for mentioning it!
Digression: Fretboard.js started as a project for helping myself to study scales, because I was tired of chordal playing - that's why I didn't plan much chord diagram support.
At the beginning I was a big fan of extended chord notation (Em7add1no5
wow), then I realised it is not suited for genres where voice leading matters. Best of both worlds is to have chord symbols below the staff with the melody, but I am not proficient enough to sketch things directly on the score yet :/