Tux Guitar

Open Discussion

Subject TuxGuitar plugin to read ABC files



Author Message
David A. Tanzer
Post: Aug 17th 2009 at 6:21 PM

ABC is a text format that compactly represents the structure of musical compositions. There are alot of ABC files on the web. See http://en.wikipedia.org/wiki/Abc_notation.

Is there any known work that has been done on such a plugin?

If not I will take it on as a fun project. In that case:

1. What would be a good TuxGuitar plugin to look at, as a model for writing an import program?

2. Does anybody know of a good ABC parser that is written in Java? The python script abc2ly, that comes packaged with Lilypond, contains a parser that can serve as a model. The problem with that is that it is old, and doesn't parse the later additions to the ABC language.

Thanks,
Dave Tanzer


Back to Top
 
Julian
Post: Aug 17th 2009 at 8:23 PM

There is no official plugin started for ABC

As example for export you could see,
ascii, lilypond, musicxml, etc..

for import, i think tef plugin is the most clear.

import is allways more hard, because you need to validate a lot of unsupported (or incompatible ) issues, while exporting is allmost times more easy.


Back to Top
 
David A. Tanzer
Post: Aug 19th 2009 at 9:32 PM

Yes tef plugin is a clear example, thanks for the pointer.

A big issue with ABC import is that ABC is not a tab language, the notes don't have associated strings and frets. So to import into TG I'll need a heuristic rule that chooses a string and fret for a note. It could be based on scale positions on the next. We'd want it to be as "playable" as possible.

Anyone have ideas about strategies for string and fret assignment? The tuning of course has to be considered. One goal is to minimize "jump distances." Are there any utility functions in the code for this problem?

There may be no simple algorithm that can do a good job of making natural string+fret assignments.

But even if it could do a plausible job, that would be helpful, because then we could see and play ABC files in this nice open source midi sequencer program.

General question: how hard would it be to extend TG to handle non-string-based music?


Back to Top
 
Julian
Post: Aug 20th 2009 at 9:08 PM

We used on any place something to get a string by note value.. but i don't remember where :)..

i think on midi plugin you can see something like at importer ( but midi plugin it's not so clear.. it must be rewritten )

anyway the logic don't seems to be hard..
you just need iterate strings
and take a look if note_value - string_value could get you a result greater than 0 and lesser than 30
then if yes, you should chekc if there is no another note already using this string..

but if you want something cool, you may need a better method that checks if they are "playable" frets..
i mean..
a note on fret 1 of str 0, and a note at fret 18 on str 1 in same beat, could be no easy to play.. even for superman :)...

>> how hard would it be to extend TG to handle non-string-based music?
No so hard, but we don't have plans to do that..
non string based music conflicts with the project plans "a tablature editor".. and a lot of features could be missing..

i had planned ( but never did it ) to make a "new" project ( starting from current sources ofcourse ) and convert it to a score editor, (with tablature support, but something simple ) so removing these "string" issues you could add more notes than strings you have.. and we could make a better user interface for it ( more mouse than keyboard )

but both things together can cause a lot of conflicts.. on on the structure itself.. more in the user interface.. and how to edit the tracks.. currently now, we are thinking how to make the toolbar smaller.. imagine it if we provide a powerfull score support..


Back to Top
 
pgrootswagers
Post: Jul 13th 2011 at 8:19 PM

I've written a complete import/export plugin for ABC Standard 2.0 and ABCPLUS 1.1.0

send me your email adress and I will send you the source

my email is (delete the dashes):
p-g-r-o-o-t-s-w-a-g-e-r-s-@-p-l-a-n-e-t-.-n-l


Back to Top
 
pgrootswagers
Post: Jul 15th 2011 at 7:04 PM

there is a tarbal of the tuxguitar-abc plugin on my
website, click here to download it.


Back to Top