add MIDI input control column to editor route list; tweak SVG for MIDI not DIN
git-svn-id: svn://localhost/ardour2/branches/3.0@9779 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
10e12dc287
commit
67e21fd82e
|
@ -87,11 +87,29 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
|
||||
rec_state_column->add_attribute(rec_col_renderer->property_state(), _columns.rec_state);
|
||||
rec_state_column->add_attribute(rec_col_renderer->property_visible(), _columns.is_track);
|
||||
|
||||
rec_state_column->set_sizing(TREE_VIEW_COLUMN_FIXED);
|
||||
rec_state_column->set_alignment(ALIGN_CENTER);
|
||||
rec_state_column->set_expand(false);
|
||||
rec_state_column->set_fixed_width(15);
|
||||
|
||||
// MIDI Input Active
|
||||
|
||||
CellRendererPixbufMulti* input_active_col_renderer = manage (new CellRendererPixbufMulti());
|
||||
input_active_col_renderer->set_pixbuf (0, ::get_icon("midi_socket_small"));
|
||||
input_active_col_renderer->set_pixbuf (1, ::get_icon("midi_socket_small"));
|
||||
input_active_col_renderer->signal_changed().connect (sigc::mem_fun (*this, &EditorRoutes::on_input_active_changed));
|
||||
|
||||
TreeViewColumn* input_active_column = manage (new TreeViewColumn ("I", *input_active_col_renderer));
|
||||
|
||||
input_active_column->add_attribute(input_active_col_renderer->property_state(), _columns.is_input_active);
|
||||
input_active_column->add_attribute (input_active_col_renderer->property_visible(), _columns.is_midi);
|
||||
|
||||
input_active_column->set_sizing(TREE_VIEW_COLUMN_FIXED);
|
||||
input_active_column->set_alignment(ALIGN_CENTER);
|
||||
input_active_column->set_expand(false);
|
||||
input_active_column->set_fixed_width(20);
|
||||
|
||||
// Mute enable toggle
|
||||
CellRendererPixbufMulti* mute_col_renderer = manage (new CellRendererPixbufMulti());
|
||||
|
||||
|
@ -153,16 +171,15 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
solo_safe_state_column->set_expand(false);
|
||||
solo_safe_state_column->set_fixed_width(22);
|
||||
|
||||
_display.append_column (*input_active_column);
|
||||
_display.append_column (*rec_state_column);
|
||||
_display.append_column (*mute_state_column);
|
||||
_display.append_column (*solo_state_column);
|
||||
_display.append_column (*solo_isolate_state_column);
|
||||
_display.append_column (*solo_safe_state_column);
|
||||
|
||||
int colnum = _display.append_column (_("Name"), _columns.text);
|
||||
TreeViewColumn* c = _display.get_column (colnum-1);
|
||||
c->set_data ("i_am_the_tab_column", (void*) 0xfeedface);
|
||||
_display.append_column (_("V"), _columns.visible);
|
||||
_name_column = _display.append_column (_("Name"), _columns.text) - 1;
|
||||
_visible_column = _display.append_column (_("V"), _columns.visible) - 1;
|
||||
|
||||
_display.set_headers_visible (true);
|
||||
_display.set_name ("TrackListDisplay");
|
||||
|
@ -173,12 +190,12 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
_display.set_size_request (100, -1);
|
||||
_display.add_object_drag (_columns.route.index(), "routes");
|
||||
|
||||
CellRendererText* name_cell = dynamic_cast<CellRendererText*> (_display.get_column_cell_renderer (5));
|
||||
CellRendererText* name_cell = dynamic_cast<CellRendererText*> (_display.get_column_cell_renderer (_name_column));
|
||||
|
||||
assert (name_cell);
|
||||
name_cell->signal_editing_started().connect (sigc::mem_fun (*this, &EditorRoutes::name_edit_started));
|
||||
|
||||
TreeViewColumn* name_column = _display.get_column (5);
|
||||
TreeViewColumn* name_column = _display.get_column (_name_column);
|
||||
|
||||
assert (name_column);
|
||||
|
||||
|
@ -191,13 +208,13 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
name_cell->signal_edited().connect (sigc::mem_fun (*this, &EditorRoutes::name_edit));
|
||||
|
||||
// Set the visible column cell renderer to radio toggle
|
||||
CellRendererToggle* visible_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (6));
|
||||
CellRendererToggle* visible_cell = dynamic_cast<CellRendererToggle*> (_display.get_column_cell_renderer (_visible_column));
|
||||
|
||||
visible_cell->property_activatable() = true;
|
||||
visible_cell->property_radio() = false;
|
||||
visible_cell->signal_toggled().connect (sigc::mem_fun (*this, &EditorRoutes::visible_changed));
|
||||
|
||||
TreeViewColumn* visible_col = dynamic_cast<TreeViewColumn*> (_display.get_column (6));
|
||||
TreeViewColumn* visible_col = dynamic_cast<TreeViewColumn*> (_display.get_column (_visible_column));
|
||||
visible_col->set_expand(false);
|
||||
visible_col->set_sizing(TREE_VIEW_COLUMN_FIXED);
|
||||
visible_col->set_fixed_width(30);
|
||||
|
@ -291,6 +308,24 @@ EditorRoutes::set_session (Session* s)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::on_input_active_changed (std::string const & path_string)
|
||||
{
|
||||
// Get the model row that has been toggled.
|
||||
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
|
||||
|
||||
TimeAxisView* tv = row[_columns.tv];
|
||||
RouteTimeAxisView *rtv = dynamic_cast<RouteTimeAxisView*> (tv);
|
||||
|
||||
if (rtv) {
|
||||
boost::shared_ptr<MidiTrack> mt;
|
||||
mt = rtv->midi_track();
|
||||
if (mt) {
|
||||
mt->set_input_active (!mt->input_active());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::on_tv_rec_enable_changed (std::string const & path_string)
|
||||
{
|
||||
|
@ -517,6 +552,8 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
|
||||
for (list<RouteTimeAxisView*>::iterator x = routes.begin(); x != routes.end(); ++x) {
|
||||
|
||||
boost::shared_ptr<MidiTrack> midi_trk = boost::dynamic_pointer_cast<MidiTrack> ((*x)->route());
|
||||
|
||||
row = *(_model->append ());
|
||||
|
||||
row[_columns.text] = (*x)->route()->name();
|
||||
|
@ -524,6 +561,15 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
row[_columns.tv] = *x;
|
||||
row[_columns.route] = (*x)->route ();
|
||||
row[_columns.is_track] = (boost::dynamic_pointer_cast<Track> ((*x)->route()) != 0);
|
||||
|
||||
if (midi_trk) {
|
||||
row[_columns.is_input_active] = midi_trk->input_active ();
|
||||
row[_columns.is_midi] = true;
|
||||
} else {
|
||||
row[_columns.is_input_active] = false;
|
||||
row[_columns.is_midi] = false;
|
||||
}
|
||||
|
||||
row[_columns.mute_state] = (*x)->route()->muted();
|
||||
row[_columns.solo_state] = RouteUI::solo_visual_state ((*x)->route());
|
||||
row[_columns.solo_isolate_state] = (*x)->route()->solo_isolated();
|
||||
|
@ -552,6 +598,7 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
if ((*x)->is_midi_track()) {
|
||||
boost::shared_ptr<MidiTrack> t = boost::dynamic_pointer_cast<MidiTrack> ((*x)->route());
|
||||
t->StepEditStatusChange.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::update_rec_display, this), gui_context());
|
||||
t->InputActiveChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::update_input_active_display, this), gui_context());
|
||||
}
|
||||
|
||||
(*x)->route()->mute_changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::update_mute_display, this), gui_context());
|
||||
|
@ -566,6 +613,7 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
update_solo_display (true);
|
||||
update_solo_isolate_display ();
|
||||
update_solo_safe_display ();
|
||||
update_input_active_display ();
|
||||
resume_redisplay ();
|
||||
_redisplay_does_not_sync_order_keys = false;
|
||||
}
|
||||
|
@ -911,7 +959,7 @@ EditorRoutes::key_press (GdkEventKey* ev)
|
|||
name_editable = 0;
|
||||
}
|
||||
|
||||
col = _display.get_column (5); // select&focus on name column
|
||||
col = _display.get_column (_name_column); // select&focus on name column
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
treeview_select_previous (_display, _model, col);
|
||||
|
@ -1235,6 +1283,25 @@ EditorRoutes::move_selected_tracks (bool up)
|
|||
_session->sync_order_keys (N_ ("editor"));
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::update_input_active_display ()
|
||||
{
|
||||
TreeModel::Children rows = _model->children();
|
||||
TreeModel::Children::iterator i;
|
||||
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
boost::shared_ptr<Route> route = (*i)[_columns.route];
|
||||
|
||||
if (boost::dynamic_pointer_cast<Track> (route)) {
|
||||
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (route);
|
||||
|
||||
if (mt) {
|
||||
(*i)[_columns.is_input_active] = mt->input_active();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorRoutes::update_rec_display ()
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
private:
|
||||
|
||||
void initial_display ();
|
||||
void on_input_active_changed (std::string const &);
|
||||
void on_tv_rec_enable_changed (std::string const &);
|
||||
void on_tv_mute_enable_toggled (std::string const &);
|
||||
void on_tv_solo_enable_toggled (std::string const &);
|
||||
|
@ -77,6 +78,7 @@ private:
|
|||
void update_solo_display (bool);
|
||||
void update_solo_isolate_display ();
|
||||
void update_solo_safe_display ();
|
||||
void update_input_active_display ();
|
||||
void set_all_tracks_visibility (bool);
|
||||
void set_all_audio_midi_visibility (int, bool);
|
||||
void show_all_routes ();
|
||||
|
@ -111,9 +113,11 @@ private:
|
|||
add (tv);
|
||||
add (route);
|
||||
add (name_editable);
|
||||
add (is_input_active);
|
||||
add (is_midi);
|
||||
}
|
||||
|
||||
Gtk::TreeModelColumn<std::string> text;
|
||||
Gtk::TreeModelColumn<std::string> text;
|
||||
Gtk::TreeModelColumn<bool> visible;
|
||||
Gtk::TreeModelColumn<uint32_t> rec_state;
|
||||
Gtk::TreeModelColumn<uint32_t> mute_state;
|
||||
|
@ -124,12 +128,16 @@ private:
|
|||
Gtk::TreeModelColumn<TimeAxisView*> tv;
|
||||
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
|
||||
Gtk::TreeModelColumn<bool> name_editable;
|
||||
Gtk::TreeModelColumn<bool> is_input_active;
|
||||
Gtk::TreeModelColumn<bool> is_midi;
|
||||
};
|
||||
|
||||
Gtk::ScrolledWindow _scroller;
|
||||
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
|
||||
Glib::RefPtr<Gtk::ListStore> _model;
|
||||
ModelColumns _columns;
|
||||
int _name_column;
|
||||
int _visible_column;
|
||||
|
||||
bool _ignore_reorder;
|
||||
bool _no_redisplay;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 742 B |
|
@ -409,10 +409,14 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
midi_input_enable_button->set_image (*img);
|
||||
midi_input_enable_button->signal_toggled().connect (sigc::mem_fun (*this, &MixerStrip::midi_input_toggled));
|
||||
ARDOUR_UI::instance()->set_tip (midi_input_enable_button, _("Enable/Disable MIDI input"));
|
||||
} else {
|
||||
input_button_box.remove (*midi_input_enable_button);
|
||||
}
|
||||
/* get current state */
|
||||
midi_input_status_changed ();
|
||||
input_button_box.pack_start (*midi_input_enable_button, false, false);
|
||||
/* follow changes */
|
||||
midi_track()->InputActiveChanged.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::midi_input_status_changed, this), gui_context());
|
||||
} else {
|
||||
if (midi_input_enable_button) {
|
||||
/* removal from the container will delete it */
|
||||
|
@ -1807,7 +1811,6 @@ MixerStrip::on_key_press_event (GdkEventKey* ev)
|
|||
break;
|
||||
|
||||
case GDK_r:
|
||||
cerr << "Stole that r\n";
|
||||
rec_enable_press (&fake);
|
||||
return true;
|
||||
break;
|
||||
|
@ -1860,7 +1863,6 @@ MixerStrip::on_key_release_event (GdkEventKey* ev)
|
|||
break;
|
||||
|
||||
case GDK_r:
|
||||
cerr << "Stole that r\n";
|
||||
rec_enable_release (&fake);
|
||||
return true;
|
||||
break;
|
||||
|
@ -1931,7 +1933,6 @@ MixerStrip::midi_input_status_changed ()
|
|||
if (midi_input_enable_button) {
|
||||
boost::shared_ptr<MidiTrack> mt = midi_track ();
|
||||
assert (mt);
|
||||
cerr << "track input active? " << mt->input_active() << endl;
|
||||
midi_input_enable_button->set_active (mt->input_active ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
id="Layer_1"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.47 r22583"
|
||||
sodipodi:docname="DIN-5c_Diagram.svg"
|
||||
sodipodi:docname="midi_socket.svg"
|
||||
inkscape:export-filename="/tmp/DIN-5c_Diagram.png"
|
||||
inkscape:export-xdpi="4.48"
|
||||
inkscape:export-ydpi="4.48"><metadata
|
||||
inkscape:export-xdpi="3.46"
|
||||
inkscape:export-ydpi="3.46"><metadata
|
||||
id="metadata13"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
||||
|
@ -35,13 +35,14 @@
|
|||
inkscape:window-height="879"
|
||||
id="namedview11"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.51868132"
|
||||
inkscape:cx="-144.59796"
|
||||
inkscape:cy="223.64407"
|
||||
inkscape:window-x="435"
|
||||
inkscape:zoom="1.0373626"
|
||||
inkscape:cx="-141.70601"
|
||||
inkscape:cy="219.78814"
|
||||
inkscape:window-x="294"
|
||||
inkscape:window-y="77"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" /><defs
|
||||
inkscape:current-layer="Layer_1"
|
||||
inkscape:snap-grids="false" /><defs
|
||||
id="defs4733"><inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 227.5 : 1"
|
||||
|
@ -56,23 +57,23 @@
|
|||
id="path4718" />
|
||||
|
||||
<path
|
||||
d="M 103.738,283.004 C 110.684,295.034 126.065,299.151 138.093,292.206 C 150.125,285.26 154.245,269.882 147.3,257.853 C 140.359,245.83 124.979,241.705 112.946,248.651 C 100.918,255.597 96.796,270.982 103.738,283.004 z "
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:5;fill-opacity:1"
|
||||
d="m 72.890542,234.80485 c 6.946,12.03 22.327,16.147 34.354998,9.202 12.032,-6.946 16.152,-22.324 9.207,-34.353 -6.941,-12.023 -22.320998,-16.148 -34.353998,-9.202 -12.028,6.946 -16.15,22.331 -9.208,34.353 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5"
|
||||
id="path4722" />
|
||||
<path
|
||||
d="M 147.298,176.572 C 154.244,164.542 150.119,149.163 138.091,142.219 C 126.059,135.272 110.683,139.394 103.737,151.422 C 96.796,163.445 100.913,178.827 112.944,185.774 C 124.974,192.718 140.356,188.595 147.298,176.572 z "
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:5;fill-opacity:1"
|
||||
d="m 147.298,155.36437 c 6.946,-12.03 2.821,-27.409 -9.207,-34.353 -12.032,-6.947 -27.408,-2.825 -34.354,9.203 -6.941,12.023 -2.824,27.405 9.207,34.352 12.03,6.944 27.412,2.821 34.354,-9.202 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5"
|
||||
id="path4724" />
|
||||
<path
|
||||
d="M 217.693,135.931 C 231.584,135.931 242.84,124.669 242.84,110.781 C 242.84,96.886 231.582,85.632 217.693,85.632 C 203.81,85.632 192.547,96.889 192.547,110.781 C 192.548,124.67 203.81,135.931 217.693,135.931 z "
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:5;fill-opacity:1"
|
||||
d="m 217.693,128.21914 c 13.891,0 25.147,-11.262 25.147,-25.15 0,-13.895005 -11.258,-25.149005 -25.147,-25.149005 -13.883,0 -25.146,11.257 -25.146,25.149005 0.001,13.889 11.263,25.15 25.146,25.15 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5"
|
||||
id="path4726" />
|
||||
<path
|
||||
d="M 288.086,176.571 C 295.032,188.601 310.413,192.718 322.44,185.774 C 334.473,178.827 338.591,163.45 331.646,151.421 C 324.705,139.398 309.325,135.273 297.293,142.219 C 285.266,149.165 281.145,164.549 288.086,176.571 z "
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:5;fill-opacity:1"
|
||||
d="m 293.8699,152.47142 c 6.946,12.03 22.327,16.147 34.354,9.203 12.033,-6.947 16.151,-22.324 9.206,-34.353 -6.941,-12.023 -22.321,-16.148 -34.353,-9.202 -12.027,6.946 -16.148,22.33 -9.207,34.352 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5"
|
||||
id="path4728" />
|
||||
<path
|
||||
d="M 331.646,283.005 C 338.592,270.975 334.467,255.597 322.438,248.651 C 310.406,241.705 295.029,245.826 288.084,257.854 C 281.143,269.876 285.26,285.259 297.292,292.206 C 309.321,299.151 324.705,295.029 331.646,283.005 z "
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:5;fill-opacity:1"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5"
|
||||
d="m 346.90245,195.1555 c -8.49192,0.18976 -16.66109,4.66913 -21.21875,12.5625 -6.941,12.022 -2.81325,27.428 9.21875,34.375 12.029,6.945 27.40275,2.80525 34.34375,-9.21875 6.946,-12.03 2.81025,-27.39775 -9.21875,-34.34375 -4.136,-2.38769 -8.67685,-3.4744 -13.125,-3.375 z"
|
||||
id="path4730" />
|
||||
</svg>
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
@ -39,6 +39,8 @@ public:
|
|||
MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
|
||||
~MidiTrack ();
|
||||
|
||||
int init ();
|
||||
|
||||
int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
|
||||
|
||||
|
@ -129,6 +131,7 @@ protected:
|
|||
NoteMode _note_mode;
|
||||
bool _step_editing;
|
||||
bool _midi_thru;
|
||||
bool _input_active;
|
||||
|
||||
int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||
bool state_changing, bool can_record, bool rec_monitors_input);
|
||||
|
@ -136,6 +139,9 @@ protected:
|
|||
|
||||
void diskstream_data_recorded (boost::shared_ptr<MidiBuffer>, boost::weak_ptr<MidiSource>);
|
||||
PBD::ScopedConnection _diskstream_data_recorded_connection;
|
||||
|
||||
void track_input_active (IOChange, void*);
|
||||
void map_input_active (bool);
|
||||
};
|
||||
|
||||
} /* namespace ARDOUR*/
|
||||
|
|
|
@ -582,6 +582,7 @@ LV2Plugin::add_state(XMLNode* root) const
|
|||
|
||||
if (_supports_persist) {
|
||||
// Create state directory for this plugin instance
|
||||
cerr << "Create statefile name from ID " << _insert_id << endl;
|
||||
const std::string state_filename = _insert_id.to_s() + ".rdff";
|
||||
const std::string state_path = Glib::build_filename(
|
||||
_session.plugins_dir(), state_filename);
|
||||
|
|
|
@ -57,6 +57,7 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo
|
|||
, _note_mode(Sustained)
|
||||
, _step_editing (false)
|
||||
, _midi_thru (true)
|
||||
, _input_active (true)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -64,6 +65,18 @@ MidiTrack::~MidiTrack ()
|
|||
{
|
||||
}
|
||||
|
||||
int
|
||||
MidiTrack::init ()
|
||||
{
|
||||
if (Track::init ()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
_input->changed.connect_same_thread (*this, boost::bind (&MidiTrack::track_input_active, this, _1, _2));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
MidiTrack::use_new_diskstream ()
|
||||
{
|
||||
|
@ -146,7 +159,11 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
|
|||
}
|
||||
|
||||
if ((prop = node.property ("midi-thru")) != 0) {
|
||||
set_midi_thru (prop->value() == "yes");
|
||||
set_midi_thru (string_is_affirmative (prop->value()));
|
||||
}
|
||||
|
||||
if ((prop = node.property ("input-active")) != 0) {
|
||||
set_input_active (string_is_affirmative (prop->value()));
|
||||
}
|
||||
|
||||
XMLNodeList nlist;
|
||||
|
@ -222,6 +239,7 @@ MidiTrack::state(bool full_state)
|
|||
root.add_property ("step-editing", (_step_editing ? "yes" : "no"));
|
||||
root.add_property ("note-mode", enum_2_string (_note_mode));
|
||||
root.add_property ("midi-thru", (_midi_thru ? "yes" : "no"));
|
||||
root.add_property ("input-active", (_input_active ? "yes" : "no"));
|
||||
|
||||
return root;
|
||||
}
|
||||
|
@ -677,8 +695,24 @@ MidiTrack::send_silence () const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
MidiTrack::input_active () const
|
||||
{
|
||||
return _input_active;
|
||||
}
|
||||
|
||||
void
|
||||
MidiTrack::set_input_active (bool yn)
|
||||
{
|
||||
if (yn != _input_active) {
|
||||
_input_active = yn;
|
||||
map_input_active (yn);
|
||||
InputActiveChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiTrack::map_input_active (bool yn)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
|
@ -695,27 +729,13 @@ MidiTrack::set_input_active (bool yn)
|
|||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
InputActiveChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MidiTrack::input_active () const
|
||||
void
|
||||
MidiTrack::track_input_active (IOChange change, void* /* src */)
|
||||
{
|
||||
if (!_input) {
|
||||
cerr << " no input\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_input->ports().count().n_midi() == 0) {
|
||||
cerr << "no input MIDI ports, " << _input->ports().count() << endl;
|
||||
return false;
|
||||
if (change.type & IOChange::ConfigurationChanged) {
|
||||
map_input_active (_input_active);
|
||||
}
|
||||
|
||||
PortSet::iterator p = _input->ports().begin(DataType::MIDI);
|
||||
MidiPort* mp = dynamic_cast<MidiPort*> (&*p);
|
||||
cerr << "first port is active: " << mp->input_active() << endl;
|
||||
return mp->input_active ();
|
||||
}
|
||||
|
||||
|
|
|
@ -70,9 +70,7 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug)
|
|||
/* the first is the master */
|
||||
|
||||
if (plug) {
|
||||
plug->set_insert_info (this);
|
||||
_plugins.push_back (plug);
|
||||
|
||||
add_plugin (plug);
|
||||
create_automatable_parameters ();
|
||||
|
||||
Glib::Mutex::Lock em (_session.engine().process_lock());
|
||||
|
@ -884,6 +882,17 @@ PluginInsert::set_state(const XMLNode& node, int version)
|
|||
|
||||
uint32_t count = 1;
|
||||
|
||||
#if 0
|
||||
// Processor::set_state() will set this, but too late
|
||||
// for it to be available when setting up plugin
|
||||
// state. We can't call Processor::set_state() until
|
||||
// the plugins themselves are created and added.
|
||||
|
||||
if ((prop = node.property ("id")) != 0) {
|
||||
_id = prop->value();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_plugins.empty()) {
|
||||
/* if we are adding the first plugin, we will need to set
|
||||
up automatable controls.
|
||||
|
@ -903,6 +912,8 @@ PluginInsert::set_state(const XMLNode& node, int version)
|
|||
}
|
||||
}
|
||||
|
||||
Processor::set_state (node, version);
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
|
||||
/* find the node with the type-specific node name ("lv2", "ladspa", etc)
|
||||
|
@ -921,8 +932,6 @@ PluginInsert::set_state(const XMLNode& node, int version)
|
|||
}
|
||||
}
|
||||
|
||||
Processor::set_state (node, version);
|
||||
|
||||
if (version < 3000) {
|
||||
|
||||
/* Only 2.X sessions need a call to set_parameter_state() - in 3.X and above
|
||||
|
|
Loading…
Reference in New Issue
Block a user