13
0

empty, useless velocity lane for MIDI tracks

This commit is contained in:
Paul Davis 2022-12-18 16:43:29 -07:00
parent 1c1d73e47d
commit ea6717f041
4 changed files with 52 additions and 20 deletions

View File

@ -287,6 +287,31 @@ AutomationTimeAxisView::AutomationTimeAxisView (
controls_ebox.set_name (controls_base_unselected_name);
time_axis_frame.set_name (controls_base_unselected_name);
add_contents (show_regions);
/* make sure labels etc. are correct */
automation_state_changed ();
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler));
_stripable->DropReferences.connect (
_stripable_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context ()
);
}
AutomationTimeAxisView::~AutomationTimeAxisView ()
{
if (_stripable) {
cleanup_gui_properties ();
}
delete _view;
CatchDeletion (this);
}
void
AutomationTimeAxisView::add_contents (bool show_regions)
{
/* ask for notifications of any new RegionViews */
if (show_regions) {
@ -314,24 +339,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (
line->queue_reset ();
add_line (line);
}
/* make sure labels etc. are correct */
automation_state_changed ();
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler));
_stripable->DropReferences.connect (
_stripable_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context ()
);
}
AutomationTimeAxisView::~AutomationTimeAxisView ()
{
if (_stripable) {
cleanup_gui_properties ();
}
delete _view;
CatchDeletion (this);
}
void

View File

@ -201,6 +201,7 @@ protected:
void automation_state_changed ();
void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
void interpolation_changed (ARDOUR::AutomationList::InterpolationStyle);
PBD::ScopedConnectionList _list_connections;
@ -217,6 +218,8 @@ protected:
std::string automation_state_off_string () const;
virtual void add_contents (bool show_regions);
private:
int set_state_2X (const XMLNode &, int);
};

View File

@ -73,6 +73,7 @@
#include "ardour/source.h"
#include "ardour/track.h"
#include "ardour/types.h"
#include "ardour/velocity_control.h"
#include "ardour_message.h"
#include "automation_line.h"
@ -99,6 +100,7 @@
#include "selection.h"
#include "step_editor.h"
#include "note_base.h"
#include "velocity_time_axis.h"
#include "ardour/midi_track.h"
@ -1366,6 +1368,26 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
/* handled elsewhere */
break;
case MidiVelocityAutomation:
track.reset (new VelocityTimeAxisView (_session,
_route,
_route,
midi_track()->velocity_control(),
_editor,
*this,
true,
parent_canvas,
_route->describe_parameter (param)));
if (_view) {
_view->foreach_regionview (sigc::mem_fun (*track.get(), &TimeAxisView::add_ghost));
}
add_automation_child (param, track, show);
if (selected ()) {
reshow_selection (_editor.get_selection().time);
}
break;
case MidiCCAutomation:
case MidiPgmChangeAutomation:
case MidiPitchBenderAutomation:
@ -1398,8 +1420,7 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
_route->describe_parameter(param)));
if (_view) {
_view->foreach_regionview (
sigc::mem_fun (*track.get(), &TimeAxisView::add_ghost));
_view->foreach_regionview (sigc::mem_fun (*track.get(), &TimeAxisView::add_ghost));
}
add_automation_child (param, track, show);

View File

@ -342,6 +342,7 @@ gtk2_ardour_sources = [
'video_monitor.cc',
'transcode_ffmpeg.cc',
'transcode_video_dialog.cc',
'velocity_time_axis.cc',
'video_server_dialog.cc',
'utils_videotl.cc',
'export_video_dialog.cc'