13
0
Commit Graph

335 Commits

Author SHA1 Message Date
c3e8cdb418 PatchChange Dialog: update title & refresh midnam on change 2017-09-08 23:35:00 +02:00
1166538433 Patch select: apply conventions for context menus. 2017-09-08 11:09:26 -05:00
6376730093 Rework Patch-Change/Select Dialog 2017-09-08 02:19:31 +02:00
0e9dab6aab Allow to send immediate PC messages without closing the dialog.
Perhaps every change should trigger a PC (without "Apply") button?!
2017-08-24 23:41:21 +02:00
3d50563620 Properly propagate TAV TimeSelection 2017-07-21 15:49:28 +02:00
1f5ebc5485 Remove ArdourPrompter wrapper 2017-07-17 21:06:04 +02:00
eb1e423b75 Remove <gtkmm.h> include from header files. 2017-07-17 21:06:04 +02:00
b5e9451bc7 Remove unused sources & includes 2017-07-17 21:06:04 +02:00
5c92613698 Separate Ardour UI widgets into dedicated library 2017-07-17 21:06:04 +02:00
71fc5b9e8b Use PBD::string_to<bool> in MidiTimeAxisView class
As the conversion was performed with PBD::to_string
2017-04-19 09:36:59 +10:00
e66ba382da Remove expensive menu for sending immediate Patch Changes, use a dialog 2017-03-29 23:53:56 +02:00
nick_m
59daffea1d rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.

region position may now be set musically (using quarter notes for now).

