13
0
Commit Graph

667 Commits

Author SHA1 Message Date
nick_m
ea8b5a970f Bring back contrained drag modifier with preference setting.
- this should work as before, but when applied to a button 1 drag,
	  the constraint is in the first direction travelled.
2015-05-23 05:36:03 +10:00
nick_m
3d599be991 Fix missing comment. 2015-05-23 03:44:42 +10:00
nick_m
88477ace25 Fix inverted logic of SnapOff with snap modifiers pressed.
- also clean up, rename and comment some previous hanges.
2015-05-23 03:09:48 +10:00
nick_m
784abd03e0 Make note drags and resizes obey the disable sanp modifier. 2015-05-22 06:54:16 +10:00
nick_m
65e06fa350 More cleanup
- remove "no_magnets" ugh.
2015-05-22 04:26:16 +10:00
nick_m
c359f881a1 Relative Snap -make it activated by the tertiary modifier during drag.
Disabled/enabled with the shift key. no config stuff at all now.
	Move existing (strange) trim feature to primary + tertiary modifiers.
2015-05-17 23:47:01 +10:00
nick_m
91a34c596d Relative snap - support magnetic mode (hackishly for now) 2015-05-17 04:26:05 +10:00
nick_m
68a8330afc Relative snap 2015-05-16 04:15:52 +10:00
c9023ae73d Fix mute of MIDI tracks with channel forcing.
This moves MIDI channel filtering into a reusable class and moves filtering to
the source, rather than modifying the buffer afterwards.  This is necessary so
that the playlist trackers reflect the emitted notes (and thus are able to stop
them in situations like mute).

As a perk, this is also faster because events are just dropped on read, rather
than pushed into a buffer then later removed (which is very slow).

Really hammering on mute or solo still seems to produce stuck notes
occasionally (perhaps related to multiple-on warnings).  I am not yet sure why,
but occasional beats always.
2015-03-29 00:51:56 -04:00
74b3d0b602 Drag/Drop work-around midi note bleeding
During DnD, the region uses the 'old/current'                                                                                                                                                                                                
midi_stream_view()'s range and its position/height calculation.

Ideally DnD would decouple the midi_stream_view() for the
region(s) being dragged and set it to the target's range
(or in case of the drop-zone, FullRange).
but I don't see how this can be done without major rework.

