Commit graph

637 commits

Author SHA1 Message Date
David Robillard
606efb601c Show correct ghost hit for percussive tracks. 2014-12-28 20:23:52 -05:00
David Robillard
b54863c8c3 Set new note velocity based on surrounding notes. 2014-12-28 19:21:46 -05:00
David Robillard
4973ddc478 Fix events for short notes at region start/end. 2014-12-28 17:45:24 -05:00
David Robillard
6a73fd337c Update note colors when model changes. 2014-12-28 16:06:44 -05:00
David Robillard
49b7a46805 Fix potential memory errors with note player.
Seems unlikely, but if the event firing stuff is off, it could trigger the
issue (#5502) and/or a possible memory leak.
2014-12-24 16:54:38 -05:00
David Robillard
62355de33a Fix cursor update on nested entry.
For example, if you're in a note and something about the mode changes, it's the
underlying region context that needs to change.  So, seems we need a stack of
entry contexts to deal with this sort of thing.

Switching in/out of smart mode still doesn't update immediately because we
don't have the y-coordinate needed to update it.
2014-12-23 13:47:59 -05:00
Paul Davis
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
David Robillard
670938c8c4 Fix various cursor problems.
Add a new scoped cursor system that makes it much harder to screw up and end up
with stick cursors and so on.
2014-12-20 01:13:25 -05:00
Paul Davis
00887f94dc more color/modifier tweaks 2014-12-19 12:06:42 -05:00
David Robillard
6031308520 Use color modifiers for dynamic region styles. 2014-12-18 20:23:34 -05:00
David Robillard
a12a065457 Fix copy paste of MIDI and track automation. 2014-12-18 20:23:34 -05:00
David Robillard
026f7bf5b7 Make MIDI regions translucent for internal tools. 2014-12-18 20:23:23 -05:00
Ben Loftis
7ab8a11fb5 Enforce internal/external selection exclusivity. 2014-12-18 20:22:48 -05:00
David Robillard
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -05:00
nick_m
9af9e17adc Add editor selection state to session history via a SelectionMemento, which
combines selection related editor properties with the current editor selection.

The related editor properties are:
mouse mode,
zoom setting,
left frame of the canvas,
y origin of the canvas.

Selection state now includes region views (storing the underlying region id)
and time.

This patch also fixes a region mute undo bug.
2014-12-18 11:03:10 -05:00
David Robillard
5f66300349 Support stepping bank by shift+scroll/arrow. 2014-12-17 20:18:11 -05:00
David Robillard
d2cafbe95a Remove some aborts that don't really need to be.
Enforce PatchPrimaryKey sanity at the type level rather than attempting to
check for it everywhere.

Remove dead file.
2014-12-17 19:43:09 -05:00
David Robillard
6e912a0aa3 Fix display of MIDI notes/regions while recording.
Make record rect transparency configurable.

Factor out some copy-paste streamview code.
2014-12-17 18:41:23 -05:00
David Robillard
a706755710 Fix various MIDI locking issues.
Attempt to make mistakes much less likely in the future by statically requiring
caller to pass scoped locks where necessary.
2014-12-17 16:07:29 -05:00
David Robillard
da2043e179 Force ghost note positive in all circumstances. 2014-12-17 03:17:07 -05:00
David Robillard
5ee4a5d56a Don't allow drawing notes in rec regions (crash). 2014-12-17 02:50:45 -05:00
David Robillard
e0cb9efb00 Various color tweaks.
This commit changes some color names, nuke your theme.  This isn't quite ideal
yet, but takes some steps towards where I think things should go aesthetically:

Make automation tracks/regions colors correspond to their parent's type.

Make selected MIDI notes outlined in red like most everything else, and scrap
separate min/mid/max fill colors for selected MIDI notes.

Color automation ghost MIDI notes based on original note color.

Try to kill 90's looking brightish gray gradients in general.
2014-12-16 00:05:45 -05:00
Paul Davis
1ab2705b4b next modifier 2014-12-15 10:32:17 -05:00
Paul Davis
811677c543 fix incorrect item name for color 2014-12-15 09:05:01 -05:00
Paul Davis
56ca52651e fix up requested color names everywhere.
Thank <deity> for emacs ... space-uncamelcase-word-at-point FTW
2014-12-14 16:15:38 -05:00
Paul Davis
48a7a11974 initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
David Robillard
ee38c44109 Structure MIDI device selector by manufacturer.
Unfortunately we store the state of models as simply model, so if there's ever
duplicate model names, we're somewhat screwed, but this makes the (previously
unmanageably huge) menu usable, while retaining the "model name as global
identifier" state unmodified.
2014-12-13 00:37:34 -05:00
David Robillard
ec8c0e93bb Fix shift-rect-select with MIDI notes. 2014-12-07 17:30:06 -05:00
David Robillard
39da38dd6e Nudge notes by 1 bar if secondary modifier active.
Similar to how transpose moves an octave if the same modifier is active.
2014-12-06 22:43:06 -05:00
David Robillard
16d60ef2f7 Grab keyboard only with note selection.
When entered, the keyboard is grabbed when the selection becomes non-empty, and
ungrabbed if it becomes empty again or the region is left or the user switches
out of internal mode.

