Welcome to the Piano World Piano ForumsOver 2.5 million posts about pianos, digital pianos, and all types of keyboard instruments
Join the World's Largest Community of Piano Lovers
(it's free)
It's Fun to Play the Piano ... Please Pass It On!

Ok, I'm familiar with MOST of the algorithms for drawing standard notation. Stem lengths should be 3.5 stave spaces, extending for 32nd notes and beyond. Also extending to middle line of staff if head reaches 2nd line away from staff or beyond.

What I =don't= get is how to pick stem lengths for beamed notes.I've read up in the book "Behind Bars" (which is GREAT), and I see that 1 or 2 beams for stem up notes should hang from a line or be split in half by a line, but NEVER centered on a space. Similarly, stem down'd beams should sit on a line or be split. Beams should be 1/2 a stave space with 1/4 stave space between.

But how do I pick stem lengths?From what I can see, I start with the 2 end notes - the note that'll have shortest length is my "anchor" and give it 3.5 space length, then the other notes' stems extend/shrink to hit the beam where they will. This note's stem CAN contract to 3 spaces if beam is within staff, or 2.5 if beam is outside staff.

But what if a note withIN the beam (not one of the 2 outside notes) is so short that it gets down to length 1 or 0 or negative??

I think that I *might* be able to help, once I get in my studio, but in the meantime:

I didn't think there were traditional engravers left in the world in 2012! Or otherwise said: I think that you're planning on creating a notation software of some sort, which is brilliant as it goes! ^_^ Be back later on, since it's 06:47 over here and too early!

I think you've basically got it - I don't think there is an algorithm for the last case you mention (which is why Finale and Sibelius give the engraver control over those things.)

I also checked the Read manual, and he simply says to employ common sense in exceptional circumstances.

_________________________
"If we continually try to force a child to do what he is afraid to do, he will become more timid, and will use his brains and energy, not to explore the unknown, but to find ways to avoid the pressures we put on him." (John Holt)

But how do I pick stem lengths?From what I can see, I start with the 2 end notes - the note that'll have shortest length is my "anchor" and give it 3.5 space length, then the other notes' stems extend/shrink to hit the beam where they will. This note's stem CAN contract to 3 spaces if beam is within staff, or 2.5 if beam is outside staff.

But what if a note withIN the beam (not one of the 2 outside notes) is so short that it gets down to length 1 or 0 or negative??

Any engravers on here? I could REALLY use some help with this...

I think I got what you're saying.

In such cases you don't get the length of the stems from the two ends of the beam, but from the two 'shortest' (or 'longests') notes from the centre.

I'll provide a couple of extreme examples from Finale (and Sibelius just for comparison reasons), to see what I mean...

There we go:

and

As you can see there are restrictions, but they can be slightly bend (especially if outside the staff as you mention), but the anchor notes are not the end notes most of the times...

I should note that Finale and Sibelius use a different music font (maestro for Finale, not sure for Sibelius), so there are some changes.

I made the files using the same midi file, so they are identical. The thing is that both software have different ideas on how short the stem notes should be (in the third beam in particular) and whether the beam should be above or bellow the notes. Which is rather interesting. I get a feeling (but would need to confirm with the people in Sibelius (*ahem* Avid) that Sibelius chose to flip the beam, in order to be the same as the other three behind it... (just an assumption here).

Stephen, good luck in your endeavor. I'm curious about your project as well. If I may speculate a bit. I've heard good things about Lillypond, it supposedly generates the some of the best looking notation right out of the box. What I've seen posted looked pretty good to me. However, in trying Lillypond myself I found it impossible to use. Is your project developing a graphical front end for Lillypond? That could be awesome!

Music Notation: A Manual of Modern Practice (Crescendo Book) [Paperback]Gardner Read (Author)

That's the one. Written in the days before computer notation, but it was one of the standard manuals used by composers for quite a while. It's extremely practical, and goes into some detail regarding the idiosyncrasies of different instruments as well.

_________________________
"If we continually try to force a child to do what he is afraid to do, he will become more timid, and will use his brains and energy, not to explore the unknown, but to find ways to avoid the pressures we put on him." (John Holt)

Music Notation: A Manual of Modern Practice (Crescendo Book) [Paperback]Gardner Read (Author)

That's the one. Written in the days before computer notation, but it was one of the standard manuals used by composers for quite a while. It's extremely practical, and goes into some detail regarding the idiosyncrasies of different instruments as well.

You know what?

I got that book, with the assumption that it was for contemporary practices (not modern) and I was thoroughly dissapointed. (I use Kurt Stones book about contemporary notation). I'll have to reread Gardner's book I think!

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

argh!! I already had that Gardner Read book in hardcover and just realized I bought the paperback:( The cover looks too different between em - that is SNEAKY... Oh well, I've still got the digital one coming and have 3 other references. That'll hopefully do.