this patch fixes several problems in the current code:

	- dragging a list of music-locked regions now maintains correct
	  musical offsets within the list.

	- splitting regions using magnetic snap works correctly (#7192)

	- cut drag should now work correctly with magnetic snap.

	- musical length of split midi regions is no longer frame based.
2017-02-04 22:57:36 +11:00
nick_m
96048ad4c0 midi scrooming performance updates.
- MGR visibility is handled by update_note/hit()
	  MRV unconditionally updates MGR events
	- remove MidiGhostRegion::update_range()
	- rename set_contents_height -> update_contents_height
2016-12-23 00:51:34 +11:00
7688d22456 remove channel filter status and button from MIDI track header, access via context menu 2016-12-17 17:59:08 +00:00
6ce9efb11d Don't assume patch-banks are populated. 2016-12-06 22:56:04 +01:00
ac814d32d1 Allow to send Immediate Patch Changes 2016-12-06 18:48:36 +01:00
nick_m
9f1deb9ea4 amend last commit. 2016-11-25 01:06:22 +11:00
nick_m
2ec2c1c017 midi scroomer updates streamview during drags. 2016-11-25 00:50:29 +11:00
9773cfa926 Drop UpdateMidnam shared_ptr reference when the plugin is removed 2016-10-30 17:39:55 +01:00
cfafb01b32 GUI support for plugin provided midnam 2016-10-29 19:57:43 +02:00
5c12de78db Update CC automation menu when changing channel selection 2016-08-26 16:18:46 +02:00
5af281afb1 add nascent poly-phonic pressure to automation menu for MIDI tracks 2016-08-25 13:42:38 -04:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
140258d8ab remove reference "const int32_t&" -> const int32_t"
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
447f9ee062 Exact beat for added regions. 2016-07-10 02:18:37 +10:00
nick_m
93c24e4433 Paste uses exact beats. rework _start_beats calculation in copy-with-offset ctor. 2016-07-10 02:18:36 +10:00
nick_m
94e0a15325 Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to
	  remove the temporal distortion introduced when using an
	  audio frame-based gui for music-locked objects.

	  In short, the gui uses an audio frame representation to move
	  objects. It displays the object using frame_at_beat(), quantizing
	  the time value to audio frames. This is fine until the user selects
	  that frame but expects it to be interpreted as a beat.
	  Thus beat_at_frame() would not produce the user-expected beat
	  (temporal quantization error of up to 0.5 audio samples).
	  This is one method of mapping audio time to music time accurately.
2016-07-10 02:18:36 +10:00
nick_m
2d5238d875 Make some musical operations on music-locked regions operate in beats.
- use exact beats to determine frame position.
	- see comments in tempo.cc for more.
	- this hasn't been done for split yet, but dragging and
	  trimming are supported.
2016-07-10 02:18:36 +10:00
8125ea5909 tweak API of Selectable 2016-06-05 20:50:57 -04:00
dbcf2f5068 fix initialization in MidiTimeAxisView
This is another "most derived" class and so needs to initialize the SessionHandlePtr virtual base class
2016-06-05 16:33:01 -04:00
Julien ROGER
d405a0059d Fix 6031: Fix inactive MIDI track headers when reloading session
Update the visual state of MidiTimeAxisView accordingly to its route in
MidiTimeAxisView::set_route()
2016-02-13 12:52:34 +10:00
André Nusser
e50e50c0f9 Disable scrolling in the dropdown menus of midi region heads.
Instead pass it to the canvas as proposed by x42 in #6143.
2015-12-02 15:02:47 -05:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
1d42ed077e Use ARDOUR_UI_UTILS::set_tooltip rather than via ARDOUR_UI::set_tip
This removes the direct dependence on ARDOUR_UI/Gtk_UI for setting
tooltips. Removes inclusion of ardour_ui.h from 16 files.
2015-09-16 16:55:17 -04:00
f2495d9808 Highlight note in piano roll - #6510 2015-08-15 03:08:55 +02:00
nick_m
44790ebff0 More _reversible_command() auditing in the gui.
- try to keep begin/commit pairs in the same file where possible.
2015-06-17 09:54:23 +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
nick_m
1580c6d635 Fix some strings incorrectly marked for translation.
My apologies to translators.
2015-03-25 23:31:23 +11:00
f1ce87a699 add API to select TAV height mode.
preparation for further Summary and Number of visible
track count fixes.

* “Only Self”: don’t resize child-views (old default)
* “Total Height”: distribute height equally among 
   all visible child [automation] lanes
* “Height per Lane”: given height should be applied
   to all sub-views.
2015-03-19 21:47:34 +01:00
51f4e33dd1 Don't expand track headers to show MIDI stuff.
Fixes bug #0006138.  This solution does make the other label move when settings
are changed (presumably what the fixed width stuff was for), but I don't think
this is a big deal.  Lesser of two evils, at least.
2015-03-13 22:09:13 -04:00
38c2bdc856 gracefully handle missing .midnam
Fixes bug: Add a .midnam to local preferences.
use it in a session. delete the .midnam,
reload session -> crash
2015-01-10 19:31:50 +01: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
ca7965d7aa Fix initial display of grouped MIDI region colors. 2015-01-09 17:49:16 -05:00
a12a065457 Fix copy paste of MIDI and track automation. 2014-12-18 20:23:34 -05:00
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -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
17a58ecd4b Use ArdourDropdown for MIDI device selector. 2014-12-12 23:38:41 -05:00
cf537b97f5 Add missing namespace qualifiers. 2014-11-30 23:56:19 -05:00
0f72ea4a34 Factor out duplicated track automation code.
Mute automation for MIDI tracks.
2014-11-30 23:56:19 -05:00
85cf4b4dbd Fix visibility of MIDI controller automation tracks across saves.
Fix some inaccurate/misleading comments that led to said bug.

Gracefully handle the "impossible" case where we can't figure out a state ID
for an automation track, instead of crashing.
2014-11-17 00:13:53 -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
6954708865 clean up midi channel controls 2014-09-09 14:39:36 +02:00
80e6d3b534 fix typo in b9f075143 2014-09-08 20:59:17 +02:00
b9f0751438 Move Scroomer out of Track Selection Box:
* no horiz space between Piano-Roll & Track
* 1:1 mapping of note's vertical space (no border)
2014-09-08 18:43:08 +02:00
6bb573d81c vertical pixel alignment of all TAV elements 2014-09-08 18:42:41 +02:00
b469cd217f Bring back control slider on MIDI controller "tracks". 2014-08-31 17:54:16 -04:00
e3d982a66e set initial TAV style 2014-08-31 18:51:04 +02:00
888f440633 move midi scroomer to right of meter and fix alignment 2014-08-31 16:15:52 +02:00
d0c7984320 new min. height for midi controls 2014-08-31 07:12:41 +02:00
b41df8e120 shuffle packing order to accomodate midi controls 2014-08-11 14:44:12 -05:00
e3cf23b8a0 Don't show all controllers for generic MIDI devices.
This takes a VERY long time to do, so is probably a problem for defined devices
with a ton of channels and devices, too.  Not sure what the smart thing to do
here is, though adding lanes really shouldn't be this slow in the first place.
2014-07-15 15:18:18 -04:00
d65091db16 Show all named controllers for "Show All Automation" on MIDI tracks. 2014-07-15 15:18:18 -04:00
c3f9688c37 Show 1-based channel numbers in MIDI controller automation menu.
This matches the numbers shown elsewhere, previously if you had a track set to
e.g. channel 10, the controller menu items had "[9]" suffixes.
2014-07-15 15:18:18 -04:00
0a87bbc37b add partial support for mute automation (playback does not work, data is not recorded in the session) 2014-07-01 14:37:05 -04:00
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
343b06d8d3 dramatic change in logic and naming for operations related to adding a MIDI region on demand and cloning/unlinking
Existing code would cause data loss due to creation of two Source objects referring the same path, one with removable flags and one without. Careful code review suggested a variety of thinkos, function naming problems and other confusion that caused this. I have tried ot extensively comment what is going on with these operations, because it is one key area in which MIDI differs from audio: with audio, capture is the only way to add a new audio region, but for MIDI there are GUI input events that can add a new region.
2014-04-14 02:17:30 -04:00
f901337a16 Enforce const correctness for a couple of iterators 2014-01-30 16:30:48 +00:00
33cadc0ef1 Add namespace qualifiers for some occurrences of 'Gtk::CheckMenuItem' (Windows already has a function called 'CheckMenuItem') 2014-01-30 16:30:48 +00:00
9aacefc170 merge with master 2014-01-15 14:29:32 -05:00
ab838a1260 Midi-track fader & pan automation
NB. Fader automation lane always shows 'dB' value and is logarithmic.
OK for pre-fader synths, but not for raw-midi data.
2014-01-15 11:30:54 +01:00
19bb2b33a8 Merge remote-tracking branch 'remotes/origin/cairocanvas' into windows
Conflicts (hopefully resolved):
	gtk2_ardour/marker.cc
	gtk2_ardour/midi_region_view.h
	gtk2_ardour/region_gain_line.h
	gtk2_ardour/utils.cc
	gtk2_ardour/video_image_frame.cc
	gtk2_ardour/wscript
	libs/backends/jack/wscript
2013-09-21 09:17:25 +01:00
fee2c9d71f Fix ambiguous type CheckMenuItem that is also defined via windows.h 2013-07-22 13:44:32 +10:00
9cbe231b92 Use PBD::ffs for portability 2013-07-17 21:40:34 +10:00
c08b336292 Fix ambiguous type CheckMenuItem that is also defined via windows.h 2013-07-11 15:32:31 -04:00
38f2aa51bd Merge branch 'master' into cairocanvas 2013-07-09 09:11:52 -04:00
da1e8701eb fix alignment of meters on midi-tracks 2013-07-03 04:52:02 +02:00
ce8731b32d Merge branch 'master' into cairocanvas 2013-06-06 09:52:21 -04:00
7ab25697d2 Mark forgotten messages for translation (from Alexandre Prokoudine) 2013-05-30 21:36:39 +02: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
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
c184d1fbe6 add tooltip for channel edit button 2013-03-30 09:19:37 -04:00
f1ce235b6b some deep tweaking to get MIDI channel control into nearly done shape for 3.1 2013-03-28 17:10:57 -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
03e06e71d6 Fix border case where bank select controlers are last in midnam file.
Fix potential infinite loop in controller menu generation.


git-svn-id: svn://localhost/ardour2/branches/3.0@14001 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-26 22:30:34 +00:00
84eee94b1e Fix named controls menu to display all controls (don't miss the last submenu).
git-svn-id: svn://localhost/ardour2/branches/3.0@14000 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-26 22:08:06 +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
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
cc8b42f167 Set MIDI device model to "Generic" by default (previously was unset).
Perhaps it should be "Standard MIDI" though?


git-svn-id: svn://localhost/ardour2/branches/3.0@13900 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 19:06:21 +00:00
fe980b5c99 fix MIDI track channel selector etc. visibility after show_all()=>show() changes in recent commit
git-svn-id: svn://localhost/ardour2/branches/3.0@13899 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 16:05:06 +00:00
c779251a3e fix midnam-related crash introduced around 13892
git-svn-id: svn://localhost/ardour2/branches/3.0@13897 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 13:15:10 +00:00
b1bc353f0d Add standard MIDI midnam file and remove hard coded equivalent.
Accordingly, make "generic" MIDI truly generic, just numbered controllers.
Break up MIDI name UI stuff into manageable functions of reasonable size.
Add convenient method to MIDINameDocument for getting the names for a device.
Tolerate comments in MIDINameDocument ControlNameList.

Can't remove the MIDI name code just yet, since it's still erroneously used by
Automatable::describe_parameter().  This is the cause of a bug where the name
on the automation lane does not match that in the menu.

The plan is to make a very simple pure abstract interface for getting MIDI
names, and make it possible to set one for Automatable (or perhaps pass it to
describe_parameter()).  Thus we'll be on the way to supporting names from
sources other than midnam files, namely plugins.


git-svn-id: svn://localhost/ardour2/branches/3.0@13895 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 10:02:00 +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
d251c68d76 Avoid some copy overhead and sprinkle in some const for good measure.
git-svn-id: svn://localhost/ardour2/branches/3.0@13891 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 06:17:02 +00:00
9b2dad56d1 Reflow ridiculously wide code.
Sorry.


git-svn-id: svn://localhost/ardour2/branches/3.0@13890 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 05:54:44 +00:00
94c7798712 Hide MIDI device mode selector unless there is actually more than one mode.
Since this is usually not the case, showing this all the time as before was so
confusing everyone thought it was broken (myself included).

Changing that show_all() to a show() might have consequences, but it seems to
work fine and we really shouldn't be using show_all() anyway.


git-svn-id: svn://localhost/ardour2/branches/3.0@13889 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 05:36:43 +00:00
e092fe33af Preliminary support for named MIDI controllers via midname files.
Add midnam file for Moog Minitaur controller names.


git-svn-id: svn://localhost/ardour2/branches/3.0@13852 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-16 08:24:31 +00:00