For now, just prevent visual bleeding of events in case
the target-track is smaller.
2015-03-28 18:22:37 +01:00
nick_m
1580c6d635 Fix some strings incorrectly marked for translation.
My apologies to translators.
2015-03-25 23:31:23 +11:00
b72fc759c0 Only sound selected notes momentarily (#6142).
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-03-14 01:12:29 -04:00
700cb13b36 Fix note visibility (#0006168). 2015-03-13 22:30:11 -04:00
a8aae56d92 Handle edits while playing precisely.
This avoids stuck notes if active notes are edited, but without stopping all
active notes in the region on any edit as before.

This implementation injects note ons in places that aren't actually note
starts.  Depending on how percussive the instrument is, this may not be
desired.  In the future, an option for this would be an improvement, but there
are other places where "start notes in the middle" is a reasonable option.  I
think that should be handled universally if we're to do it at all, so not
considering it a part of this fix for now.
2015-03-05 17:30:31 -05:00
232d67bc53 midi note paste undo fix. 2015-01-25 01:56:19 +01:00
8565470797 Fix hidden notes at trimmed region start. 2015-01-16 14:52:40 -05:00
nick_m
ade1c4923c Fix note resize double undo bug.
Newly drawn notes are selected.
Clear midi note selection on Selection::set_state().
2015-01-17 04:55:05 +11:00
nick_m
5ef868e767 Don't reuse _optimization_iterator - fixes crash on multiple note delete undo. 2015-01-13 22:52:02 +11:00
305af7a5ce Fix whitespace. 2015-01-12 02:06:40 -05:00
ba9a90b927 Merge duplicated code. 2015-01-12 02:06:40 -05:00
4438263d4d Fix crash when undoing note delete. 2015-01-12 02:03:49 -05:00
nick_m
44203ce955 Fix AutomationTrackItem rubberband click thinking it was unhandled.
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-11 04:07:31 +11:00
8d98102573 Fix show MIDI regions using track color. 2015-01-08 19:59:40 -05:00
57947ff5a8 Prevent note trim to zero length (shown as stuck).
The reasonable value 1 tick doesn't seem to work here, presumably it gets lost
in rounding conversion somewhere.  Instead use a really small power of two
reciprocal.  Once we use actual beats and ticks we can fix this to be a minimum
of one tick (the actual minimum length for a note).
2015-01-08 19:13:00 -05:00
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
2c8babf41e Fix stuck note display while recording.
This doesn't make sense, but I'm okay with that.
2014-12-30 20:06:37 -05:00
e82ce75cb1 Fix display of MIDI while recording.
... 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-30 19:16:41 -05:00
937cf046a4 Fix key bindings for note trim/extend. 2014-12-29 20:50:39 -05:00
3d1f955a0c Fix MIDI recording display when zoom/etc changes. 2014-12-29 18:56:39 -05:00
d283608fe9 Automation ghost notes for percussive hits. 2014-12-28 21:31:33 -05:00
606efb601c Show correct ghost hit for percussive tracks. 2014-12-28 20:23:52 -05:00
b54863c8c3 Set new note velocity based on surrounding notes. 2014-12-28 19:21:46 -05:00
4973ddc478 Fix events for short notes at region start/end. 2014-12-28 17:45:24 -05:00
6a73fd337c Update note colors when model changes. 2014-12-28 16:06:44 -05:00
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
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
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
00887f94dc more color/modifier tweaks 2014-12-19 12:06:42 -05:00
6031308520 Use color modifiers for dynamic region styles. 2014-12-18 20:23:34 -05:00
a12a065457 Fix copy paste of MIDI and track automation. 2014-12-18 20:23:34 -05:00
026f7bf5b7 Make MIDI regions translucent for internal tools. 2014-12-18 20:23:23 -05:00
7ab8a11fb5 Enforce internal/external selection exclusivity. 2014-12-18 20:22:48 -05:00
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
5f66300349 Support stepping bank by shift+scroll/arrow. 2014-12-17 20:18:11 -05:00
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
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
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
da2043e179 Force ghost note positive in all circumstances. 2014-12-17 03:17:07 -05:00
5ee4a5d56a Don't allow drawing notes in rec regions (crash). 2014-12-17 02:50:45 -05:00
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
1ab2705b4b next modifier 2014-12-15 10:32:17 -05:00
811677c543 fix incorrect item name for color 2014-12-15 09:05:01 -05:00
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
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
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
ec8c0e93bb Fix shift-rect-select with MIDI notes. 2014-12-07 17:30:06 -05:00
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
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
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
34fcf22476 Fix internal paste when selection has only points. 2014-12-06 10:26:25 -05:00
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
0ffeaa6d6a Remove braindead Parameter inheritance abuse. 2014-11-30 23:56:20 -05:00
cf537b97f5 Add missing namespace qualifiers. 2014-11-30 23:56:19 -05:00
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
57c1b6e261 Fix quantization and other time-related ops. 2014-11-22 21:49:42 -05:00
bed95a64a0 Fix note resizing. 2014-11-22 15:33:40 -05:00
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
24f7eccc86 Factor out copy-paste code to get grid type in beats defaulting to 1. 2014-11-22 00:46:15 -05:00
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
563f5c11a6 Support cut/copy/paste of MIDI notes and controllers at the same time. 2014-11-16 22:35:45 -05:00
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
8793e60af2 Use symbol for paste operation like everywhere else. 2014-11-16 22:35:45 -05:00
3f8251962f Fix crash when splitting regions in internal edit mode. 2014-11-16 22:35:45 -05:00
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
31b6b05125 Fix MIDI note cut/copy/paste. 2014-11-14 20:04:19 -05:00
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
3b23aed5e1 Fix error when create-dragging note backwards past start of region (#5934). 2014-11-14 00:31:28 -05:00
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
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00
b73f725676 remove mouse zoom mode; bind z to zoom-to-range 2014-10-21 12:47:53 -04:00
f369208334 Disallow midi-note duration changes beyond region boundaries
Fixes crash/assert with negative Beats.

TODO discuss alternative:
 automatically extend/trim region (if possible) or
 accept but hide notes that are out of bounds. That would need
 some solution for ghost notes which still can have negative Beats
 while dragging.
2014-10-21 15:48:11 +02:00
148c1f1768 fix stuck key-grab/scrolling.
Problem: mouse-scrolling over a MIDI region in internal edit mode
never released “magic widget focus” (mod keys and global scrolls after
that were ignored). -> added to leave_notify.

Also, the MouseModeChanged signal needs to be emitted when internal edit,
mode changes in order to trigger MidiRegionView::mouse_mode_changed(), 
which in turn releases the magic focus while still hovering over a MIDI
region.
2014-10-21 11:07:53 +02:00
a9532179d5 Midi Region: pass unhandled scroll events to regionview
see note in MidiRegionView:📜 “allow PrimaryModifier scroll
through so that it still works for zoom.”
2014-10-21 11:01:28 +02:00
1f313ec19c Vertically align Midi Notes, Piano Roll & Canvas Line Grid 2014-09-08 18:44:32 +02:00
4e689d9496 use new TrackingText for verbose cursor 2014-06-26 15:10:24 -04:00
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
6a5d805b38 more canvas refactoring.
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-22 11:41:05 -04:00
0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
ce08ec0de0 substantial changes in color management, involving a reduction in the use of 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-09 23:29:00 -04:00
dbaf203bac fix ridiculous spelling error 2014-04-15 12:44:49 -04:00
279aefc60e fix error in height computation of MIDI region views (FUDGE!) use Rectangle::set_outline_all() and avoid the removed integer version of ::set_outline_what() 2014-03-11 07:39:25 -04:00
41c4c41eaa fix apparent logic error for MidiRegionView when redisplaying note model 2014-03-06 23:16:42 -05:00
feebabb330 trivial API change for MidiRegionView::update_hit() 2014-03-06 13:27:51 -05:00
3bbbf56718 passthrough unhandled motion events in MIDI region views because we may be dragging non-note objects like patch changes 2014-02-11 22:46:21 -05:00
7eb40ae6c8 slight code replacement 2014-01-20 10:52:27 -05:00
934e827420 fix non-editing/non-draw event handling by MIDI regions 2014-01-16 10:53:02 -05:00
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
4f9e46976c make middle-click on piano roll track header more usefully select/unselect notes 2013-10-23 10:38:50 -04:00
5da78cea9a 'gtk2_ardour' - Use 'const_iterator' where appropriate, instead of 'iterator' 2013-10-03 09:52:39 +01:00
f8574fc39d 'gtk2_ardour' - Add namespaces + casting where necessary + general bits of 'correctness' to keep MSVC happy 2013-10-03 09:06:56 +01:00
e2f0c5f91e merge resolution with master 2013-05-02 20:21:54 -04:00
3973ce81b3 remove all of Gtk::Window::set_position (WIN_POS_MOUSE) for anything deriving from ArdourDialog or ArdourWindow; move the set_position() call into those classes' constructors, so that they are called before the windows are realized, and thus it actually works 2013-05-02 18:13:35 -04:00
7de31d5a41 use virtual bool canvas_group_event () in TimeAxisViewItems to get suitably delegatable/inherited event handling 2013-04-25 16:06:12 -04:00
96eee9e7a1 change UIConfig to use accessor/setter methods like RCConfig so that ParameterChanged methods can actually be emitted; add variable (over a small range) background shading for all TimeAxisViewItems 2013-04-16 23:46:22 -04:00
e3db2d3ca5 partially fix scaling issues with pathological MIDI regions (e.g. 15k notes per region), particularly during loading. more to be done, perhaps, for editing purposes where we redisplay the entire model after a change 2013-04-16 09:25:53 -04:00
7e19053b88 Fix dragging objects on the canvas and remove redundant canvas groups
Delivery of fake motion events to the editor needed the event coordinates to be
in canvas space, as they are with "real" events. Editor and other objects had
many redundant groups from timbyr's work on gnomecanvas to scroll by moving
groups. We don't need this anymore with cairo-canvas (though possibly a
stationay background group for the canvas might be useful again one day as in
the SAE logo. Its implementation would be fairly different though, since we
would have to explicitly move the group on every scroll, since nothing else
ever moves on scroll).

Also tweaks to text item placement, and switch TimeAxisViewItem from
name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized".
2013-04-15 13:50:05 -04:00
b05968fb4e change frames_per_pixel to samples_per_pixel 2013-04-12 11:31:50 -04:00
4258a34912 change all frame_to_pixel and pixel_to_frame to sample_to_pixel and pixel_to_sample 2013-04-12 11:15:45 -04:00
1fda7b293a fix up positioning of verbose cursor if it is too close to the bottom of the canvas (for MidiRegionView) 2013-04-11 20:01:14 -04:00
19bd641915 commit immediately post linking 2013-04-04 18:45:27 -04:00
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00
4abbabdcf9 Squashed commit of the following:
commit fdbae82077db53add90df7448a06869dac89acc6
Author: Paul Davis <paul@linuxaudiosystems.com>
Date:   Wed Mar 27 21:45:28 2013 -0400

    mammoth changes in basic signal flow, total redesign of MIDI channel filtering and more.

commit 59343a8283698e02bc0f622313b29e98f449e4c8
Author: Paul Davis <paul@linuxaudiosystems.com>
Date:   Wed Mar 27 01:58:53 2013 -0400

    initial working version after changes to MIDI channel filtering. may affect metering input too. testing not yet finished

this commit merges many deep changes in ardour's internal architecture,
combined with a total redesign of how MIDI channel filtering works.

data in a track used to flow from JACK port buffers to diskstream's ringbuffers
and was then copied from the ringbuffers into a BufferSet for use during
Route::process_output_buffers(). The butler thread would handle the movement of
data between the ringbuffers and disk.

with this commit, data now flows from JACK port buffers into the BufferSet used
for Route processing, and is copied from the BufferSet into the diskstream's
ringbuffers (the butler thread continues to handle interactions with disk as
usual).

this change allowed a dramatic consolidation of code and simplification of most
aspects of Track/Route::roll() and Track/Route::no_roll(). in particular, see
Route::fill_buffers_with_input() which now concisely describes how we move data
from JACK port buffers into the BufferSet for all Route types (including Tracks).

this work was initially motivated by changing MIDI channel filtering so that we
can process capture and playback independently. there is now a very clean
pathway for this - see MidiTrack::roll() (NOTE: This needs implementing in the
no-roll case too - a TODO item).

the channel selector for MIDI tracks has been moved out of the track header and
is now accessible via the context menu. more work is likely here, to make it
(more) obvious to the user when filtering is going on.
2013-03-27 21:50:18 -04:00
2586dacf5b Trim the include tree a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@13941 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-21 07:24:42 +00:00
58d0fa7240 Fix whitespace.
git-svn-id: svn://localhost/ardour2/branches/3.0@13935 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-21 01:08:43 +00:00
1ae6d82674 Use rectangle intersection for MIDI note rect select.
git-svn-id: svn://localhost/ardour2/branches/3.0@13933 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 19:39:51 +00:00
7f769b06f0 More consistent verbose cursor label style for PC flags.
git-svn-id: svn://localhost/ardour2/branches/3.0@13928 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 09:00:53 +00:00
4e6d0c9e61 Show matching controller name in automation lane header.
Completely eliminate static MIDI controller name code.
Reduce dependency on midnam_patch.h (which would have saved me several hours if I did it earlier).
Store controller name numbers as an integer.
Keep controller names in a map keyed by int instead of a list for fast lookup.
More cleanup of MIDI::Name code.


git-svn-id: svn://localhost/ardour2/branches/3.0@13927 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 08:56:00 +00:00
bade953de3 Fix crash on verbose note text in regions with no patch changes.
... I think.  Not sure precisely, conditions were fuzzy, I just tortured my
mouse button until I could reproduce it.


git-svn-id: svn://localhost/ardour2/branches/3.0@13921 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 04:52:42 +00:00
411dd7566f Fix completely wrong MidiRegionView::get_patch_key_at().
This fixes the note name displayed at a given time to be based on the correct program at that time, and not one in the future.

git-svn-id: svn://localhost/ardour2/branches/3.0@13912 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 02:31:41 +00:00
88de45b7cc Support note names from midnam files (tested with the DM5).
Do this via a simple MasterDeviceNames::note_name() function.  The same really
needs to be done for program names, this stuff is absolutely brutal to use.

Store note names in a vector indexed by number instead of a list with string
"numbers" for reasonable lookup time.

Make some references const that should be.


git-svn-id: svn://localhost/ardour2/branches/3.0@13908 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 00:46:55 +00:00
444d89b669 Set MIDI device mode to the first by default if unset.
Give up trying to hide mode selector when it's useless.
Fix display of program names for default mode.
Abstract out (non-crashy) MidiTimeAxisView::get_device_names().


git-svn-id: svn://localhost/ardour2/branches/3.0@13903 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 20:15:15 +00:00
fc77ae0738 Replace a bunch of potential crashes with graceful handling of the situation.
We really need some kind of more sophisticated assert macro that can be
switched to non-fatal logging mode for release builds.  A log message, which is
often all that would happen, is a lot better than a trainwrecked performance...


git-svn-id: svn://localhost/ardour2/branches/3.0@13892 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 07:00:43 +00:00
76d85fb411 add Delete button to patch change dialog when editing it
git-svn-id: svn://localhost/ardour2/branches/3.0@13710 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-22 18:27:33 +00:00
2b8fc2a43b keep velocity value visible in verbose cursor until we leave a note (fixes #5085)
git-svn-id: svn://localhost/ardour2/branches/3.0@13687 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-19 20:31:30 +00:00
Hans Baier
6177205398 Make input filtering while recording work in GUI, too
git-svn-id: svn://localhost/ardour2/branches/3.0@13244 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-11 06:32:09 +00:00
Hans Baier
9bdde56860 make sysex contents appear as verbose_cursor for visual feedback the flag as been entered and for readability
git-svn-id: svn://localhost/ardour2/branches/3.0@13240 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-11 04:05:22 +00:00
Hans Baier
3647a55f28 fix bug: sysexes x position not relative to region
git-svn-id: svn://localhost/ardour2/branches/3.0@13239 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-11 03:40:39 +00:00
Hans Baier
97c23848d7 implement deleting of sysex events
git-svn-id: svn://localhost/ardour2/branches/3.0@13238 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-11 03:22:17 +00:00
9816ed02c7 use correct event struct when handling key events in patch changes, and flip semantics for next/prev bank so that the direction in numerical terms matches next/prev patch (i.e. up arrow goes to higher numbers)
git-svn-id: svn://localhost/ardour2/branches/3.0@13043 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-15 14:43:38 +00:00
Carl Hetherington
49a32910c5 Patch from tophatdave to prevent exit from note edit
mode on double-click with a modifier held down;
prevents creation of malformed notes (#4664).


git-svn-id: svn://localhost/ardour2/branches/3.0@12929 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-25 21:19:06 +00:00
70e45046bb put patch chnage dialog under the mouse cursor when it appears
git-svn-id: svn://localhost/ardour2/branches/3.0@12914 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-24 12:56:56 +00:00
e1bb03bba4 don't swallow left/right scroll events in a midi region view when in internal edit mode, fixes #4555
git-svn-id: svn://localhost/ardour2/branches/3.0@12822 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-22 17:35:41 +00:00
aea9601307 really, really do not signal MidiRegionView::SelectionCleared during destruction
git-svn-id: svn://localhost/ardour2/branches/3.0@12783 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-19 14:15:02 +00:00
2863640a52 make it possible for canvas patch changes to receive kbd events, and along the way clean up a couple of related issues, providing noevent-pixbuf (which we should probably use for regionview names too)
git-svn-id: svn://localhost/ardour2/branches/3.0@12745 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-17 13:37:52 +00:00
Carl Hetherington
d341088f13 Fix some uninitialised variable warnings.
git-svn-id: svn://localhost/ardour2/branches/3.0@12702 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-13 15:38:15 +00:00
3b04885cb7 prevent too-wide program change flags at startup
git-svn-id: svn://localhost/ardour2/branches/3.0@12678 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-12 18:02:03 +00:00
9c986098a2 hide patch changes if they are too wide for the region at a given zoom level
git-svn-id: svn://localhost/ardour2/branches/3.0@12677 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-12 17:55:05 +00:00
d1d08e3910 fix complete screw up in connecting MIDNAM PatchNameList with ChannelNameSets; more tweaks and twirls for patch/program change mgmt
git-svn-id: svn://localhost/ardour2/branches/3.0@12673 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-12 16:32:06 +00:00
d97312d438 lots more work trying to create a common structure for accessing plugin and MIDNAME patch/preset/program names. still not done
git-svn-id: svn://localhost/ardour2/branches/3.0@12665 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-11 22:59:35 +00:00
960de7306f partially-done (but compile-friendly) move of instrument info into a new backend object
git-svn-id: svn://localhost/ardour2/branches/3.0@12652 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-11 12:07:17 +00:00
23350c195d remove craziness of propagating MIDI 7 bit limits into MIDNAM handling by replacing bank_msb/lsb with "bank" ; move responsibility for discovering patch names into MIDI trackview (soon to move again)
git-svn-id: svn://localhost/ardour2/branches/3.0@12647 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-10 16:42:17 +00:00
Carl Hetherington
fa19e1a9d0 When sounding notes on selection / note movements, play the note for as long as the mouse button is held down (#4574).
git-svn-id: svn://localhost/ardour2/branches/3.0@12606 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-08 13:21:05 +00:00
Carl Hetherington
ef213e49a7 Grey-out patch changes on inactive channels rather than not
plotting them at all (part of #4207).


git-svn-id: svn://localhost/ardour2/branches/3.0@12600 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-08 12:17:33 +00:00
0692e766f8 add "v" as a new MIDI editing key for velocity, add velocity dialog, fix crash when quitting with MIDI notes selected
git-svn-id: svn://localhost/ardour2/branches/3.0@12583 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-06 13:17:53 +00:00
1bc662e64e incomplete change to allow all selected MIDI notes to have their velocity set to the same adjusted value (needs more work to find modifiers and/or add a dialog)
git-svn-id: svn://localhost/ardour2/branches/3.0@12581 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-06 12:16:15 +00:00
Carl Hetherington
dcd6dbf14b Persist track MIDNAM settings via a GUI property. Fix a
couple of crashes with the MIDNAM code.


git-svn-id: svn://localhost/ardour2/branches/3.0@12543 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-02 14:53:34 +00:00
Carl Hetherington
2010c0489f Put MIDNAM stuff into the patch change dialog.
git-svn-id: svn://localhost/ardour2/branches/3.0@12539 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-02 13:02:01 +00:00
ba418958bf patch from dave flick to tackle a variety of cursor issues
git-svn-id: svn://localhost/ardour2/branches/3.0@12481 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-29 20:29:47 +00:00
Carl Hetherington
5776407b3b Clear selection on starting a MIDI note rubberband
selection drag; always emit SelectionCleared() from
clear_selection_except even if this region's selection
hasn't changed, as we still want to clear the selection
in other regions.  Part of #4669.


git-svn-id: svn://localhost/ardour2/branches/3.0@12473 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-28 21:01:49 +00:00
Carl Hetherington
cc12b6bba5 Emit SelectionCleared() when unique-selecting the first
note in a region, so that other regions clear their
selections.


git-svn-id: svn://localhost/ardour2/branches/3.0@12472 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-28 21:01:43 +00:00
6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff).  I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.

This commit only targets includes of ardour/*.h.  There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.


git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
8d5065bc32 remove, convert, comment several cerr statements
git-svn-id: svn://localhost/ardour2/branches/3.0@12378 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-22 12:57:05 +00:00
d8e41bde96 i18n-ization
git-svn-id: svn://localhost/ardour2/branches/3.0@12234 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-09 23:04:02 +00:00
Carl Hetherington
0b0d252acf Remove un-read variable.
git-svn-id: svn://localhost/ardour2/branches/3.0@12121 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-30 01:13:04 +00:00
ec1ef5d6b5 remove the apparently unnecessary "ui_bind()" macro from entire source base
git-svn-id: svn://localhost/ardour2/branches/3.0@12088 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-25 12:58:19 +00:00
Carl Hetherington
cc7d4db5fe Fix a few framecnt / framepos type confusions.
git-svn-id: svn://localhost/ardour2/branches/3.0@11975 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-14 22:04:51 +00:00
Carl Hetherington
ba145778cb paste_pos_beats should be source-relative, not region position relative; fixes some misplaced pastes.
git-svn-id: svn://localhost/ardour2/branches/3.0@11646 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-12 00:29:53 +00:00
405feb48aa use trim cursors near end of a MIDI note when in Draw mode (and not in Range mode)
git-svn-id: svn://localhost/ardour2/branches/3.0@11472 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-08 12:55:46 +00:00
b7df66c342 hand-done version of patch from tophatdave to prevent use of trim cursors when objects cannot be trimmed
git-svn-id: svn://localhost/ardour2/branches/3.0@11427 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-02 19:31:47 +00:00
e9a6d86b9b patch for bad region-extension when pasting into a MIDI that doesn't start at zero (from tophatdave) (related to #4664)
git-svn-id: svn://localhost/ardour2/branches/3.0@11420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-02 02:40:47 +00:00
e39e6196c6 start to provide real functionality in MIDI list editor. far from finished, but then, have *you* read the Logic manual?
git-svn-id: svn://localhost/ardour2/branches/3.0@11415 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-01 03:33:42 +00:00
5de9a8f38b make mouse range mode do something interesting when in internal/note edit mode. not entirely finished because the usual modifiers to add/extend the selection don't work correctly. note that this works both on the scroomer (where the modifiers do work correctly) and in the track (where they do not)
git-svn-id: svn://localhost/ardour2/branches/3.0@11273 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-20 02:54:23 +00:00
f758ed0f41 more fixups of various things including cursors when note editing. in particular, don't needlessly reset the cursor during a drag. note insertion with ctrl pressed now only works if in MouseObject mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@11270 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-19 22:23:28 +00:00
efab36a85e new mouse mode (Draw (notes)); switch into internal mode when draw is selected; notably improve use of dbl-click to enter and exist internal/note edit mode
git-svn-id: svn://localhost/ardour2/branches/3.0@11269 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-19 15:23:51 +00:00
c43f1d22c8 enter and exit node edit mode with dbl-click in any MIDI region
git-svn-id: svn://localhost/ardour2/branches/3.0@11268 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-19 00:14:58 +00:00
355183f1ab partially revert some of the recent work on tempo to reflect new understanding of the problem. behaviour is now believed to be totally correct but awaiting a bit more testing
git-svn-id: svn://localhost/ardour2/branches/3.0@11171 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-06 16:39:40 +00:00
ac19bedc3d tweak constants that affect whether/where trimming cursors are shown for MIDI notes, to avoid making it so hard to drag relatively small notes
git-svn-id: svn://localhost/ardour2/branches/3.0@11160 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04 20:29:34 +00:00
f61a0d892c fix error in framepos_{plus,minus}_bbt() which miscounted beats while stepping through bars - stops dragged MIDI notes from ending up in the wrong place, and more
git-svn-id: svn://localhost/ardour2/branches/3.0@11159 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04 18:48:32 +00:00
b1a33855ce use BBTPoint::is_bar() rather than ::beat == 1 ; implement TempoMap::framepos_plus_{beats,bbt}() with new map structure (not totally finished or accurate yet); prevent crash when dragging a marker to replace the initial tempo/meter markers
git-svn-id: svn://localhost/ardour2/branches/3.0@11154 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04 02:49:01 +00:00
Carl Hetherington
42aea0b9fd Clean up comments to create_note_at, since it no longers snaps its length parameter. Move the 1 tick shortening out of the method for the same reason. Make sure that create drags make notes with a minimum length of 1 tick (#4600).
git-svn-id: svn://localhost/ardour2/branches/3.0@11116 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30 13:41:16 +00:00
Carl Hetherington
fd48e72fc2 Fix comparison of beats to frames when deciding whether to show a patch change (should fix #4569).
git-svn-id: svn://localhost/ardour2/branches/3.0@11085 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27 00:22:26 +00:00
e9b4f14668 rename Timecode::BBT_Time::ticks_per_beat to Timecode::BBT_Time::ticks_per_bar_division which is a more accurate and informative name. The number doesn't describe the smallest division of a "beat" (which is only defined contextually anyway), but rather the smallest division of the the divisions of a bar. If using a meter of 4/8, there are 4 divisions per bar, and we can divide each one into ticks_per_bar_division pieces; in a separate meter (section) of 3/8, there are 3 divisions per bar, each of which can be divided into ticks_per_bar_division_pieces.
git-svn-id: svn://localhost/ardour2/branches/3.0@11022 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-19 19:44:43 +00:00
ca9a444aa9 do not convert from grid-type-beats to frames and back to beats when determining the length of a ghost note or the actual note to be inserted on button-press: just use grid-type-beats as is
git-svn-id: svn://localhost/ardour2/branches/3.0@11021 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-19 18:32:57 +00:00
Carl Hetherington
ab4e7cf472 Move note creation code into a Drag; fix snapping of note
starts when drag-created (part of #4505).


git-svn-id: svn://localhost/ardour2/branches/3.0@10972 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-11 12:54:54 +00:00
Carl Hetherington
1390a1510d Comment.
git-svn-id: svn://localhost/ardour2/branches/3.0@10962 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-10 13:48:41 +00:00
50aee54219 remove visible "sound notes" button,add Config parameter to control this (which then saves the state the user selected), add control to the prefs dialog
git-svn-id: svn://localhost/ardour2/branches/3.0@10934 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-07 14:23:32 +00:00
Carl Hetherington
aecf0e4ae8 Add some missing initialisers; remove pointless _model_name
/ _custom_device_mode initialisers.


git-svn-id: svn://localhost/ardour2/branches/3.0@10881 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-03 13:38:53 +00:00
Carl Hetherington
f817155f20 Fix somewhat unlikely crash on doing add note; start drag to resize note; undo; finish drag to resize note.
git-svn-id: svn://localhost/ardour2/branches/3.0@10880 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-03 03:05:59 +00:00
14d601a0ff revert recent change to Evoral::Event, and use static_cast<> to get from Event to MIDIEvent
git-svn-id: svn://localhost/ardour2/branches/3.0@10870 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-02 20:34:58 +00:00
d537434b6b use new parameter that controls display of MTC and MIDI clock, as well as attempt to do the first step of something vaguely smart with showing them only a very-zoomed-in levels even if requested
git-svn-id: svn://localhost/ardour2/branches/3.0@10865 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-02 19:35:18 +00:00
Carl Hetherington
fecf120f1e Remove ghost notes when actual notes are deleted, and ensure the _optimization_iterator is valid even after things have been removed from the list (should fix #4483).
git-svn-id: svn://localhost/ardour2/branches/3.0@10659 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-17 22:15:50 +00:00
Carl Hetherington
ec90b0ceb0 Use a Drag class for midi note selection, so that it
gets autoscroll (#4474).


git-svn-id: svn://localhost/ardour2/branches/3.0@10650 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-16 20:11:33 +00:00
Carl Hetherington
57d2555d3e Fix typo in last commit.
git-svn-id: svn://localhost/ardour2/branches/3.0@10615 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-15 14:32:54 +00:00
Carl Hetherington
a7fd6e2925 When tabbing between notes in a MIDI region view, only consider those that are being displayed according to the channel selector. Should avoid confusions such as that in #3976.
git-svn-id: svn://localhost/ardour2/branches/3.0@10614 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-15 14:24:14 +00:00
Carl Hetherington
fd2aea1037 Remove non-RT-safe alloc in the MIDI process() call.
git-svn-id: svn://localhost/ardour2/branches/3.0@10441 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-04 17:52:12 +00:00
Carl Hetherington
81808ac866 Fix up some comments.
git-svn-id: svn://localhost/ardour2/branches/3.0@10289 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-22 23:18:59 +00:00
0bc8832e20 Trim include tree.
git-svn-id: svn://localhost/ardour2/branches/3.0@10244 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19 21:53:09 +00:00
8be2e11c65 Implement range selecting for MIDI notes (#4087).
git-svn-id: svn://localhost/ardour2/branches/3.0@10199 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-07 21:11:19 +00:00
1567d362ad Implement invert selection for MIDI notes (#4087).
git-svn-id: svn://localhost/ardour2/branches/3.0@10198 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-07 20:27:12 +00:00
0938a42440 fixes for 98% of all the warnings/errors reported by OS X gcc on tiger
git-svn-id: svn://localhost/ardour2/branches/3.0@10179 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-30 17:55:14 +00:00
Carl Hetherington
29902b5731 Stop MidiRegionView claiming PrimaryModifier-scrollwheel so
that zoom still works when MIDI notes are selected (#4323).


git-svn-id: svn://localhost/ardour2/branches/3.0@10159 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-28 19:23:13 +00:00
Carl Hetherington
5f2ef08666 Clear selected MIDI notes in all regions when they are
cleared in a single one (#4152).


git-svn-id: svn://localhost/ardour2/branches/3.0@10158 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-28 14:07:42 +00:00
Carl Hetherington
7fdc1272b2 Remove erroneous check that would prevent notes being put at
pitch 0 or 127.


git-svn-id: svn://localhost/ardour2/branches/3.0@10154 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-28 12:40:54 +00:00
Carl Hetherington
b85e065069 More debug removal. Also fix ghost note position on non-zero-start regions (#4337).
git-svn-id: svn://localhost/ardour2/branches/3.0@10152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-28 00:47:37 +00:00
Carl Hetherington
3f8f1b3478 Remove some debug messages.
git-svn-id: svn://localhost/ardour2/branches/3.0@10150 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-28 00:36:23 +00:00
d4433b9ab3 (native) Linux VST support from LinuxDSP
git-svn-id: svn://localhost/ardour2/branches/3.0@10101 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-20 20:29:47 +00:00
Carl Hetherington
174c0d6831 Snap new automation points in AutomationRegionViews (#4297).
git-svn-id: svn://localhost/ardour2/branches/3.0@10059 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-06 23:28:55 +00:00
Carl Hetherington
ad444c0955 Another go at fixing up MIDI note additions with snap
(#4189).


git-svn-id: svn://localhost/ardour2/branches/3.0@10017 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-08-20 20:02:04 +00:00