tombatossals / chords-db

String Instruments Chords Database.
https://tombatossals.github.io/react-chords/
MIT License
393 stars 101 forks source link

Support for multiple barres #18

Open Aduffy opened 3 years ago

Aduffy commented 3 years ago

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?

tombatossals commented 3 years ago

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

Aduffy commented 3 years ago

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 .