2024-02-13 14:22:49 -05:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2024 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 "ardour/midi_region.h"
|
|
|
|
#include "ardour/midi_source.h"
|
2024-06-26 00:59:14 -04:00
|
|
|
#include "ardour/midi_track.h"
|
|
|
|
#include "ardour/triggerbox.h"
|
2024-11-07 18:10:31 -05:00
|
|
|
#include "ardour/types.h"
|
2024-02-13 14:22:49 -05:00
|
|
|
|
|
|
|
#include "gtkmm2ext/utils.h"
|
|
|
|
|
2024-11-05 16:59:20 -05:00
|
|
|
#include "canvas/box.h"
|
2024-11-05 15:27:16 -05:00
|
|
|
#include "canvas/button.h"
|
2024-02-13 14:22:49 -05:00
|
|
|
#include "canvas/debug.h"
|
|
|
|
|
|
|
|
#include "editing_context.h"
|
|
|
|
#include "editor_drag.h"
|
2024-09-11 20:37:47 -04:00
|
|
|
#include "hit.h"
|
2024-02-13 14:22:49 -05:00
|
|
|
#include "keyboard.h"
|
2024-10-07 18:28:54 -04:00
|
|
|
#include "mergeable_line.h"
|
2024-09-19 00:05:02 -04:00
|
|
|
#include "midi_cue_automation_line.h"
|
2024-02-13 14:22:49 -05:00
|
|
|
#include "midi_cue_view.h"
|
2024-08-30 14:31:20 -04:00
|
|
|
#include "midi_cue_velocity.h"
|
2024-09-11 20:37:47 -04:00
|
|
|
#include "note.h"
|
2024-09-20 21:44:25 -04:00
|
|
|
#include "ui_config.h"
|
2024-08-30 14:31:20 -04:00
|
|
|
#include "velocity_display.h"
|
2024-02-13 14:22:49 -05:00
|
|
|
|
|
|
|
#include "pbd/i18n.h"
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
using namespace ARDOUR;
|
2024-02-13 14:22:49 -05:00
|
|
|
using namespace Gtkmm2ext;
|
|
|
|
|
|
|
|
MidiCueView::MidiCueView (std::shared_ptr<ARDOUR::MidiTrack> mt,
|
2024-06-26 00:59:14 -04:00
|
|
|
uint32_t slot_index,
|
2024-02-13 14:22:49 -05:00
|
|
|
ArdourCanvas::Item& parent,
|
|
|
|
EditingContext& ec,
|
|
|
|
MidiViewBackground& bg,
|
|
|
|
uint32_t basic_color)
|
|
|
|
: MidiView (mt, parent, ec, bg, basic_color)
|
2024-08-30 14:31:20 -04:00
|
|
|
, velocity_display (nullptr)
|
2024-06-26 00:59:14 -04:00
|
|
|
, _slot_index (slot_index)
|
2024-02-13 14:22:49 -05:00
|
|
|
{
|
|
|
|
CANVAS_DEBUG_NAME (_note_group, X_("note group for MIDI cue"));
|
|
|
|
|
2024-10-26 23:03:55 -04:00
|
|
|
_needs_active_notes_for_rec_enabled_track = true;
|
|
|
|
|
2024-02-22 12:37:09 -05:00
|
|
|
/* Containers don't get canvas events, so we need an invisible rect
|
|
|
|
* that will. It will be resized as needed sothat it always covers the
|
|
|
|
* entire canvas/view.
|
|
|
|
*/
|
|
|
|
|
2024-02-13 14:22:49 -05:00
|
|
|
event_rect = new ArdourCanvas::Rectangle (&parent);
|
|
|
|
event_rect->set (ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, 10.));
|
|
|
|
event_rect->Event.connect (sigc::mem_fun (*this, &MidiCueView::canvas_event));
|
|
|
|
event_rect->set_fill (false);
|
|
|
|
event_rect->set_outline (false);
|
2024-08-25 15:07:06 -04:00
|
|
|
CANVAS_DEBUG_NAME (event_rect, "cue event rect");
|
2024-02-13 14:22:49 -05:00
|
|
|
|
|
|
|
_note_group->raise_to_top ();
|
2024-06-11 17:14:03 -04:00
|
|
|
|
2024-08-30 14:31:20 -04:00
|
|
|
automation_group = new ArdourCanvas::Rectangle (&parent);
|
|
|
|
CANVAS_DEBUG_NAME (automation_group, "cue automation group");
|
2024-09-20 21:44:25 -04:00
|
|
|
automation_group->set_fill_color (UIConfiguration::instance().color ("midi automation track fill"));
|
2024-10-07 18:28:54 -04:00
|
|
|
automation_group->set_data ("linemerger", this);
|
2024-08-30 14:31:20 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
velocity_display = new MidiCueVelocityDisplay (editing_context(), midi_context(), *this, *automation_group, 0x312244ff);
|
2024-08-30 14:31:20 -04:00
|
|
|
|
2024-09-11 20:37:47 -04:00
|
|
|
for (auto & ev : _events) {
|
|
|
|
velocity_display->add_note (ev.second);
|
|
|
|
}
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
velocity_display->hide ();
|
2024-11-05 15:27:16 -05:00
|
|
|
|
2024-11-05 16:59:20 -05:00
|
|
|
button_bar = new ArdourCanvas::Box (&parent, ArdourCanvas::Box::Horizontal);
|
2024-11-05 15:27:16 -05:00
|
|
|
CANVAS_DEBUG_NAME (button_bar, "button bar");
|
2024-11-05 16:59:20 -05:00
|
|
|
button_bar->set_spacing (12.);
|
|
|
|
/* Right-side padding only */
|
|
|
|
button_bar->set_padding (0., 0., 0., 24.);
|
|
|
|
button_bar->set_margin (5., 5., 5., 5.);
|
|
|
|
|
|
|
|
Pango::FontDescription button_font = UIConfiguration::instance().get_NormalFont();
|
|
|
|
|
|
|
|
velocity_button = new ArdourCanvas::Button (button_bar, _("Velocity"), button_font);
|
|
|
|
velocity_button->text()->set_color (UIConfiguration::instance().color ("neutral:foreground"));
|
2024-11-05 15:27:16 -05:00
|
|
|
CANVAS_DEBUG_NAME (velocity_button, "velocity button");
|
|
|
|
|
2024-11-05 16:59:20 -05:00
|
|
|
bender_button = new ArdourCanvas::Button (button_bar, _("Bender"), button_font);
|
|
|
|
bender_button->text()->set_color (UIConfiguration::instance().color ("neutral:foreground"));
|
|
|
|
CANVAS_DEBUG_NAME (bender_button, "bender button");
|
|
|
|
|
|
|
|
pressure_button = new ArdourCanvas::Button (button_bar, _("Pressure"), button_font);
|
|
|
|
pressure_button->text()->set_color (UIConfiguration::instance().color ("neutral:foreground"));
|
|
|
|
CANVAS_DEBUG_NAME (pressure_button, "pressure button");
|
|
|
|
|
|
|
|
expression_button = new ArdourCanvas::Button (button_bar, _("Expression"), button_font);
|
|
|
|
expression_button->text()->set_color (UIConfiguration::instance().color ("neutral:foreground"));
|
|
|
|
CANVAS_DEBUG_NAME (expression_button, "expression button");
|
|
|
|
|
|
|
|
modulation_button = new ArdourCanvas::Button (button_bar, _("Modulation"), button_font);
|
|
|
|
modulation_button->text()->set_color (UIConfiguration::instance().color ("neutral:foreground"));
|
|
|
|
CANVAS_DEBUG_NAME (modulation_button, "modulation button");
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
velocity_button->Event.connect (sigc::bind (sigc::mem_fun (*this, &MidiCueView::automation_button_event), ARDOUR::MidiVelocityAutomation, 0));
|
|
|
|
pressure_button->Event.connect (sigc::bind (sigc::mem_fun (*this, &MidiCueView::automation_button_event), ARDOUR::MidiChannelPressureAutomation, 0));
|
|
|
|
bender_button->Event.connect (sigc::bind (sigc::mem_fun (*this, &MidiCueView::automation_button_event), ARDOUR::MidiPitchBenderAutomation, 0));
|
|
|
|
modulation_button->Event.connect (sigc::bind (sigc::mem_fun (*this, &MidiCueView::automation_button_event), ARDOUR::MidiCCAutomation, MIDI_CTL_MSB_MODWHEEL));
|
|
|
|
expression_button->Event.connect (sigc::bind (sigc::mem_fun (*this, &MidiCueView::automation_button_event), ARDOUR::MidiCCAutomation, MIDI_CTL_MSB_EXPRESSION));
|
|
|
|
|
2024-06-11 17:14:03 -04:00
|
|
|
set_extensible (true);
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
Evoral::Parameter fully_qualified_param (ARDOUR::MidiVelocityAutomation, 0, 0);
|
|
|
|
update_automation_display (fully_qualified_param, SelectionSet);
|
2024-02-13 14:22:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::set_height (double h)
|
|
|
|
{
|
2024-11-05 16:59:20 -05:00
|
|
|
double bbw, bbh;
|
|
|
|
button_bar->size_request (bbw, bbh);
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
double note_area_height = ceil ((h - bbh) / 2.);
|
|
|
|
double automation_height = ceil (h - bbh - note_area_height);
|
2024-08-30 14:31:20 -04:00
|
|
|
|
|
|
|
event_rect->set (ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, note_area_height));
|
2024-10-22 16:41:40 -04:00
|
|
|
midi_context().set_size (midi_context().width(), note_area_height);
|
2024-09-11 20:37:47 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
automation_group->set_position (ArdourCanvas::Duple (0., note_area_height));
|
2024-09-11 20:37:47 -04:00
|
|
|
automation_group->set (ArdourCanvas::Rect (0., 0., ArdourCanvas::COORD_MAX, automation_height));
|
2024-08-30 14:31:20 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
button_bar->size_allocate (ArdourCanvas::Rect (0., note_area_height + automation_height, ArdourCanvas::COORD_MAX, note_area_height + automation_height + bbh));
|
2024-11-05 15:27:16 -05:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
for (auto & ads : automation_map) {
|
|
|
|
ads.second.set_height (automation_height);
|
2024-09-19 00:20:32 -04:00
|
|
|
}
|
|
|
|
|
2024-08-25 15:38:41 -04:00
|
|
|
view_changed ();
|
2024-02-13 14:22:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ArdourCanvas::Item*
|
|
|
|
MidiCueView::drag_group () const
|
|
|
|
{
|
2024-02-14 19:52:54 -05:00
|
|
|
return event_rect;
|
2024-02-13 14:22:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
MidiCueView::canvas_event (GdkEvent* ev)
|
|
|
|
{
|
|
|
|
return MidiView::canvas_group_event (ev);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
MidiCueView::scroll (GdkEventScroll* ev)
|
|
|
|
{
|
|
|
|
if (_editing_context.drags()->active()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier) ||
|
|
|
|
Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
|
|
|
|
|
|
|
|
switch (ev->direction) {
|
|
|
|
case GDK_SCROLL_UP:
|
|
|
|
_editing_context.reset_zoom (_editing_context.get_current_zoom() / 2);
|
|
|
|
return true;
|
|
|
|
case GDK_SCROLL_DOWN:
|
|
|
|
_editing_context.reset_zoom (_editing_context.get_current_zoom() * 2);
|
|
|
|
return true;
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return MidiView::scroll (ev);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::set_samples_per_pixel (double spp)
|
|
|
|
{
|
|
|
|
std::shared_ptr<Temporal::TempoMap> map;
|
|
|
|
Temporal::timecnt_t duration;
|
|
|
|
|
|
|
|
if (_midi_region) {
|
|
|
|
duration = Temporal::timecnt_t (_midi_region->midi_source()->length().beats());
|
|
|
|
map.reset (new Temporal::TempoMap (Temporal::Tempo (120, 4), Temporal::Meter (4, 4)));
|
|
|
|
} else {
|
|
|
|
duration = Temporal::timecnt_t (Temporal::Beats (4, 0));
|
|
|
|
map.reset (new Temporal::TempoMap (Temporal::Tempo (120, 4), Temporal::Meter (4, 4)));
|
|
|
|
}
|
|
|
|
|
|
|
|
EditingContext::TempoMapScope tms (_editing_context, map);
|
|
|
|
|
|
|
|
reset_width_dependent_items (_editing_context.duration_to_pixels (duration));
|
|
|
|
}
|
2024-06-22 00:19:28 -04:00
|
|
|
|
2024-08-30 14:31:20 -04:00
|
|
|
void
|
|
|
|
MidiCueView::clear_ghost_events ()
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->clear ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::ghosts_model_changed ()
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->clear ();
|
|
|
|
for (auto & ev : _events) {
|
|
|
|
velocity_display->add_note (ev.second);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::ghosts_view_changed ()
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->redisplay();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::ghost_remove_note (NoteBase* nb)
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->remove_note (nb);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::ghost_add_note (NoteBase* nb)
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->add_note (nb);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::ghost_sync_selection (NoteBase* nb)
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->note_selected (nb);
|
|
|
|
}
|
|
|
|
}
|
2024-09-11 20:37:47 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::update_sustained (Note* n)
|
|
|
|
{
|
|
|
|
MidiView::update_sustained (n);
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->update_note (n);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::update_hit (Hit* h)
|
|
|
|
{
|
|
|
|
MidiView::update_hit (h);
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->update_note (h);
|
|
|
|
}
|
|
|
|
}
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
bool
|
|
|
|
MidiCueView::automation_button_event (GdkEvent* ev, Evoral::ParameterType type, int id)
|
|
|
|
{
|
|
|
|
SelectionOperation op = ArdourKeyboard::selection_type (ev->button.state);
|
|
|
|
|
|
|
|
switch (ev->type) {
|
|
|
|
case GDK_BUTTON_RELEASE:
|
|
|
|
automation_button_click (type, id, op);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::automation_button_click (Evoral::ParameterType type, int id, SelectionOperation op)
|
|
|
|
{
|
|
|
|
#warning paul allow channel selection (2nd param)
|
|
|
|
update_automation_display (Evoral::Parameter (type, 0, id), op);
|
|
|
|
}
|
|
|
|
|
2024-09-19 00:05:02 -04:00
|
|
|
void
|
2024-11-07 18:10:31 -05:00
|
|
|
MidiCueView::update_automation_display (Evoral::Parameter const & param, SelectionOperation op)
|
2024-09-19 00:05:02 -04:00
|
|
|
{
|
|
|
|
using namespace ARDOUR;
|
|
|
|
|
2024-10-13 11:03:44 -04:00
|
|
|
if (!_midi_region) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
switch (param.type()) {
|
|
|
|
case MidiCCAutomation:
|
|
|
|
case MidiPgmChangeAutomation:
|
|
|
|
case MidiPitchBenderAutomation:
|
|
|
|
case MidiChannelPressureAutomation:
|
|
|
|
case MidiNotePressureAutomation:
|
|
|
|
case MidiSystemExclusiveAutomation:
|
|
|
|
case MidiVelocityAutomation:
|
|
|
|
break;
|
|
|
|
default:
|
2024-09-19 00:05:02 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
CueAutomationMap::iterator i = automation_map.find (param);
|
|
|
|
AutomationDisplayState* ads = nullptr;
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
if (i != automation_map.end()) {
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
ads = &i->second;
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
} else {
|
|
|
|
|
|
|
|
if (param.type() == MidiVelocityAutomation) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
std::shared_ptr<Evoral::Control> control = _midi_region->model()->control (param, true);
|
|
|
|
automation_control = std::dynamic_pointer_cast<AutomationControl> (control);
|
|
|
|
|
|
|
|
if (!automation_control) {
|
|
|
|
return;
|
|
|
|
}
|
2024-09-19 00:05:02 -04:00
|
|
|
|
2024-10-07 18:28:54 -04:00
|
|
|
automation_line.reset (new MidiCueAutomationLine ("whatevs",
|
|
|
|
_editing_context,
|
|
|
|
*automation_group,
|
|
|
|
automation_group,
|
|
|
|
automation_control->alist(),
|
|
|
|
automation_control->desc()));
|
2024-11-07 18:10:31 -05:00
|
|
|
AutomationDisplayState cad (automation_control, automation_line, true);
|
|
|
|
|
|
|
|
auto res = automation_map.insert (std::make_pair (param, cad));
|
|
|
|
|
|
|
|
ads = &((*res.first).second);
|
2024-09-19 00:05:02 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-07 18:10:31 -05:00
|
|
|
std::cerr << "sad " << op << " param " << enum_2_string (param.type()) << std::endl;
|
|
|
|
|
|
|
|
switch (op) {
|
|
|
|
case SelectionSet:
|
|
|
|
/* hide the rest */
|
|
|
|
for (auto & as : automation_map) {
|
|
|
|
as.second.hide ();
|
|
|
|
}
|
|
|
|
/*FALLTHRU*/
|
|
|
|
case SelectionAdd:
|
|
|
|
ads->set_height (automation_group->get().height());
|
|
|
|
ads->show ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SelectionRemove:
|
|
|
|
ads->hide ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SelectionToggle:
|
|
|
|
if (ads->visible) {
|
|
|
|
ads->hide ();
|
|
|
|
} else {
|
|
|
|
ads->set_height (automation_group->get().height());
|
|
|
|
ads->show ();
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SelectionExtend:
|
|
|
|
/* undefined in this context */
|
2024-09-19 00:05:02 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2024-10-07 15:20:11 -04:00
|
|
|
|
|
|
|
std::list<SelectableOwner*>
|
|
|
|
MidiCueView::selectable_owners()
|
|
|
|
{
|
|
|
|
std::list<SelectableOwner*> sl;
|
|
|
|
if (automation_line) {
|
2024-10-07 18:28:54 -04:00
|
|
|
sl.push_back (automation_line.get());
|
2024-10-07 15:20:11 -04:00
|
|
|
}
|
|
|
|
return sl;
|
|
|
|
}
|
2024-10-07 18:28:54 -04:00
|
|
|
|
|
|
|
MergeableLine*
|
|
|
|
MidiCueView::make_merger ()
|
|
|
|
{
|
|
|
|
return new MergeableLine (automation_line, automation_control,
|
2024-10-11 00:17:06 -04:00
|
|
|
[](Temporal::timepos_t const& t) { return t; },
|
2024-10-07 18:28:54 -04:00
|
|
|
nullptr, nullptr);
|
|
|
|
}
|
2024-10-09 13:34:01 -04:00
|
|
|
|
|
|
|
bool
|
|
|
|
MidiCueView::automation_rb_click (GdkEvent* event, Temporal::timepos_t const & pos)
|
|
|
|
{
|
2024-10-09 13:53:15 -04:00
|
|
|
bool with_guard_points = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
|
|
|
|
automation_line->add (automation_control, event, pos, event->button.y, with_guard_points);
|
2024-10-09 13:34:01 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-10-09 14:49:48 -04:00
|
|
|
void
|
|
|
|
MidiCueView::line_drag_click (GdkEvent* event, Temporal::timepos_t const & pos)
|
|
|
|
{
|
|
|
|
}
|
2024-11-07 18:10:31 -05:00
|
|
|
|
|
|
|
MidiCueView::AutomationDisplayState::~AutomationDisplayState()
|
|
|
|
{
|
|
|
|
delete velocity_display;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::AutomationDisplayState::hide ()
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->hide ();
|
|
|
|
} else if (line) {
|
|
|
|
line->hide_all ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::AutomationDisplayState::show ()
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
velocity_display->show ();
|
|
|
|
} else if (line) {
|
|
|
|
line->show ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MidiCueView::AutomationDisplayState::set_height (double h)
|
|
|
|
{
|
|
|
|
if (velocity_display) {
|
|
|
|
// velocity_display->set_height (h);
|
|
|
|
} else if (line) {
|
|
|
|
line->set_height (h);
|
|
|
|
}
|
|
|
|
}
|