I'd be interested in taking a look at your code, It should help get my brain working. I'd also be interested in feedback from you if your interested to critique my approach.<br><br>Nathanael<br><br>>About ten years ago (on Atari/MiNT) I wrote a C program similar to this, but<br>
>for baroque lute tabulature... I wanted it to help me transform any midifile<br>>I was interested in, be it classical orchestral or chamber works, piano works<br>>or pieces for classical guitar, in a semi-automatic way, to Wayne Cripp's<br>
>lutetab code, and it worked out surprisingly good, given that I was a<br>>lousy DIY hacker ;) (I don't really code anymore).<br>><br>>I didn't care much about 2) and 3) but for 1) I came up with an algorithm like<br>
>this:<br>> - determine the string on which the pitch can be played at the lowest fret<br>> possible<br>> - check if this string is used already, and if yes move this note to the next<br>> (lower) string<br>
><br>>For notes lower than the instrument range (13 course lute goes down to A, a 5th<br>>lower than guitar) I chose to just place a comment in the tab output, so that I<br>>would be able to decide afterwards what to do with that note (transpose up an<br>
>octave, skip it, whatever).<br>><br>>Since it's been a long time now I can't remember how I dealt with files<br>>containing more than one track, but I somehow managed to merge them into a<br>>single tabulature, I have for example produced nice tabulatures of the<br>
>accompaniment of the first three movements of Pergolesi's Stabat Mater.<br>>For these of course I had to prepare the midifiles, remove the voice tracks<br>>and transpose to a key suitable to the lute.<br>><br>
>Other problems I've encountered and I'm not sure if or how I solved them:<br>> - the bar/beat counting got screwed up sometimes, especially with grace notes<br>> - of course, I had to remove double notes when boiling down ensemble works<br>
> - there are different lute tunings, I only dealt with standard baroque<br>> d-minor tuning<br>> - on the lute, the diatonic basses (lower than the 6th course) are tuned to<br>> the key of the piece<br>><br>
>The thing is based on the ancient midifile(3) lib by Tim Thompson et al. which<br>>is a little gem IMHO. The library parses the midifile, all you have to do is<br>>to write a few callback functions for the events you're interested in. Some<br>
>example code is in the archive, and it took me just a few days to come up with<br>>something useful.<br>><br>>I never seriously thought about releasing it, even after I compared it's<br>>output's quality to what Django can do (an impressive M$ tabulature editor,<br>
>mainly for historic fretted instruments, the demo from<br>><a href="http://musickshandmade.com/lute/pages/django">http://musickshandmade.com/lute/pages/django</a> runs quite well in wine) and<br>>found that I was doing pretty well. :)<br>
><br>>I'm sure there are stupid things in there and it's not at all in a releasable<br>>state, but if you are interested I'll share the code...<br>><br>