45 channels_label (
_(
"Channels:"),
Gtk::ALIGN_LEFT),
46 split_checkbox (
_(
"Split to mono files")),
48 channel_view (max_channels)
118 for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
119 if ((*it)->is_master () || (*it)->is_monitor ()) {
156 if (channel > n_channels) {
157 std::cout <<
"Invalid channel cout for get_channel!" << std::endl;
160 std::list<Channel>::iterator it = channels.begin();
162 while (channel > 1) {
184 Gtk::CellRendererText* text_renderer = Gtk::manage (
new Gtk::CellRendererText);
185 text_renderer->property_editable() =
false;
186 text_renderer->set_alignment (0.0, 0.5);
188 Gtk::TreeView::Column* column = Gtk::manage (
new Gtk::TreeView::Column);
189 column->set_title (
_(
"Bus or Track"));
190 column->pack_start (*text_renderer);
191 column->set_expand (
true);
192 column->add_attribute (text_renderer->property_text(),
route_cols.
name);
193 append_column (*column);
195 Gtk::CellRendererToggle *toggle =
dynamic_cast<Gtk::CellRendererToggle *
>(get_column_cell_renderer (0));
196 toggle->set_alignment (0.0, 0.5);
210 if (config == c) {
return; }
215 for (ExportChannelConfiguration::ChannelList::iterator c_it = chan_list.begin(); c_it != chan_list.end(); ++c_it) {
217 for (Gtk::ListStore::Children::iterator r_it = route_list->children().begin(); r_it != route_list->children().end(); ++r_it) {
220 if (!(pec = dynamic_cast<ARDOUR::PortExportChannel *> (c_it->get()))) {
224 Glib::RefPtr<Gtk::ListStore> port_list = r_it->get_value (route_cols.port_list_col);
225 std::set<boost::weak_ptr<AudioPort> > route_ports;
226 std::set<boost::weak_ptr<AudioPort> > intersection;
227 std::map<boost::weak_ptr<AudioPort>,
string> port_labels;
229 for (Gtk::ListStore::Children::const_iterator p_it = port_list->children().begin(); p_it != port_list->children().end(); ++p_it) {
230 route_ports.insert ((*p_it)->get_value (route_cols.port_cols.port));
231 port_labels.insert (make_pair ((*p_it)->get_value (route_cols.port_cols.port),
232 (*p_it)->get_value (route_cols.port_cols.label)));
236 route_ports.begin(), route_ports.end(),
237 std::insert_iterator<std::set<boost::weak_ptr<AudioPort> > > (intersection, intersection.begin()));
241 if (intersection.empty()) {
245 if (!r_it->get_value (route_cols.selected)) {
246 r_it->set_value (route_cols.selected,
true);
250 for (uint32_t chn = 1; chn < i; ++chn) {
252 r_it->set_value (route_cols.get_channel (chn).label, string (
"(none)"));
257 std::map<boost::weak_ptr<AudioPort>,
string>::iterator label_it = port_labels.find (port);
258 string label = label_it != port_labels.end() ? label_it->second :
"error";
260 r_it->set_value (route_cols.get_channel (i).port, port);
261 r_it->set_value (route_cols.get_channel (i).label, label);
271 Gtk::TreeModel::iterator iter = route_list->append();
272 Gtk::TreeModel::Row row = *iter;
274 row[route_cols.selected] =
false;
275 row[route_cols.name] = io->
name();
276 row[route_cols.io] = io;
280 Glib::RefPtr<Gtk::ListStore> port_list = Gtk::ListStore::create (route_cols.port_cols);
281 row[route_cols.port_list_col] = port_list;
284 for (uint32_t i = 0; i < outs; ++i) {
285 iter = port_list->append();
288 row[route_cols.port_cols.selected] =
false;
289 row[route_cols.port_cols.port] = io->
audio (i);
291 std::ostringstream oss;
292 oss <<
"Out-" << (i + 1);
294 row[route_cols.port_cols.label] = oss.str();
297 iter = port_list->append();
300 row[route_cols.port_cols.selected] =
false;
302 row[route_cols.port_cols.label] =
"(none)";
309 int offset = channels - n_channels;
314 std::ostringstream oss;
319 Gtk::TreeView::Column* column = Gtk::manage (
new Gtk::TreeView::Column (oss.str()));
321 Gtk::CellRendererCombo* combo_renderer = Gtk::manage (
new Gtk::CellRendererCombo);
322 combo_renderer->property_text_column() = 2;
323 combo_renderer->property_has_entry() =
false;
324 column->pack_start (*combo_renderer);
326 append_column (*column);
328 column->add_attribute (combo_renderer->property_text(), route_cols.get_channel(n_channels).label);
329 column->add_attribute (combo_renderer->property_model(), route_cols.port_list_col);
330 column->add_attribute (combo_renderer->property_editable(), route_cols.selected);
336 for (Gtk::ListStore::Children::iterator it = route_list->children().begin(); it != route_list->children().end(); ++it) {
337 std::string label = it->get_value(route_cols.selected) ?
"(none)" :
"";
338 it->set_value (route_cols.get_channel (n_channels).label, label);
344 get_column (static_columns + n_channels - 1)->set_min_width (80);
352 remove_column (*get_column (n_channels + static_columns));
363 if (!config) {
return; }
365 config->clear_channels();
367 for (uint32_t i = 1; i <= n_channels; ++i) {
372 for (Gtk::ListStore::Children::iterator it = route_list->children().begin(); it != route_list->children().end(); ++it) {
373 Gtk::TreeModel::Row row = *it;
375 if (!row[route_cols.selected]) {
386 config->register_channel (channel);
395 Gtk::TreeModel::iterator iter = get_model ()->get_iter (path);
396 bool selected = iter->get_value (route_cols.selected);
398 for (uint32_t i = 1; i <= n_channels; ++i) {
401 iter->set_value (route_cols.get_channel (i).label, std::string (
""));
405 iter->set_value (route_cols.get_channel (i).label, std::string(
"(none)"));
408 Glib::RefPtr<Gtk::ListStore> port_list = iter->get_value (route_cols.port_list_col);
409 Gtk::ListStore::Children::iterator port_it;
410 uint32_t port_number = 1;
412 for (port_it = port_list->children().begin(); port_it != port_list->children().end(); ++port_it) {
413 if (port_number == i) {
414 iter->set_value (route_cols.get_channel (i).label, (std::string) (*port_it)->get_value (route_cols.port_cols.label));
415 iter->set_value (route_cols.get_channel (i).port, (*port_it)->get_value (route_cols.port_cols.port));
428 Gtk::TreeModel::iterator iter = get_model ()->get_iter (path);
429 iter->set_value (route_cols.get_channel (channel).label, new_text);
431 Glib::RefPtr<Gtk::ListStore> port_list = iter->get_value (route_cols.port_list_col);
432 Gtk::ListStore::Children::iterator port_it;
434 for (port_it = port_list->children().begin(); port_it != port_list->children().end(); ++port_it) {
435 std::string label = port_it->get_value (route_cols.port_cols.label);
436 if (label == new_text) {
438 iter->set_value (route_cols.get_channel (channel).port, w);
452 region_chans (region.n_channels()),
453 track_chans (track.n_outputs().n_audio()),
455 raw_button (type_group),
456 fades_button (type_group),
457 processed_button (type_group)
478 vbox.show_all_children ();
479 show_all_children ();
487 if (!
state) {
return; }
489 switch (
state->config->region_processing_type()) {
493 case RegionExportChannelFactory::Raw:
496 case RegionExportChannelFactory::Fades:
499 case RegionExportChannelFactory::Processed:
514 state->config->clear_channels ();
518 type = RegionExportChannelFactory::Raw;
520 type = RegionExportChannelFactory::Fades;
522 type = RegionExportChannelFactory::Processed;
529 state->config->set_region_processing_type (type);
542 , region_contents_button(source_group,
_(
"Export region contents"))
543 , track_output_button(source_group,
_(
"Export track output"))
555 track_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
565 Gtk::CellRendererToggle *toggle =
dynamic_cast<Gtk::CellRendererToggle *
>(
track_view.get_column_cell_renderer (0));
566 toggle->set_alignment (0.0, 0.5);
570 Gtk::CellRendererText* text_renderer = Gtk::manage (
new Gtk::CellRendererText);
571 text_renderer->property_editable() =
false;
572 text_renderer->set_alignment (0.0, 0.5);
574 Gtk::TreeView::Column* column = Gtk::manage (
new Gtk::TreeView::Column);
575 column->set_title (
_(
"Track name"));
578 column->pack_start (*text_renderer,
false);
579 column->add_attribute (text_renderer->property_text(),
track_cols.
label);
583 show_all_children ();
599 for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
600 if (!boost::dynamic_pointer_cast<Track>(*it)) {
602 if ((*it)->is_master () || (*it)->is_monitor ()) {
609 for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
610 if (boost::dynamic_pointer_cast<AudioTrack>(*it)) {
619 Gtk::TreeModel::iterator iter =
track_list->append();
620 Gtk::TreeModel::Row row = *iter;
633 for (Gtk::ListStore::Children::iterator it =
track_list->children().begin(); it !=
track_list->children().end(); ++it) {
634 Gtk::TreeModel::Row row = *it;
646 for (uint32_t i = 0; i < outs; ++i) {
652 state->config->register_channel(channel);
656 std::list<ExportChannelPtr> list;
657 RouteExportChannel::create_from_route (list, route);
658 state->config->register_channels (list);
661 state->config->set_name (route->
name());
ChannelTreeView channel_view
Handles RegionExportChannels and does actual reading from region.
Gtk::CheckButton split_checkbox
void update_selection_text(std::string const &path, std::string const &new_text, uint32_t channel)
Gtk::ScrolledWindow track_scroller
Glib::RefPtr< Gtk::ListStore > track_list
ARDOUR::AudioRegion const & region
void clear_channel_configs()
Gtk::RadioButton processed_button
TrackExportChannelSelector(ARDOUR::Session *session, ProfileManagerPtr manager)
sigc::signal< void > CriticalSelectionChanged
Basic export channel that reads from AudioPorts.
Gtk::SpinButton channels_spinbutton
ChannelConfigStateList const & get_channel_configs()
~PortExportChannelSelector()
ARDOUR::ExportProfileManager::ChannelConfigStatePtr state
Gtk::TreeModelColumn< std::string > name
Gtk::RadioButton fades_button
boost::shared_ptr< AudioPort > audio(uint32_t n) const
std::list< ExportChannelPtr > ChannelList
ChannelTreeView(uint32_t max_channels)
void add_channels(uint32_t chans)
Gtk::ScrolledWindow channel_scroller
const ChanCount & n_ports() const
uint32_t order_key() const
ChannelConfigStatePtr add_channel_config()
PortSet const & get_ports()
Gtk::RadioButton track_output_button
Channel & get_channel(uint32_t channel)
Gtk::TreeModelColumn< uint32_t > order_key
std::list< Channel > channels
boost::shared_ptr< Route > master_out() const
virtual void sync_with_manager()
Gtk::Alignment channel_alignment
void set_config(ChannelConfigPtr c)
ChanCount n_outputs() const
ARDOUR::AudioTrack & track
Gtk::TreeModelColumn< boost::shared_ptr< ARDOUR::Route > > route
void add_route(ARDOUR::IO *route)
void add_port(boost::weak_ptr< AudioPort > port)
boost::shared_ptr< RouteList > get_routes() const
void update_toggle_selection(std::string const &path)
ARDOUR::ExportProfileManager::ChannelConfigStatePtr state
Gtk::TreeModelColumn< bool > selected
virtual void sync_with_manager()
RegionExportChannelSelector(ARDOUR::Session *session, ProfileManagerPtr manager, ARDOUR::AudioRegion const ®ion, ARDOUR::AudioTrack &track)
Gtk::TreeModelColumn< bool > selected
void update_split_state()
ProfileManagerPtr manager
PortExportChannelSelector(ARDOUR::Session *session, ProfileManagerPtr manager)
Gtk::Label channels_label
boost::shared_ptr< ARDOUR::RegionExportChannelFactory > factory
boost::shared_ptr< IO > output() const
Gtk::RadioButton raw_button
void set_channel_count(uint32_t channels)
std::list< boost::shared_ptr< Route > > RouteList
sigc::signal< void > CriticalSelectionChanged
Gtk::RadioButton region_contents_button
void add_track(boost::shared_ptr< ARDOUR::Route > route)
ARDOUR::Session * _session
Glib::RefPtr< Gtk::ListStore > route_list
std::string string_compose(const std::string &fmt, const T1 &o1)
ExportChannelPtr create(uint32_t channel)
Gtk::TreeModelColumn< std::string > label
void update_channel_count()