diff options
author | David Robillard <d@drobilla.net> | 2014-12-24 20:07:10 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-24 20:07:10 -0500 |
commit | 1de39b8971f39398cadf6c9f2461fd49299c322e (patch) | |
tree | 5ea192fcad5e3114f0dffe09a1c84552a097a92a /gtk2_ardour/sfdb_ui.cc | |
parent | 10ad55fcf59c6a89ed42c9a78024e184e153d81e (diff) |
Add instrument selector to import dialog.
Idea here is for importing large multi-track MIDI files to be immediately
listenable upon play without tediously adding a ton of instrument plugins
manually.
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index c7f3d2dac5..9ef39d0aaa 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -1746,6 +1746,18 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s, hbox->pack_start (*vbox, false, false); options.pack_start (*hbox, false, false); + l = manage (new Label); + l->set_markup (_("<b>Instrument</b>")); + + vbox = manage (new VBox); + vbox->set_border_width (12); + vbox->set_spacing (6); + vbox->pack_start (*l, false, false); + vbox->pack_start (instrument_combo, false, false); + hbox = manage (new HBox); + hbox->pack_start (*vbox, false, false); + options.pack_start (*hbox, false, false); + str.clear (); str.push_back (_("Best")); str.push_back (_("Good")); @@ -1949,6 +1961,7 @@ SoundFileOmega::do_something (int action) ImportPosition pos = get_position (); ImportMode mode = get_mode (); ImportDisposition chns = get_channel_disposition (); + PluginInfoPtr instrument = instrument_combo.selected_instrument(); framepos_t where; switch (pos) { @@ -1969,9 +1982,9 @@ SoundFileOmega::do_something (int action) SrcQuality quality = get_src_quality(); if (copy_files_btn.get_active()) { - PublicEditor::instance().do_import (paths, chns, mode, quality, where); + PublicEditor::instance().do_import (paths, chns, mode, quality, where, instrument); } else { - PublicEditor::instance().do_embed (paths, chns, mode, where); + PublicEditor::instance().do_embed (paths, chns, mode, where, instrument); } if (action == RESPONSE_OK) { |