* moved /midi_patch_manager.* to libs/ardour
* GUI improvement: do away with the midi channel expander git-svn-id: svn://localhost/ardour2/branches/3.0@4305 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -201,7 +201,6 @@ midi_region_view.cc
|
||||
midi_scroomer.cc
|
||||
midi_streamview.cc
|
||||
midi_time_axis.cc
|
||||
midi_patch_manager.cc
|
||||
mixer_strip.cc
|
||||
mixer_ui.cc
|
||||
new_session_dialog.cc
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <ardour/midi_playlist.h>
|
||||
#include <ardour/midi_diskstream.h>
|
||||
#include <ardour/midi_patch_manager.h>
|
||||
#include <ardour/processor.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
#include <ardour/location.h>
|
||||
@@ -68,7 +69,6 @@
|
||||
#include "midi_streamview.h"
|
||||
#include "utils.h"
|
||||
#include "midi_scroomer.h"
|
||||
#include "midi_patch_manager.h"
|
||||
#include "piano_roll_header.h"
|
||||
#include "ghostregion.h"
|
||||
|
||||
@@ -83,7 +83,7 @@ using namespace sigc;
|
||||
using namespace Editing;
|
||||
|
||||
// Minimum height at which a control is displayed
|
||||
static const uint32_t CHANNEL_MIN_HEIGHT = 80;
|
||||
static const uint32_t MIDI_CONTROLS_BOX_MIN_HEIGHT = 162;
|
||||
static const uint32_t KEYBOARD_MIN_HEIGHT = 140;
|
||||
|
||||
MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
|
||||
@@ -95,7 +95,6 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
|
||||
, _note_mode(Sustained)
|
||||
, _note_mode_item(NULL)
|
||||
, _percussion_mode_item(NULL)
|
||||
, _midi_expander("Channel")
|
||||
{
|
||||
subplugin_menu.set_name ("ArdourContextMenu");
|
||||
|
||||
@@ -142,14 +141,12 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
|
||||
}
|
||||
|
||||
// add channel selector expander
|
||||
HBox* midi_expander_hbox = manage(new HBox());
|
||||
VBox* midi_expander_vbox = manage(new VBox());
|
||||
HBox* midi_controls_hbox = manage(new HBox());
|
||||
|
||||
// Instrument patch selector
|
||||
ComboBoxText* model_selector = manage(new ComboBoxText());
|
||||
|
||||
MIDI::Name::MidiPatchManager& patch_manager = MIDI::Name::MidiPatchManager::instance();
|
||||
patch_manager.set_session(session());
|
||||
|
||||
for (MIDI::Name::MasterDeviceNames::Models::const_iterator model = patch_manager.all_models().begin();
|
||||
model != patch_manager.all_models().end();
|
||||
@@ -159,13 +156,12 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
|
||||
|
||||
model_selector->set_active(0);
|
||||
|
||||
midi_expander_hbox->pack_start(_channel_selector, true, false);
|
||||
midi_expander_vbox->pack_start(*model_selector, true, false);
|
||||
midi_expander_vbox->pack_start(*midi_expander_hbox, true, true);
|
||||
_midi_expander.add(*midi_expander_vbox);
|
||||
_midi_expander.property_expanded().signal_changed().connect(
|
||||
mem_fun(this, &MidiTimeAxisView::channel_selector_toggled));
|
||||
controls_vbox.pack_start(_midi_expander, false, false);
|
||||
midi_controls_hbox->pack_start(_channel_selector, true, false);
|
||||
_midi_controls_box.pack_start(*model_selector, true, false);
|
||||
_midi_controls_box.pack_start(*midi_controls_hbox, true, true);
|
||||
|
||||
controls_vbox.pack_start(_midi_controls_box, false, false);
|
||||
|
||||
boost::shared_ptr<MidiDiskstream> diskstream = midi_track()->midi_diskstream();
|
||||
|
||||
// restore channel selector settings
|
||||
@@ -214,10 +210,10 @@ MidiTimeAxisView::set_height (uint32_t h)
|
||||
{
|
||||
RouteTimeAxisView::set_height (h);
|
||||
|
||||
if (height >= CHANNEL_MIN_HEIGHT) {
|
||||
_midi_expander.show();
|
||||
if (height >= MIDI_CONTROLS_BOX_MIN_HEIGHT) {
|
||||
_midi_controls_box.show();
|
||||
} else {
|
||||
_midi_expander.hide();
|
||||
_midi_controls_box.hide();
|
||||
}
|
||||
|
||||
if (height >= KEYBOARD_MIN_HEIGHT) {
|
||||
@@ -462,20 +458,6 @@ MidiTimeAxisView::route_active_changed ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::channel_selector_toggled()
|
||||
{
|
||||
static uint32_t previous_height;
|
||||
|
||||
if (_midi_expander.property_expanded()) {
|
||||
previous_height = current_height();
|
||||
if (previous_height < TimeAxisView::hLargest) {
|
||||
set_height (TimeAxisView::hLarge);
|
||||
}
|
||||
} else {
|
||||
set_height (previous_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
||||
|
||||
void add_insert_to_subplugin_menu (ARDOUR::Processor *);
|
||||
|
||||
void channel_selector_toggled();
|
||||
|
||||
bool _ignore_signals;
|
||||
Gtk::Menu _subplugin_menu;
|
||||
MidiScroomer* _range_scroomer;
|
||||
@@ -102,7 +100,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
||||
ARDOUR::NoteMode _note_mode;
|
||||
Gtk::RadioMenuItem* _note_mode_item;
|
||||
Gtk::RadioMenuItem* _percussion_mode_item;
|
||||
Gtk::Expander _midi_expander;
|
||||
Gtk::VBox _midi_controls_box;
|
||||
MidiMultipleChannelSelector _channel_selector;
|
||||
};
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ midi_source.cc
|
||||
midi_state_tracker.cc
|
||||
midi_stretch.cc
|
||||
midi_track.cc
|
||||
midi_patch_manager.cc
|
||||
mix.cc
|
||||
mtc_slave.cc
|
||||
named_selection.cc
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef MIDI_PATCH_MANAGER_H_
|
||||
#define MIDI_PATCH_MANAGER_H_
|
||||
|
||||
#include "midi++/midnam_patch.h"
|
||||
#include <midi++/midnam_patch.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
@@ -21,10 +21,11 @@
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "midi_patch_manager.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include <pbd/file_utils.h>
|
||||
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_directory.h"
|
||||
#include "ardour/midi_patch_manager.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace sigc;
|
||||
@@ -86,6 +86,7 @@
|
||||
#include <ardour/tempo.h>
|
||||
#include <ardour/audio_track.h>
|
||||
#include <ardour/midi_track.h>
|
||||
#include <ardour/midi_patch_manager.h>
|
||||
#include <ardour/cycle_timer.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/named_selection.h>
|
||||
@@ -359,6 +360,7 @@ Session::second_stage_init (bool new_session)
|
||||
deliver_mmc (MIDI::MachineControl::cmdLocate, 0);
|
||||
|
||||
MidiClockTicker::instance().set_session(*this);
|
||||
MIDI::Name::MidiPatchManager::instance().set_session(*this);
|
||||
|
||||
BootMessage (_("Reset Control Protocols"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user