Now it lets you scroll while playing and follow playback
mode is selected and the play position is before the
current edited block.
Blocks that do not start at zero now auto scroll correctly.
A stupid error in namecb was fixed. Caused segfaults when
changing track names.
Move the split tool from block to block vertically
was not working if it did not pass through empty space.
Now it does.
Split and join generated random colors for the blocks.
Now they dont.
Undo and redo are activated with control z and
control r, and cannot be remapped yet.
It certainly will fail and eventually crash if
you fool with layers. I also got it to crash
when doing heavy editting in the piano roll.
Undoing recorded commands is currently klunky
and unusable.
Added edit icon. Edit mode is the default mode.
Added color icon. The color tool changes block colors.
Added fork icon. The unclone tool hard-copies blocks.
I made some adjustments to includes in some files
that did not need to know about the UI. Changing
the GUI at this time causes almost all the files
to be recompiled, and it is starting to take too
long.
Arranger, event editor, and piano roll have faster
drawing by not drawing stuff outside the clip region.
The program was slowing down on a large midi file.
I had to use the layout method to update the
scrollbar on resize window. This required the
kludge variable. Hopefully this does not lead
more terrible effects.
The problem was that giving fltk drawing commands
that are very far negative will have the effect of
wrapping around. Fixed by not giving coordinates
that are very large negative.
It now acts like the old scroll bar from the scrollgroup.
I added a layout function to the arranger which serves
as the only way that widgets will get updates about the
window resizing. It required a kludge similar to the
scrollgroup. The fact that the magic kludge value is 2
rather than 4 means the current scheme is twice as good.
The good news is that the graphical gliches are gone
and the layout kludge is obliterated. The bad news
is that you cannot scroll in the song editor.
The point of this branch is to replace both the
song_scroll and pattern_scroll fltk::ScrollGroups
with two scroll bars which simply control the widgets
using their callback.
The resulting sanity will make the graphical problems
trivially evaporate.
The scroll group widget is beyond repair. I tried
my best to make it do what it should be doing by
using kludges and an almost trivial subclass. The
bottom line is that the scroll group widget is broken.
Details: When the scroll group is manipulated, it does
not call its own callback. It does call relayout on
its children. However, when the window is maximized,
the scroll group itself does not fully relayout itselt
correctly. In corrects itself if it scrolls twice more.
In some circumstances the scroll group will get caught
in a strange loop if the children are at the very edge
of the scrolling region, and fooling with it enough
will fix it, but it is still broken. In this program,
maximize, scrollTo, and other factors lead to graphical
breakage.
The scroll group widget will be dumped in a new branch
soon. It will be replaced with two scroll bar widgets
that simply use the regular callback api, which the
scroll group should be doing, and control the main
canvases just like layout was controlling the timelines,
event editor, virtual keyboard, and track info.
Conflicts:
src/ui.cpp
The file branch introduced the following changes.
Standard midi files are now importable, more or
less. Track names are use as... track names. Text
events are appended to the song info. Initial
tempo change events are used as the song tempo.
More work needs to be done when loading midi files
that do not put all events for a channel on one
track. Currently those events are removed. This
will be fixed later.
The text file format for songs was changed, for
the better, in a backward incompatible way. There
is now a header with magic numbers so that
accidentally opening a foreign file will not crash.
Event duration is no longer stored in the file.
Time, in ticks, is stored as delta ticks rather
than absolute ticks. There is a version field in
case a future change needs to be made to the format
that will render it incompatible. Hopefully this
does not happen for a long time.