-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can we included a chord database here ? #40
Comments
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... |
…th arbitrary functionality re #40
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! |
…th arbitrary functionality re #40
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.. |
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 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. |
great idea! i think we can using MusicXML / MNX format to describe chord and make it's a generic library. |
@omnibrain looks barre of
|
@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 your example fits that case. |
I made a pretty big chord database: https://github.com/TormodKv/SVGuitar-ChordCollection |
@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) |
I've created an example page based on @TormodKv's database, where you can quickly see and download lots of different chords - might be helpful for someone: https://haschtl.github.io/guitar-chord-library/ Note: I've made some small modifications in the database and the converter-script, because some fingerings were not ideal and I wanted the fingerings to be displayed in the SVGs. I also added the tuning to the SVGs |
That's nice. I need to learn how to use JS to make SVG guitar chords |
I built a lit.js web component wrapper for svguitar that does exactly that. There were a series of steps involved. First, I've defined six string presets: Second, given a chord name ( Third, given the base and intervals for a given chord, I can map out the note names of that chord (given The instrument object tells me the open tone pitch of each string - so in an extremely lazy test, I find the first fret on each string yielding a note in that chord. In most cases it works quite well, but as it is lazy searching it isn't checking that all now in a given chord are in, and it isn't using barres. For cases like that, I'm setting up a cascading preference system. In order, it will eventually look for:
The override definitions are pretty much exactly what svguitar expects. Here's a uke override system default: "C#maj": {
"barres": [{
"fromString": 4,
"toString": 1,
"fret": 1,
}],
"fingers": [
[1,4]
]
}, And the dynamically generated object is exactly the same, only no barres. With that, and my instrument object, I can const chart = new SVGuitarChord(divEl);
chart
.configure({
strings: instrumentObject?.strings.length,
frets: maxFrets,
position: 1,
tuning: [...instrumentObject?.strings]
})
.chord(chartSettings)
.draw();
|
hi,team:
can we have a chrod database here, then we can use human friendly chord name like C7 / Gsus4.
The text was updated successfully, but these errors were encountered: