Jump to content

Automatic fingering generation for Anglo


Recommended Posts

17 minutes ago, lachenal74693 said:

Interesting! Given the different approaches we are using, there is adequate agreement between the two. One difference in this particular case, is that my stuff generates left-hand button 8 in the penultimate bar, whereas yours generates left-hand button 5. I think I know why this happens.

 

I think my model is only using button 5 out of a generic mild preference for an index-finger button over a ring-finger button, and a middle-row button over an inner-row button.

Link to comment
Share on other sites

My next big project on this front is going to be solving tune input to the model. After punting on writing an ABC parser for a long time, I finally hit on an idea that I think will work better: taking input from MIDI files. That will allow me to rely on the ABC->MIDI conversion process to expand chords into individual notes, without needing to handle all the weirdness of musical notation.

Link to comment
Share on other sites

47 minutes ago, Owen Anderson said:

...After punting on writing an ABC parser for a long time...

My other programs (1. generating 'statistics' for large ABC files; 2. extracting tunes from an ABC file, using Unix-style Regular Expressions as the extraction criteria; 3. re-formatting a file, and doing some optimisation of ABC code) simply treat the whole exercise as simple manipulation of a text file. It's ABC files, but it could be knitting patterns(!). Effectively, I am 'parsing' the ABC file, but at a very simple level. I'm sitting a long way downstream from the programs which do fully parse ABC code, and I wouldn't want to take it any further...

 

49 minutes ago, Owen Anderson said:

I think my model is only using button 5 out of a generic mild preference for an index-finger button over a ring-finger button, and a middle-row button over an inner-row button.

Heh! I think my model is using button 8 because even my (hard-wired) so-called 'cross-row' mappings stick with 'along-the-row' button allocations for the left-hand! Something else I need to address when I try to incorporate 'intelligent' button selection into the program(s)...

Link to comment
Share on other sites

I got MIDI input working. It seems to work well, and makes it much easier to ingest longer tunes into the tool. It does *technically* work for chordal arrangements, but the way abcmidi renders chords in MIDI isn't especially similar to the way you would typically play them on an Anglo, so it's not as helpful as you might think.

 

Here's an example of generating a fingering for the entirety of Cielito Lindo, via abcmidi with guitar chords disabled. I did successfully create a version using guitar chords, but it required a lot of `%%MIDI` commands in the ABC to get various chords in the right octaves, and it still didn't match the way you'd actually play them on an Anglo enough to be useful.

 

X: 1
T: Cielito Lindo
R: waltz
M: 3/4
L: 1/8
K:G
%%staffsep 40pt
"^Vbrsb"[|\
"G"g2 g2 e2- | "D7"e2 f2 d2 | "G"g2 g2 e2- | "D7"e2 f2d2 |\
"G"g2 g2 e2- | e2 f2d2 | "Am"c2 A4- | A6 |
"D"f2 f2 f2 | f2 e2 d2 | "D7"c2 A2 A2- | A2 B2 c2 |\
d2 d2 d2- | d2 d3 c | "G"BA G4- | G6 |
"^Refrain"|:\
"G"[bd]6 | [ad]4 g2 | "C"[ec]6- | [ec]6 |\
[ac]6 | "D7"[ac]4 gg | "G"[dB]2 [gB]4- | [gB]4 d2 |
[eB]4 d2 | [eB]2 e2 dd | "C"[c'a]2 [c'a]2 [af]2- | "D7"[af]2 f2 d2 |\
[ec]2 [ec]2 [dB]2- | [dB]2 [cA]2 [dB]2 | "G"BA G4- | [GG,]6 :|]
Time 1: (R06Push, index)
Time 481: (R06Push, index)
Time 961: (R02Push, middle)
Time 1921: (R06Pull, index)
Time 2401: (R02Pull, middle)
Time 2881: (R06Push, index)
Time 3361: (R06Push, index)
Time 3841: (R02Push, middle)
Time 4801: (R06Pull, index)
Time 5281: (R02Pull, middle)
Time 5761: (R06Push, index)
Time 6241: (R06Push, index)
Time 6721: (R02Push, middle)
Time 7681: (R06Pull, index)
Time 8161: (R02Pull, middle)
Time 8641: (R01Push, index)
Time 9121: (L04aPush, middle)
Time 11521: (R06Pull, index)
Time 12001: (R06Pull, index)
Time 12481: (R06Pull, index)
Time 12961: (R06Pull, index)
Time 13441: (L10Pull, index)
Time 13921: (L10Push, index)
Time 14401: (L09Pull, middle)
Time 14881: (L05Pull, index)
Time 15361: (L05Pull, index)
Time 16321: (L09Push, middle)
Time 16801: (L09Pull, middle)
Time 17281: (L10Push, index)
Time 17761: (L10Push, index)
Time 18241: (L10Push, index)
Time 19201: (L10Push, index)
Time 19921: (L09Pull, middle)
Time 20161: (L09Push, middle)
Time 20401: (L05Pull, index)
Time 20641: (L04aPull, middle)
Time 23041: (R07Push, middle) (L10Push, index)
Time 24481: (R02aPush, middle) (L10Push, index)
Time 25441: (R02aPull, middle)
Time 25921: (L10Pull, index) (L09Pull, middle)
Time 28801: (R02aPush, middle) (R01Push, index)
Time 30241: (R02aPush, middle) (R01Push, index)
Time 31201: (R02aPull, middle)
Time 31441: (R02aPull, middle)
Time 31681: (L10Push, index) (L09Push, middle)
Time 32161: (R06Push, index) (L09Push, middle)
Time 34081: (L10Push, index)
Time 34561: (L10Pull, index) (R01Pull, middle)
Time 35521: (L10Push, index)
Time 36001: (L10Pull, index) (R01Pull, middle)
Time 36481: (L10Pull, index)
Time 36961: (L10Push, index)
Time 37201: (L10Push, index)
Time 37441: (L09Pull, ring) (R07Pull, middle)
Time 37921: (L09Pull, index) (R07Pull, middle)
Time 38401: (R07Pull, middle) (R06Pull, index)
Time 39361: (R06Pull, index)
Time 39841: (L10Push, index)
Time 40321: (L10Pull, index) (L09Pull, middle)
Time 40801: (L10Pull, index) (L09Pull, middle)
Time 41281: (L10Push, index) (L09Push, middle)
Time 42241: (L09Pull, middle) (L08Pull, ring)
Time 42721: (L10Push, index) (L09Push, middle)
Time 43201: (L09Push, middle)
Time 43441: (L05Pull, index)
Time 43681: (L08Push, ring)
Time 44641: (L02Push, pinky)
Time 46081: (R07Push, middle) (L10Push, index)
Time 47521: (R02aPush, middle) (L10Push, index)
Time 48481: (R02aPull, middle)
Time 48961: (L10Pull, index) (L09Pull, middle)
Time 51841: (R02aPush, middle) (R01Push, index)
Time 53281: (R02aPush, middle) (R01Push, index)
Time 54241: (R02aPull, middle)
Time 54481: (R02aPull, middle)
Time 54721: (L10Push, index) (L09Push, middle)
Time 55201: (R06Push, index) (L09Push, middle)
Time 57121: (L10Push, index)
Time 57601: (L10Pull, index) (R01Pull, middle)
Time 58561: (L10Push, index)
Time 59041: (L10Pull, index) (R01Pull, middle)
Time 59521: (L10Pull, index)
Time 60001: (L10Push, index)
Time 60241: (L10Push, index)
Time 60481: (L09Pull, ring) (R07Pull, middle)
Time 60961: (L09Pull, index) (R07Pull, middle)
Time 61441: (R07Pull, middle) (R06Pull, index)
Time 62401: (R06Pull, index)
Time 62881: (L10Push, index)
Time 63361: (L10Pull, index) (L09Pull, middle)
Time 63841: (L10Pull, index) (L09Pull, middle)
Time 64321: (L10Push, index) (L09Push, middle)
Time 65281: (L09Pull, middle) (L08Pull, ring)
Time 65761: (L10Push, index) (L09Push, middle)
Time 66241: (L09Push, middle)
Time 66481: (L05Pull, index)
Time 66721: (L05Push, index)
Time 67681: (L02Push, pinky)

 