This fixes scroll in internal mode and note moving with arrow keys.  Also frees
up useful keybindings when there is no note selection, which is much nicer than
the "nothing works in edit mode at all" greedy grab approach used previously.

Attempt #874327892 of getting this damned grabbing right.
2014-12-06 22:43:06 -05:00
David Robillard
63082821d8 Support paste between automation lanes.
Also push the increasingly unwieldly paste parameters into a context object.

As with othe things, currently it is only possible to do "cross-type paste" by
explicitly selecting the target track.  We will need to get automation region
view selection working to do better here, but at least for now it's possible to
get the data over.
2014-12-06 12:20:52 -05:00
David Robillard
34fcf22476 Fix internal paste when selection has only points. 2014-12-06 10:26:25 -05:00
David Robillard
a65cd2a1b9 Make scroll work on MIDI regions when internal.
For some reason, grabbing the magic keyboard focus makes scroll stop working
regardless of what MRV::canvas_group_event() returns.  I can't figure out any
reason to grab the keyboard in this case anyway, so I just removed it.

Also simlify MRV event handling code in general.
2014-12-05 17:36:02 -05:00
David Robillard
0ffeaa6d6a Remove braindead Parameter inheritance abuse. 2014-11-30 23:56:20 -05:00
David Robillard
cf537b97f5 Add missing namespace qualifiers. 2014-11-30 23:56:19 -05:00
David Robillard
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
David Robillard
57c1b6e261 Fix quantization and other time-related ops. 2014-11-22 21:49:42 -05:00
David Robillard
bed95a64a0 Fix note resizing. 2014-11-22 15:33:40 -05:00
David Robillard
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
David Robillard
24f7eccc86 Factor out copy-paste code to get grid type in beats defaulting to 1. 2014-11-22 00:46:15 -05:00
David Robillard
41a9060df9 Move time converters only to the region views that actually need them.
A step towards sorting out time issues more solidly, the time situation of MIDI
region views and automation region views is slightly different.
2014-11-22 00:46:15 -05:00
David Robillard
563f5c11a6 Support cut/copy/paste of MIDI notes and controllers at the same time. 2014-11-16 22:35:45 -05:00
David Robillard
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
David Robillard
8793e60af2 Use symbol for paste operation like everywhere else. 2014-11-16 22:35:45 -05:00
David Robillard
3f8251962f Fix crash when splitting regions in internal edit mode. 2014-11-16 22:35:45 -05:00
David Robillard
31acd96384 Implement "multi-paste" for notes, regions, and automation.
The idea here is that pasting several times to the same location doesn't make
sense.  Instead, the paste is appended past the last paste, snapped to the
grid.  This make it simple to replicate a given section a number of times,
simply by copying once and pasting several times.

This behaviour only appears when successive pastes are done to the same
location (whatever the edit point is).  When the paste point changes, the
"multi-paste" state is reset.

Boots 'n cats 'n boots 'n cats.
2014-11-14 20:04:19 -05:00
David Robillard
31b6b05125 Fix MIDI note cut/copy/paste. 2014-11-14 20:04:19 -05:00
David Robillard
5d5d9cb9e2 Fix various sticky/broken cursor issues.
This still isn't quite right, but it's a lot less broken than before, at least.
2014-11-14 02:37:36 -05:00
David Robillard
3b23aed5e1 Fix error when create-dragging note backwards past start of region (#5934). 2014-11-14 00:31:28 -05:00
David Robillard
a733a2a4c5 Don't make MIDI regions in note mode completely invisible.
This makes for extremely confusing behaviour, particularly when creating new
regions.  This is still probably too transparent, IMO, but at least isn't
totally mysterious.  "visible" is a bit of a misnomer in the code, now.
2014-11-13 23:33:11 -05:00