svguitar
svguitar copied to clipboard
can we included a chord database here ?
hi,team: can we have a chrod database here, then we can use human friendly chord name like C7 / Gsus4.
there is a good looking database @ https://github.com/tombatossals/chords-db/blob/master/lib/guitar.json that i am thinking of integrating in my project.
That's a good idea but I'm a bit hesitant to integrate a complete chord database in this library as it would considerably increase the size of the library and might not be needed for all use cases.
What would be really cool is a plugin system so that a chord db can be loaded optionally. I'll think about how to best implement that.
@omnibrain sure, we don't need directly including any database inside the project.
What would be RELAY great would be if there was a more standardized format for defining a chord.
https://github.com/tombatossals/chords-db has a large database, but it seems to have a week structure definition for barres (unless I missed something )
https://github.com/moonwave99/fretboard.js although more of a full fretboard for scales etc, does support chords
and of coarse this project...
I'm working on a simple plugin system that should allow extending SVGuitar with any functionality. After that I will create a plugin that includes some kind of chart database.
And yes I agree a standard format would be great!
I have started writing a transformer that takes data from https://github.com/tombatossals/chords-db and transforms it to a format svguitar can understand and render, but I don't really understand the way the barre chords are defined in tombatossals/chords-db... How can I from a single number determine on which fret and from which string to which string the barre chord should be drawn? I have tried to understand the logic but failed, so I'm afraid I have hit a dead end until someone can explain this to me.
I opened a issue on tombatossals about the structure of barres and he said that when he built it he had not considered multiple bars in a single chord.. He is open to recommendations..
https://github.com/tombatossals/chords-db/issues/18
Looking over some of the chords on https://github.com/tombatossals/chords-db , it seems that the bar only indicates the fret, and the notes to play are shown on top of the full barre.. Or maybe the high and low not on that fret define the barre length ..
Clearly a problem for Chords like

that his tool draws as
So based on that.. perhaps the logic is
If there are no notes behind the bar, draw bar from lowest to highest string using data from notes (fingers) on same fret as barre..
If there are notes behind bar as per this example then need to create one or more bars based on notes on consecutive strings.
@Aduffy
great idea! i think we can using MusicXML / MNX format to describe chord and make it's a generic library.
@omnibrain looks barre of chords-db
doesn't work. I am thinking to use a rule to decide how to render barre:
- chord must be barre if a finger used on multi strings.
@imiskolee Unfortunately I don't think it's that easy, eg this chord:

.. would be rendered like this:

@omnibrain you can see string 2 and 4 gt others. it's meaning fret 1 can cross it.
@omnibrain that was why i commented "If there are no notes behind the bar, draw bar from lowest to highest string using data from notes (fingers) on same fret as barre.."
your example fits that case.
I made a pretty big chord database: https://github.com/TormodKv/SVGuitar-ChordCollection It's based on https://github.com/T-vK/chord-collection I haven't done a lot of quality testing, but i think it's pretty accurate, but it doesn't include numbers for each finger
@TormodKv I think I started writing a SVGuitar plugin a while a go based on your chords db but then I started a new job and didn‘t have time to finish it… When I have some time I‘ll check if I can get it to a state where I could release it… as far as I remeber I was pretty much done with the plugin (and the plugin system for SVGuitar)