grid drawing

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

spamatica
Established Member
Posts: 225
Joined: Mon Feb 08, 2010 10:38 am

grid drawing

Postby spamatica » Tue Nov 05, 2019 8:01 pm

Hi Tim, all,

There was some work earlier this year that changed the drawing of the raster in editors. I liked better the way it was drawn before as now lines are sometimes missing where it is actually possible to place a note (if we talk about the midi editors).

Through trial and error I discovered now that by adding the following magic value I can align it better with the way it was (so far as I have tested anyway).
But getting from there to finding the root cause I was hoping for some help... (as I'd rather not add a magic value unless necessary)

+++ b/muse3/muse/components/view.cpp
@@ -801,10 +801,11 @@ void View::drawTickRaster(

- const double rast_mapx = rmapx_f(raster);
+ /* const */ double rast_mapx = rmapx_f(raster);
int qq = raster;
int qq_shift = 1;

+ rast_mapx = rast_mapx * 4.0;
// grid too dense?
if (rast_mapx <= 0.01)

Tim E. Real
Established Member
Posts: 291
Joined: Sat Sep 15, 2012 12:36 am

Re: grid drawing

Postby Tim E. Real » Wed Nov 06, 2019 1:26 am

Hey hey.
Go ahead and change it.
Can you please leave the original lines intact but rem'd, with a little note saying why they were changed.
That way if I notice any trouble later I'll investigate more.

Thing is, those grids were a pain. It wasn't an exact science and I can't really remember or check ATM.
When to draw a line, when not to... It was tricky.

I remember a most difficult thing was that there is the decision on whether to draw a bar line vs. a beat line vs. anything else
which are three different colours and all three can be at the same place. There were some puzzles there, never fully worked out.
As a result you may occasionally see a blue beat line where there should be a grey bar line, or something like that.

The bottom line in those changes was preventing too dense grids when zoomed out, which was a problem before,
especially with Arranger and Wave Editor.
Another goal was absolute accuracy in alignment, also a problem before, lines were being drawn offside by +/- 1 etc.
Although that was dealt with in conjunction with View changes and how we round coordinates etc.

So as long as that's OK and the change works for you, go ahead.


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest