Feature request: save state of zoom settings and (vertical) scrollbar in editors

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

User avatar
electrocoder
Posts: 2
Joined: Tue Apr 30, 2019 9:14 pm
Location: Hamburg, Germany

Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby electrocoder » Tue Apr 30, 2019 11:55 pm

I work much with the pianoroll editor. Almost always I start by changing zoom settings (increase zoom level) when fine-tuning event positions and sizes. For tracks with very high or low notes I also sometimes have to scroll vertically to find the events at all then. This basically works. But unfortunately, whenever I close the pianoroll editor and reopen it on another part (or the same one), it opens with default zoom levels and vertically centered again. Zoom + vscroll state is not kept. Only window positions and sizes are kept + saved.

It would be perfect if the zoom and vscroll state settings could be maintained per track and saved in .med files. However, since I suspect this being not that easy to achieve, keeping the state of zoom and vertical scrollbar just during the session would be rather helpful already.

Of course, when working on saving GUI state, saving the current selection of custom controller views added in the pianoroll editor would be welcome as well. Though I'd consider this a little less easy to achieve and important.

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

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby Tim E. Real » Wed May 01, 2019 1:22 am

Hi, I have been looking into this since another user has requested it. Been super busy with latency correction branch though...
But it is near the top of my mind though because true, it is annoying.
We currently save the position and size only. It can be seen that these are carried over to any new window opened.

If I recall correctly (can't quite remember ATM) we use QSettings features for that, and I was looking at
whether we could store these other desired settings.
Otherwise we have to find a different way to carry the desired settings over.

Tim.

alex stone
Established Member
Posts: 171
Joined: Fri Jun 06, 2008 7:39 am

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby alex stone » Wed May 01, 2019 1:53 pm

Yes, this would be very nice. Sorting out the zoom levels each time i open the window is a major time consumer.

Alex.

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

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby Tim E. Real » Wed Oct 09, 2019 7:39 am

Ehm... hey there! Progress!

I wanted to start by at least experimenting with increasing the default vertical zoom level.
But the value which controls this had no effect regardless of what I put there.
Whoa... took me a few days to figure out why. No wonder no one's tried it yet.

Hopefully this is a good first step for y'all.
I have increased the vertical zoom by one step.
Stay tooned...

ChangeLog:

Code: Select all

      - Pianoroll Editor: Increased default vertical zoom level from 1 to 2.
        Was challenging. The global variable 'yscale' in pianoroll.cpp had no effect
         no matter what I put there. Fixed class ScrollScale (the slider!), had a
         problem with the initial scale. Replaced its curious successive approximation
         log() code with an actual log10() call, rounded up! Tested OK.

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

[DONE]: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby Tim E. Real » Fri Oct 11, 2019 7:02 am

In github master now.

Check it out!

Open a piano roll editor on a part.
Adjust vertical zoom and scroll position, and horizontal zoom, and add some controllers to the view, as desired.
Now close the window.
Now open an editor on the part again.
Settings should be preserved.
Opening further windows on that part keeps the settings.
It will keep the settings from the last active window. Similar to how our size is kept depending on the last active window
It works with multiple parts open in one editor as well.

Opening further windows on another part starts with fresh, default settings.
It operates on a per-part basis, for now.
If you want to affect more than one part's settings, for now just select all of them and open them in one editor,
and fiddle with the settings. It will store the settings in all the open parts.

I believe this is in general what everyone has been waiting for since... day one. N'est pas?

TODO: Fix horizontal scroll position not keeping setting. Support Drum Editor as well. A few teaks and fixes perhaps...

Cheers, ye Musers.
Tim.

From ChangeLog:

Code: Select all

        Midi Editor now keeps state (zoom, pos, controllers) after closing:
        Works on a per-part basis: Whatever you set on a part it remembers.
        Pianoroll Editor is done, tests OK. TODO: Drum Editor.

oscillator
Established Member
Posts: 30
Joined: Sat Jan 17, 2015 6:07 pm

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby oscillator » Fri Oct 11, 2019 7:50 am

Tried it out -- works awesome!

This will save a lot of time and improve the overall feeling of my workflow.

Big thanks!

/Staffan

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

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby Tim E. Real » Sun Oct 13, 2019 11:11 pm

In git master now:
- Improvements to 11.10. Fix accuracy problems (re)storing view state.
Horizontal zoom and position were drifting with each new opened window.
Tested rock solid so far, saving and restoring views.

Drum Editor is done as well.

Took me two days to find a line in class ScrollScale::mag2scale()

Code: Select all

scale_val = - ( int ( 1.0 / scale ) );

and change it to:

Code: Select all

scale_val = floor ( 1.0 / ( -scale ) );


Normally that would not have been required.
But the unique, ingenious nature of some of our controls representing fractional values
with negative numbers required this particular fix. Tested OK so far.

Note: About the horizontal scroll position:
I was going to save the state of the horizontal scroll position as well.
But I discovered that there was already a feature which manipulates the position,
but it was broken. So I fixed it. :)
:!: The feature is this:
There is a little black vertical line on the timescale bar. It follows your mouse movements.
Double-clicking on a part opens the part in an editor, already scrolled at the black line's position.

Unlike the horizontal zoom, and vertical zoom and scroll position, I felt this feature was more important
than remembering the horizontal scroll position of the last window you had open.
A strong argument is this:
Suppose you have one long part, the entire length of a track.
If you scroll the Arranger to a new place, and double-click on the part, do you really want the new window to
open at the scroll position of the last window you had open?
No, it is more likely you would find it convenient that the window opens at a scroll position
where you clicked on the part (the little black line).

If you have any strong arguments to save the position instead, present them :wink:

Try it out, lemme know what you think.
TODO: I could try to expand on this and save the heights of the controller graphs.
TODO: The mixer strip on the left does not keep it's width for the next opened window unless it is closed first.

oscillator
Established Member
Posts: 30
Joined: Sat Jan 17, 2015 6:07 pm

Re: Feature request: save state of zoom settings and (vertical) scrollbar in editors

Postby oscillator » Mon Oct 14, 2019 8:35 am

Works fine at my end! Thanks!


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest