chords-db icon indicating copy to clipboard operation
chords-db copied to clipboard

Support for multiple barres

Open Aduffy opened this issue 4 years ago • 2 comments

it seems that a single integer representation for a Barre does not support real world needs for example a bar that only covers 3 strings or multiple barres in one chord

such as image

Using svguitar I would draw that with

image

How would such a chord be represented using the format for this DB?

Aduffy avatar Nov 26 '20 19:11 Aduffy

Hello, I thought when defining the structure that two barres wasn't a real world chord use, but you're right, it could be extended to support something more semantic in the "barres" property.

Actually, for example, a chord like this is rendered this way, so anyone can decide if it's better to use three fingers or use a barre with one finger.

https://tombatossals.github.io/react-chords/guitar/F/sus4

https://github.com/tombatossals/chords-db/blob/master/src/db/guitar/chords/F/sus4.js

If you're interested in this funcionality feel free to send just a few pull request with two barre chords and the JSON structure you propose, I will change the render method to support it.

Cheers

tombatossals avatar Nov 27 '20 06:11 tombatossals

thanks Tom. I would really love to see some sort of standard format for chord structures across the most popular chord/fretboard libraries.

I know that fretboard.js (https://moonwave99.github.io/fretboard.js/index.html) is also implementing barres in his library and will be using the same structure as my above screen shot from svguitar.

This also makes the barre less messy with only one fingering number on it .

Aduffy avatar Nov 27 '20 19:11 Aduffy