-/** Prompt for a controller with a dialog and add an automation track for it
- */
-void
-MidiTimeAxisView::add_cc_track()
-{
- int response;
- Evoral::Parameter param(0, 0, 0);
-
- {
- AddMidiCCTrackDialog dialog;
- dialog.set_transient_for (_editor);
- response = dialog.run();
-
- if (response == Gtk::RESPONSE_ACCEPT)
- param = dialog.parameter();
- }
-
- if (param.type() != 0 && response == Gtk::RESPONSE_ACCEPT)
- create_automation_child(param, true);
-}
-
-/** Toggle an automation track for the given parameter (pitch bend, channel pressure).
- * Will add track if necessary.
- */
-void
-MidiTimeAxisView::toggle_parameter_track(const Evoral::Parameter& param)
-{
- if (_ignore_toggle_parameter) {
- return;
- }
-
- cerr << "CHANGE VISIBILITY OF " << param.type() << '/' << param.id() << '/' << (int) param.channel() << endl;
-
- if ( !EventTypeMap::instance().is_midi_parameter(param) ) {
- error << "MidiTimeAxisView: unknown automation child "
- << ARDOUR::EventTypeMap::instance().to_symbol(param) << endmsg;
- return;
- }
-
- map<Evoral::Parameter,CheckMenuItem*>::iterator x = parameter_menu_map.find (param);
- if (x == parameter_menu_map.end()) {
- cerr << "Param not found in pm map\n";
- return;
- }
-
- bool yn = x->second->get_active ();
- cerr << "Menu item state for " << param.type() << '/' << param.id() << '/' << (int) param.channel() << ' ' << yn << endl;
-
- cerr << "toggle param " << param.type() << '/' << param.id() << '/' << (int) param.channel() << " from " << !yn << " to " << yn << endl;
-
- // create the parameter lane for each selected channel
- uint16_t selected_channels = _channel_selector.get_selected_channels();
-
- for (uint8_t i = 0; i < 16; i++) {
- if (selected_channels & (0x0001 << i)) {
- Evoral::Parameter param_with_channel(param.type(), i, param.id());
-
- RouteAutomationNode* node = automation_track (param_with_channel);
-
- if (!node) {
- cerr << "\tNO EXISTING TRACK FOR chn " << (int) i << endl;
- if (yn) {
- create_automation_child (param_with_channel, true);
- }
- } else {
- cerr << "\tTRACK EXISTS, set its menu item to " << yn << " to change its visibilty\n";
- node->menu_item->set_active (yn);
- }
- }
- }
-
- _ignore_toggle_parameter = true;
- x->second->set_active (yn);
- _ignore_toggle_parameter = false;
-}
-