remove concept of a velocity time axis view, just use velocity region view

This commit is contained in:
Paul Davis 2022-12-26 11:24:03 -07:00
parent 18275922d3
commit fcba147acd
7 changed files with 15 additions and 123 deletions

View File

@ -45,7 +45,6 @@
#include "selection.h"
#include "ui_config.h"
#include "velocity_region_view.h"
#include "velocity_time_axis.h"
#include "pbd/i18n.h"
@ -102,19 +101,19 @@ AutomationStreamView::add_region_view_internal (std::shared_ptr<Region> region,
if (rv->region() == region) {
/* great. we already have an AutomationRegionView for this Region. use it again. */
// VelocityRegionView* vrv = dynamic_cast<VelocityRegionView*>(rv);
VelocityRegionView* vrv = dynamic_cast<VelocityRegionView*>(rv);
// if (vrv->line()) {
// vrv->line()->set_list (list);
// }
if (vrv->line()) {
vrv->line()->set_list (list);
}
rv->set_valid (true);
//display_region (vrv);
display_region (vrv);
return 0;
}
}
region_view = new VelocityRegionView (_canvas_group, *(dynamic_cast<VelocityTimeAxisView*>(&_automation_view)), region, list, _samples_per_pixel, region_color);
region_view = new VelocityRegionView (_canvas_group, _automation_view, region, list, _samples_per_pixel, region_color);
} else {

View File

@ -100,7 +100,6 @@
#include "selection.h"
#include "step_editor.h"
#include "note_base.h"
#include "velocity_time_axis.h"
#include "ardour/midi_track.h"
@ -1369,25 +1368,6 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
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:

View File

@ -43,7 +43,7 @@
using namespace Temporal;
VelocityRegionView::VelocityRegionView (ArdourCanvas::Container* parent,
VelocityTimeAxisView& time_axis,
AutomationTimeAxisView& time_axis,
boost::shared_ptr<ARDOUR::Region> region,
boost::shared_ptr<ARDOUR::AutomationList> list,
double spu,
@ -176,7 +176,7 @@ VelocityRegionView::add_automation_event (GdkEvent *, timepos_t const & w, doubl
}
assert(_line);
VelocityTimeAxisView* const view = velocity_view ();
AutomationTimeAxisView* const view = velocity_view ();
/* compute vertical fractional position */
y = 1.0 - (y / _line->height());
@ -230,7 +230,7 @@ VelocityRegionView::paste (timepos_t const & pos,
{
using namespace ARDOUR;
VelocityTimeAxisView* const view = velocity_view();
AutomationTimeAxisView* const view = velocity_view();
boost::shared_ptr<ARDOUR::AutomationList> my_list = _line->the_list();
if (view->session()->transport_rolling() && my_list->automation_write()) {

View File

@ -24,7 +24,7 @@
#include "ardour/types.h"
#include "region_view.h"
#include "velocity_time_axis.h"
#include "automation_time_axis.h"
#include "automation_line.h"
#include "enums.h"
@ -39,7 +39,7 @@ class VelocityRegionView : public RegionView
{
public:
VelocityRegionView(ArdourCanvas::Container*,
VelocityTimeAxisView&,
AutomationTimeAxisView&,
boost::shared_ptr<ARDOUR::Region>,
boost::shared_ptr<ARDOUR::AutomationList>,
double initial_samples_per_pixel,
@ -54,8 +54,10 @@ public:
float times,
boost::shared_ptr<const ARDOUR::AutomationList> slist);
inline VelocityTimeAxisView* velocity_view() const
{ return dynamic_cast<VelocityTimeAxisView*>(&trackview); }
inline AutomationTimeAxisView* velocity_view() const
{ return dynamic_cast<AutomationTimeAxisView*>(&trackview); }
boost::shared_ptr<AutomationLine> line() { return _line; }
// We are a ghost. Meta ghosts? Crazy talk.
virtual GhostRegion* add_ghost(TimeAxisView&) { return 0; }

View File

@ -1,46 +0,0 @@
/*
* Copyright (C) 2022 Paul Davis <paul@linuxaudiosystems.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "velocity_time_axis.h"
#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
VelocityTimeAxisView::VelocityTimeAxisView (
Session* s,
boost::shared_ptr<Stripable> strip,
boost::shared_ptr<Automatable> a,
boost::shared_ptr<AutomationControl> c,
PublicEditor& e,
TimeAxisView& parent,
bool show_regions,
ArdourCanvas::Canvas& canvas,
const string & nom,
const string & nomparent
)
: AutomationTimeAxisView (s, strip, a, c, Evoral::Parameter (MidiVelocityAutomation), e, parent, show_regions, canvas, nom, nomparent)
{
}
VelocityTimeAxisView::~VelocityTimeAxisView()
{
}

View File

@ -1,42 +0,0 @@
/*
* Copyright (C) 2022 Paul Davis <paul@linuxaudiosystems.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __ardour_gtk_velocity_time_axis_h__
#define __ardour_gtk_velocity_time_axis_h__
#include "automation_time_axis.h"
class VelocityTimeAxisView : public AutomationTimeAxisView
{
public:
VelocityTimeAxisView (ARDOUR::Session*,
boost::shared_ptr<ARDOUR::Stripable>,
boost::shared_ptr<ARDOUR::Automatable>,
boost::shared_ptr<ARDOUR::AutomationControl>,
PublicEditor&,
TimeAxisView& parent,
bool show_regions,
ArdourCanvas::Canvas& canvas,
const std::string & name = "", /* translatable */
const std::string & plug_name = "");
~VelocityTimeAxisView();
};
#endif /* __ardour_gtk_velocity_time_axis_h__ */

View File

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