summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.h
AgeCommit message (Collapse)Author
2016-11-23decouple midi region note range and height from midi streamview.nick_m
- this allows a midi region drag to update the visible notes correctly while crossing MIDI streamviews with a differing note range. as a side effect, fixes a bug where changing note range on a track did not draw some notes (apply_note_range redisplays the model).
2016-11-22NoteCreateDrag - remove some codenick_m
2016-11-19further to 1a6a72b57, handle deleting a note while a non-selected one is ↵nick_m
entered.
2016-10-15Note selection state uses note event_id_t.nick_m
2016-09-23Fix bug where drawing long notes placed the new note on the previous snap line.nick_m
- NoteCreateDrag already applies this shift, so it was always applied twice to the note start frame.
2016-08-31MidiRegionView uses quarter note snapping.nick_m
- also ensures poiinter ghost note respects the snap modifier.
2016-07-22Remove the temporary note group in MidiRegionView, update start trim during ↵nick_m
drag.
2016-07-10remove reference "const int32_t&" -> const int32_t"Robin Gareus
this simplifies lua-bindings and also let's the compiler worry about constant primitive types.
2016-07-10Paste uses exact beats. rework _start_beats calculation in copy-with-offset ↵nick_m
ctor.
2016-02-11Fix bug #6762, MIDNAM note read outs don't work when dragging MIDI noteTim Mayberry
Also fixes it so the key is selected in the piano roll header
2016-01-14Change handling of Midi note selection to eliminate signal emission/delays.Tim Mayberry
Each MidiRegionView(MRV) is connected to the Selection::ClearMidiNoteSelection signal that is used to notify the all MRV instances to clear their note selection. The MRV class also has a private static SelectionCleared signal that is used to signal other MRV instances when their selection has been cleared. When the Selection::ClearMidiNoteSelection signal is emitted it causes each MRV to also emit the SelectionCleared signal. So the emission takes quadratic time. With 1500 MRV instances emission takes about 2.2 seconds on my machine, and some operations like track selection cause it to be emitted 3 times(another issue). The Selection class in the Editor knows which MRV instances have note selections, as it is notified by MidiRegionView whenever the selection count becomes zero or becomes non-zero. Clearing the Note selection should then just be O(N) and direct calls can be used rather than signals. This change removes both the signals and uses the existing references between Selection and MRV class to control note selection. There should be no behavioural changes in Midi note selection with this change.
2016-01-12Hide MIDI ghost note when over existing note.André Nusser
2015-10-17Replace static PBD::Signal in NoteBase with direct call to MidiRegionViewTim Mayberry
NoteBaseDeleted signal is static so each MidiRegionView(MRV) gets notified about the deletion of each NodeBase instance even if it is contained in another MRV The NoteBase and MRV classes are currently coupled anyway, so this change uses the reference to the MRV parent to directly call the parent when the NoteBase is deleted. This is all in the GUI thread so I'm not sure why a PBD::Signal was being used? If the MRV class is the only reference holder to the NoteBase class then I'm not sure if a callback is needed, perhaps the MRV should just remove the note from the selection before deleting it but I'm not that familiar with the code. Signal emission/calls static NoteBaseDeleted signal vs direct with 10540 NoteBase instances. static: After Load Session: 6360638 After Unload Session: 12221026(5860388) direct: After load Session: 10540 After unload Session: 21080 Session Load/Unload time in master, debug/release with ~10000 Notes(seconds) Load Debug: 32, 26 Unload Debug: 83 Load Release 32, 20, 42 Unload Release 26, 25 Session Load/Unload time with direct call debug/release(seconds) Load Debug: 21.7, 18.1 Unload Debug: 69.4, 71 Load Release: 22.6, 13.4, 17.7 Unload Release: 24, 23.5 This is not a large Session, 1500 regions, 10000 notes so there is probably some other funky stuff going on that needs fixing.
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-08-15cont'd work on piano roll highlighting.Robin Gareus
2015-05-23Fix inverted logic of SnapOff with snap modifiers pressed.nick_m
- also clean up, rename and comment some previous hanges.
2015-05-22Make note drags and resizes obey the disable sanp modifier.nick_m
2015-05-22More cleanupnick_m
- remove "no_magnets" ugh.
2015-05-17Relative snap - support magnetic mode (hackishly for now)nick_m
2015-05-16Relative snapnick_m
2015-03-14Only sound selected notes momentarily (#6142).David Robillard
This is debatable, the "sustained until mouse release" behaviour is handy sometimes, but this way seems like what most people probably want. Also, this "fire it and forget it and let it delete itself a bit later" thing with MidiPlayer makes me nervous. I guess it's unlikely someone manages to select a note then delete a track within 100ms, but, well...
2015-01-12Fix crash when undoing note delete.David Robillard
2015-01-11Fix AutomationTrackItem rubberband click thinking it was unhandled.nick_m
Fix several other cases where a single mouse click could cause several (not nested) selection ops. Fix missing selection memento for midi notes and midi commands. Rename some variables. Fix random style issues.
2015-01-07MusicalTime => Beats.David Robillard
2014-12-30Fix display of MIDI while recording.David Robillard
... almost. There are some artifacts when you zoom out while recording that I can't figure out, but whatever. Also fix performance issues caused by last attempt at rec display while zoom.
2014-12-28Show correct ghost hit for percussive tracks.David Robillard
2014-12-28Set new note velocity based on surrounding notes.David Robillard
2014-12-24Fix potential memory errors with note player.David Robillard
Seems unlikely, but if the event firing stuff is off, it could trigger the issue (#5502) and/or a possible memory leak.
2014-12-23Fix cursor update on nested entry.David Robillard
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-20Fix various cursor problems.David Robillard
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-18Use color modifiers for dynamic region styles.David Robillard
2014-12-18Make MIDI regions translucent for internal tools.David Robillard
2014-12-18Enforce internal/external selection exclusivity.Ben Loftis
2014-12-17Support stepping bank by shift+scroll/arrow.David Robillard
2014-12-17Remove some aborts that don't really need to be.David Robillard
Enforce PatchPrimaryKey sanity at the type level rather than attempting to check for it everywhere. Remove dead file.
2014-12-17Don't allow drawing notes in rec regions (crash).David Robillard
2014-12-06Nudge notes by 1 bar if secondary modifier active.David Robillard
Similar to how transpose moves an octave if the same modifier is active.
2014-12-06Grab keyboard only with note selection.David Robillard
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-06Support paste between automation lanes.David Robillard
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-11-22Wrap MusicalTime in a class.David Robillard
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-22Factor out copy-paste code to get grid type in beats defaulting to 1.David Robillard
2014-11-22Move time converters only to the region views that actually need them.David Robillard
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-16Support cut/copy/paste of MIDI notes and controllers at the same time.David Robillard
2014-11-14Implement "multi-paste" for notes, regions, and automation.David Robillard
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-14Fix various sticky/broken cursor issues.David Robillard
This still isn't quite right, but it's a lot less broken than before, at least.
2014-06-22more canvas refactoring.Paul Davis
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it could theoretically be used by any derived type.
2014-06-21use newly factored canvas in gtk2_ardourPaul Davis
2014-06-09substantial changes in color management, involving a reduction in the use of ↵Paul Davis
Gdk::Color and more consistent logic for region coloring. Group tabs now also get the text drawn in an appropriately contrast-y color
2014-06-03fix two mysterious problems with stdint typesPaul Davis
2014-03-06trivial API change for MidiRegionView::update_hit()Paul Davis