Ok, thanks so much Nikolas and Kreisler. I think I've got it now.
Just find the shortest stem of ANY of the notes, and shorten it as far as you're willing to go before it starts looking too weird.
So I'm gonna start with the recommended 3 spaces within staff, 2.5 outside and go from there. And, of course 3.5 if the notes are within a space of each other, etc.
I've also ordered the 2 books - I don't care about the quality, I need to know ALL hints.
I'm not sure you'ld really want to beam that 3rd figure (is it called a figure??)
That third beam in Nikolas' example has vertical gaps of more than an octave and I thought that, in general, you don't want to beam notes farther apart than an octave.
Ok, time to start writin' some code.
Sorry to disappoint you all (most likely:), but this will be a ZERO input notation renderer. Given ONLY a midi file, (hopefully recorded to a mentronome, or at least tap quantized), my goal is to make the best standard notation I can with NO human input.
I'm familiar with Lilypond, but as it's open source, I can't use it in my currently freeware app. Since I'm hoping that 38 years from now, It'll go commercial...
Also, although Lilypond produces beautiful renderings, aaaall the input required is a PAIN in the butt. Don't worry, I love re-inventing the wheel. It's what we programmers DO.
My app is a piano practice app for when you're a 5th grade kid on a digital and want to play some pop songs you find in midi files on the web similar to guitar hero but for real. And, HOPEFULLY, you have a teacher that will go along with this monstrosity and help you along the one true path. (Although, the majority seem to require acoustics and paper and classical music).
Like I say, I'm crazy like that. I could keep goin' on about this little project forever. I've pretty much dedicated my life to it. But I'll shut up now
I'm not sure if you guys imbibe, but I sure wish I could buy ya a couple beers.
Also, as you seem to be on top of this "answering extremely difficult questions about music" game, I thought I'd point you tohttp://music.stackexchange.com/questions?sort=newest
It's not got NEAR the number of users as pianoworld, but it's got a great FAQ format that sort of "organically grows" a good solid knowledge base.
You may already know about it.
Ok, I promised to shut up, but if you have any further questions or detail about engraving, lemme know.