svguitar icon indicating copy to clipboard operation
svguitar copied to clipboard

can we included a chord database here ?

Open imiskolee opened this issue 4 years ago • 18 comments

hi,team: can we have a chrod database here, then we can use human friendly chord name like C7 / Gsus4.

imiskolee avatar Nov 15 '20 15:11 imiskolee

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.

Aduffy avatar Nov 15 '20 23:11 Aduffy

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 avatar Nov 16 '20 17:11 omnibrain

@omnibrain sure, we don't need directly including any database inside the project.

imiskolee avatar Nov 17 '20 10:11 imiskolee

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...

Aduffy avatar Nov 26 '20 22:11 Aduffy

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!

omnibrain avatar Nov 27 '20 15:11 omnibrain

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.

omnibrain avatar Nov 29 '20 12:11 omnibrain

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

Aduffy avatar Nov 29 '20 18:11 Aduffy

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

image

that his tool draws as image

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 avatar Nov 30 '20 05:11 Aduffy

@Aduffy

great idea! i think we can using MusicXML / MNX format to describe chord and make it's a generic library.

imiskolee avatar Nov 30 '20 08:11 imiskolee

@omnibrain looks barre of chords-db doesn't work. I am thinking to use a rule to decide how to render barre:

  1. chord must be barre if a finger used on multi strings.

imiskolee avatar Nov 30 '20 09:11 imiskolee

@imiskolee Unfortunately I don't think it's that easy, eg this chord:

image

.. would be rendered like this:

image

omnibrain avatar Dec 06 '20 09:12 omnibrain

@omnibrain you can see string 2 and 4 gt others. it's meaning fret 1 can cross it.

imiskolee avatar Dec 07 '20 07:12 imiskolee

@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.

Aduffy avatar Dec 08 '20 18:12 Aduffy

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 avatar Sep 20 '21 14:09 TormodKv

@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)

omnibrain avatar Sep 20 '21 18:09 omnibrain