first working visual evidence of MIDI display/editing on cue page
This commit is contained in:
parent
193b39048d
commit
dc3cccdf57
|
@ -81,19 +81,16 @@ MidiClipEditorBox::set_session (Session* s)
|
|||
void
|
||||
MidiClipEditorBox::set_region (std::shared_ptr<Region> r, TriggerReference /*notused*/)
|
||||
{
|
||||
delete _midi_view;
|
||||
_midi_view = nullptr;
|
||||
|
||||
if (!r) {
|
||||
set_session (nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
set_session (&r->session ());
|
||||
|
||||
state_connection.disconnect ();
|
||||
|
||||
_region = r;
|
||||
|
||||
PBD::PropertyChange interesting_stuff;
|
||||
region_changed (interesting_stuff);
|
||||
|
||||
_region->PropertyChanged.connect (state_connection, invalidator (*this), boost::bind (&MidiClipEditorBox::region_changed, this, _1), gui_context ());
|
||||
editor->set_region (r);
|
||||
}
|
||||
|
||||
void
|
||||
MidiClipEditorBox::region_changed (const PBD::PropertyChange& what_changed)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -102,8 +102,15 @@ MidiCueEditor::build_canvas ()
|
|||
|
||||
std::cerr << "New CMB\n";
|
||||
bg = new CueMidiBackground (hv_scroll_group);
|
||||
|
||||
_canvas_viewport->signal_size_allocate().connect (sigc::mem_fun(*this, &MidiCueEditor::canvas_allocate));
|
||||
}
|
||||
|
||||
void
|
||||
MidiCueEditor::canvas_allocate (Gtk::Allocation alloc)
|
||||
{
|
||||
bg->set_size (alloc.get_width(), alloc.get_height());
|
||||
}
|
||||
|
||||
timepos_t
|
||||
MidiCueEditor::snap_to_grid (timepos_t const & presnap, Temporal::RoundMode direction, SnapPref gpref) const
|
||||
|
|
|
@ -109,6 +109,7 @@ class MidiCueEditor : public CueEditor
|
|||
MidiView* view;
|
||||
|
||||
void build_canvas ();
|
||||
void canvas_allocate (Gtk::Allocation);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -129,6 +129,8 @@ MidiViewBackground::update_note_range(uint8_t note_num)
|
|||
void
|
||||
MidiViewBackground::update_contents_height ()
|
||||
{
|
||||
ViewBackground::update_contents_height ();
|
||||
|
||||
_note_lines->set_extent (ArdourCanvas::COORD_MAX);
|
||||
apply_note_range (lowest_note(), highest_note(), true);
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "trigger_ui.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "audio_clip_editor.h"
|
||||
#include "audio_region_properties_box.h"
|
||||
#include "audio_trigger_properties_box.h"
|
||||
#include "audio_region_operations_box.h"
|
||||
|
@ -56,7 +57,7 @@
|
|||
#include "midi_trigger_properties_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "midi_region_operations_box.h"
|
||||
#include "midi_clip_editor.h"
|
||||
#include "midi_cue_editor.h"
|
||||
|
||||
#include "slot_properties_box.h"
|
||||
|
||||
|
@ -743,20 +744,23 @@ SlotPropertyWindow::SlotPropertyWindow (TriggerReference tref)
|
|||
_trim_box = manage(new AudioClipEditorBox ());
|
||||
|
||||
_trig_box->set_trigger (tref);
|
||||
_trim_box->set_region(trigger->region(), tref);
|
||||
_ops_box->set_session(&trigger->region()->session());
|
||||
|
||||
table->attach(*_trig_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
|
||||
} else {
|
||||
_trig_box = manage(new MidiTriggerPropertiesBox ());
|
||||
_ops_box = manage(new MidiRegionOperationsBox ());
|
||||
_trim_box = manage(new MidiClipEditorBox ());
|
||||
|
||||
_trig_box->set_trigger (tref);
|
||||
|
||||
_midi_editor = new MidiCueEditor;
|
||||
_midi_editor->set_region (std::shared_ptr<MidiTrack>(), trigger->region());
|
||||
|
||||
table->attach(*_trig_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(_midi_editor->viewport(), col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
}
|
||||
|
||||
_trim_box->set_region(trigger->region(), tref);
|
||||
_ops_box->set_session(&trigger->region()->session());
|
||||
|
||||
table->attach(*_trig_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
}
|
||||
|
||||
add (*table);
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace ARDOUR {
|
|||
class TriggerPropertiesBox;
|
||||
class RegionPropertiesBox;
|
||||
class RegionOperationsBox;
|
||||
class MidiCueEditor;
|
||||
class ClipEditorBox;
|
||||
|
||||
class SlotPropertyTable : public TriggerUI, public Gtk::Table
|
||||
|
@ -180,5 +181,6 @@ class SlotPropertyWindow : public Gtk::Window
|
|||
TriggerPropertiesBox *_trig_box;
|
||||
RegionOperationsBox *_ops_box;
|
||||
ClipEditorBox *_trim_box;
|
||||
MidiCueEditor* _midi_editor;
|
||||
};
|
||||
#endif /* __multi_region_properties_box_h__ */
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
#include "editor.h"
|
||||
#include "gui_thread.h"
|
||||
#include "public_editor.h"
|
||||
#include "midi_cue_editor.h"
|
||||
#include "timers.h"
|
||||
|
||||
#include "trigger_page.h"
|
||||
#include "trigger_strip.h"
|
||||
#include "triggerbox_ui.h"
|
||||
|
@ -134,6 +134,8 @@ TriggerPage::TriggerPage ()
|
|||
_pane_upper.add (_strip_group_box);
|
||||
_pane_upper.add (_sidebar_vbox);
|
||||
|
||||
_midi_editor = new MidiCueEditor;
|
||||
|
||||
/* Bottom -- Properties of selected Slot/Region */
|
||||
Gtk::Table* table = manage (new Gtk::Table);
|
||||
table->set_homogeneous (false);
|
||||
|
@ -152,7 +154,7 @@ TriggerPage::TriggerPage ()
|
|||
++col;
|
||||
|
||||
col = 3;
|
||||
table->attach (_midi_trim_box, col, col + 1, 0, 1, Gtk::EXPAND, Gtk::SHRINK);
|
||||
table->attach (_midi_editor->viewport(), col, col + 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
|
||||
++col;
|
||||
|
||||
_parameter_box.pack_start (*table);
|
||||
|
@ -283,8 +285,7 @@ TriggerPage::set_session (Session* s)
|
|||
|
||||
_audio_trig_box.set_session (s);
|
||||
|
||||
_midi_trig_box.set_session (s);
|
||||
_midi_trim_box.set_session (s);
|
||||
_midi_editor->set_session (s);
|
||||
|
||||
update_title ();
|
||||
start_updating ();
|
||||
|
@ -389,7 +390,7 @@ TriggerPage::selection_changed ()
|
|||
_audio_trig_box.hide ();
|
||||
|
||||
_midi_trig_box.hide ();
|
||||
_midi_trim_box.hide ();
|
||||
_midi_editor->viewport().hide ();
|
||||
|
||||
_parameter_box.hide ();
|
||||
|
||||
|
@ -410,7 +411,7 @@ TriggerPage::selection_changed ()
|
|||
_midi_trig_box.show ();
|
||||
|
||||
// _midi_trim_box.set_trigger (ref);
|
||||
_midi_trim_box.show ();
|
||||
_midi_editor->viewport().show ();
|
||||
}
|
||||
}
|
||||
_parameter_box.show ();
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "audio_trigger_properties_box.h"
|
||||
#include "cuebox_ui.h"
|
||||
#include "fitted_canvas_widget.h"
|
||||
#include "midi_clip_editor.h"
|
||||
#include "midi_region_operations_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "midi_trigger_properties_box.h"
|
||||
|
@ -47,6 +46,7 @@
|
|||
#include "trigger_master.h"
|
||||
|
||||
class TriggerStrip;
|
||||
class MidiCueEditor;
|
||||
|
||||
class TriggerPage : public ArdourWidgets::Tabbable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList, public AxisViewProvider
|
||||
{
|
||||
|
@ -135,8 +135,7 @@ private:
|
|||
AudioClipEditorBox _audio_trim_box;
|
||||
#endif
|
||||
|
||||
MidiRegionOperationsBox _midi_ops_box;
|
||||
MidiClipEditorBox _midi_trim_box;
|
||||
MidiCueEditor* _midi_editor;
|
||||
|
||||
RouteProcessorSelection _selection;
|
||||
std::list<TriggerStrip*> _strips;
|
||||
|
|
|
@ -159,7 +159,7 @@ gtk2_ardour_sources = [
|
|||
'midi_automation_line.cc',
|
||||
'midi_channel_dialog.cc',
|
||||
'midi_channel_selector.cc',
|
||||
'midi_clip_editor.cc',
|
||||
'midi_cue_background.cc',
|
||||
'midi_cue_editor.cc',
|
||||
'midi_cut_buffer.cc',
|
||||
'midi_export_dialog.cc',
|
||||
|
@ -340,6 +340,7 @@ gtk2_ardour_sources = [
|
|||
'vca_time_axis.cc',
|
||||
'video_timeline.cc',
|
||||
'video_monitor.cc',
|
||||
'view_background.cc',
|
||||
'transcode_ffmpeg.cc',
|
||||
'transcode_video_dialog.cc',
|
||||
'velocity_ghost_region.cc',
|
||||
|
|
Loading…
Reference in New Issue
Block a user