sample.mid

Link to comment
Share on other sites

  • 3 weeks later...

I just got this hooked up in a form that others can try.  If you navigate to this page, you can upload a MIDI file and have my model generate a fingering for a 30b Wheatstone C/G Anglo. It currently prints a text output that lines up with Gary Coover's tablature system.

 

While the model supports simultaneous notes, but you probably won't want to use a MIDI file with guitar chords rendered into it by abc2midi. The model will try to translate the notes exactly as abc2midi rendered them, which is unlikely to result in anything you'd actually want to play on a concertina.

  • Thanks 1
Link to comment
Share on other sites

Message deleted - I managed to leave in a single accompaniment chord in my test tune, so it went belly-up!

 

Can I suggest that you add a tune title as the first line of the output, if that is possible?

 

Edited by lachenal74693
Link to comment
Share on other sites

12 hours ago, lachenal74693 said:

Message deleted - I managed to leave in a single accompaniment chord in my test tune, so it went belly-up!

 

Can I suggest that you add a tune title as the first line of the output, if that is possible?

 


Chords shouldn’t automatically kill it, but ones generated by abc2midi often contain chords too deep for the Anglo’s range. If you send me the file I can see what’s wrong with it.

 

I can look into adding a title, but I don’t think MIDI files are guaranteed to contain one?

Link to comment
Share on other sites

11 hours ago, Owen Anderson said:

[1] Chords shouldn’t automatically kill it, but ones generated by abc2midi often contain chords too deep for the Anglo’s range. If you send me the file I can see what’s wrong with it.

 

[2] I can look into adding a title, but I don’t think MIDI files are guaranteed to contain one?

[1] I won't take you up on your kind offer at the moment, because I guess you are up to the earballs getting the whole thing properly sorted out? It's low-priority really, because (presumably) you are working towards providing a complete harmonic tabulation, where actual chords would have rather low priority/importance? Later maybe...

 

[2] Ah, I looked at a MIDI file generated from an ABC file (using EasyABC), and the title was buried somewhere in the MIDI code in text form. I just assumed that (1) 'twould be present in all MIDI files; (2) 'twould be feasible to extract it from the file and place it somewhere in your output.

 

No worries if including title is not practical...

 

Thanks.

Edited by lachenal74693
Link to comment
Share on other sites

1 hour ago, lachenal74693 said:

[1] I won't take you up on your kind offer at the moment, because I guess you are up to the earballs getting the whole thing properly sorted out? It's low-priority really, because (presumably) you are working towards providing a complete harmonic tabulation, where actual chords would have rather low priority/importance? Later maybe...

 

[2] Ah, I looked at a MIDI file generated from an ABC file (using EasyABC), and the title was buried somewhere in the MIDI code in text form. I just assumed that (1) 'twould be present in all MIDI files; (2) 'twould be feasible to extract it from the file and place it somewhere in your output.

 

No worries if including title is not practical...

 

Thanks.

 

I just added title extraction to the output, when present.

 

I do dream of being able to automatically generate fingerings for complex harmonic arrangements. The model is actually able to do so, but the input is the hard part.

 

Taking input from ABC means recreating a lot of the timing logic from abc2midi, which would be a pain.

Taking input from MIDI means losing the looping structure of the score, and being stuck with whatever chord rendering abc2midi picked.

Link to comment
Share on other sites

2 hours ago, Owen Anderson said:

I just added title extraction to the output, when present.

Crikey, that was quick! Thank you!

 

It works!

 

Bacca Pipes - Headington

 

Time 1: (L05Push, index)
Time 721: (L05Push, index)
Time 1201: (L09Push, middle)
Time 1441: (L05Pull, index)
Time 1921: (L05Push, index)
Time 2161: (L07Pull, pinky)
Time 2881: (L05Push, index)
Time 3361: (L07Pull, pinky)
Time 3601: (L04Push, middle)
Time 4321: (L07Pull, pinky)
Time 4801: (L04Push, middle)
Time 5041: (L03Pull, ring)
Time 5761: (L05Push, index)
Time 6481: (L05Push, index)

  .

  .

  .

 

Thanks!

 

Edited by lachenal74693
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...