abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Triplet spacing too wide

Open davidrthorn opened this issue 7 years ago • 4 comments

Similar to #76 -- Triplet spacing is nearly indistinguishable from normal spacing. Ideally, three 1/8th note triplets would occupy the same space as two normal 1/8th notes. So the bar pictured here would have evenly spaced quarter notes.

screenshot 2019-01-31 at 15 37 36

I think I've found where this is set in the code. Would you be open to a pull request to add configuration for spacing of these groups or is that too niche to be worth incorporating into the API?

davidrthorn avatar Jan 31 '19 15:01 davidrthorn

I'm definitely open to pull requests.

In this case, I'd like to know what the "correct" spacing is and fix it for everyone. I don't think it is linear - that is, a half note doesn't take twice the space of two quarters, for instance.

I do want be pretty slow to add api that isn't supported by abcm2ps.

I don't yet support %%notespacingfactor but it is possible that it would do what you want.

paulrosen avatar Jan 31 '19 19:01 paulrosen

It's a good point. There is no correct spacing as such, but drumming notation tends to aim for spacing being determined by note value since it's rhythmically focused.

I've patched the tripletMultiplier value to suit my needs, but %%notespacingfactor looks like it would help a lot with drum notation.

I'm happy to have a go at implementing this once I get my head around the project code if you want (unless it's trivial for you to add)?

davidrthorn avatar Jan 31 '19 20:01 davidrthorn

I don't have time to tackle this right away but I can help guide you if you want. I'll also keep this on the top of my list when I do my next push.

paulrosen avatar Feb 08 '19 17:02 paulrosen

@davidrthorn eight note under triplet is longer than sixteenth note, I just don't understand this issue, to me 1/8 - (1/8 / (3/2)) = 0.0416, while 1/8 - 1/16 = 0.0625

It means that the difference between eight note and eight note under triplet is less that the distance between eight note and sixteenth note, so I don't think that there should be significant visual distance in such case. In many scores I can often see that the difference between the space after eight note and the space after sixteenth note is so little, so I don't understand why even bother with eights under triplets...

Guseyn avatar May 01 '23 22:05 Guseyn