Merge branch 'master' into mixer-snapshots

This commit is contained in:
Nikolaus Gullotta 2019-03-19 09:25:51 -05:00
commit 205ec4483a
23 changed files with 133 additions and 55 deletions

View file

@ -4369,7 +4369,7 @@ Editor::new_playlists (TimeAxisView* v)
{
begin_reversible_command (_("new playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists->get (playlists);
_session->playlists()->get (playlists);
mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), playlists), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command ();
}
@ -4385,7 +4385,7 @@ Editor::copy_playlists (TimeAxisView* v)
{
begin_reversible_command (_("copy playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists->get (playlists);
_session->playlists()->get (playlists);
mapover_tracks (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_copy_playlist), playlists), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command ();
}
@ -4400,7 +4400,7 @@ Editor::clear_playlists (TimeAxisView* v)
{
begin_reversible_command (_("clear playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists->get (playlists);
_session->playlists()->get (playlists);
mapover_tracks (sigc::mem_fun (*this, &Editor::mapped_clear_playlist), v, ARDOUR::Properties::group_select.property_id);
commit_reversible_command ();
}

View file

@ -2986,7 +2986,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
/* a MRV start trim may change the source length. ensure we cover all playlists here */
if (mrv && _operation == StartTrim) {
vector<boost::shared_ptr<Playlist> > all_playlists;
_editor->session()->playlists->get (all_playlists);
_editor->session()->playlists()->get (all_playlists);
for (vector<boost::shared_ptr<Playlist> >::iterator x = all_playlists.begin(); x != all_playlists.end(); ++x) {
if ((*x)->uses_source (rv->region()->source(0))) {

View file

@ -7696,7 +7696,7 @@ Editor::insert_time (
if (all_playlists) {
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav && rtav->track ()) {
vector<boost::shared_ptr<Playlist> > all = _session->playlists->playlists_for_track (rtav->track ());
vector<boost::shared_ptr<Playlist> > all = _session->playlists()->playlists_for_track (rtav->track ());
for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) {
pl.insert (*p);
}

View file

@ -105,7 +105,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
model->clear ();
_session->playlists->foreach (this, &PlaylistSelector::add_playlist_to_map);
_session->playlists()->foreach (this, &PlaylistSelector::add_playlist_to_map);
boost::shared_ptr<Track> this_track = rui->track();
@ -171,7 +171,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
// Add unassigned (imported) playlists to the list
list<boost::shared_ptr<Playlist> > unassigned;
_session->playlists->unassigned (unassigned);
_session->playlists()->unassigned (unassigned);
TreeModel::Row row;
TreeModel::Row selected_row;

View file

@ -1075,7 +1075,7 @@ RouteTimeAxisView::rename_current_playlist ()
}
prompter.get_result (name);
if (name.length()) {
if (_session->playlists->by_name (name)) {
if (_session->playlists()->by_name (name)) {
MessageDialog msg (_("Given playlist name is not unique."));
msg.run ();
prompter.set_initial_text (Playlist::bump_name (name, *_session));
@ -1143,7 +1143,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
name = resolve_new_group_playlist_name(name,playlists_before_op);
}
while (_session->playlists->by_name(name)) {
while (_session->playlists()->by_name(name)) {
name = Playlist::bump_name (name, *_session);
}
@ -1171,7 +1171,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
}
prompter.get_result (name);
if (name.length()) {
if (_session->playlists->by_name (name)) {
if (_session->playlists()->by_name (name)) {
MessageDialog msg (_("Given playlist name is not unique."));
msg.run ();
prompter.set_initial_text (Playlist::bump_name (name, *_session));
@ -1551,7 +1551,7 @@ RouteTimeAxisView::build_playlist_menu ()
RadioMenuItem::Group playlist_group;
boost::shared_ptr<Track> tr = track ();
vector<boost::shared_ptr<Playlist> > playlists_tr = _session->playlists->playlists_for_track (tr);
vector<boost::shared_ptr<Playlist> > playlists_tr = _session->playlists()->playlists_for_track (tr);
/* sort the playlists */
PlaylistSorter cmp;
@ -1646,7 +1646,7 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist>
continue;
}
boost::shared_ptr<Playlist> ipl = session()->playlists->by_name(playlist_name);
boost::shared_ptr<Playlist> ipl = session()->playlists()->by_name(playlist_name);
if (!ipl) {
// No playlist for this track for this take yet, make it
track->use_default_new_playlist();

View file

@ -1117,7 +1117,7 @@ public:
PostTransportAdjustCaptureBuffering = 0x2000
};
boost::shared_ptr<SessionPlaylists> playlists;
boost::shared_ptr<SessionPlaylists> playlists () const { return _playlists; }
void send_mmc_locate (samplepos_t);
void queue_full_time_code () { _send_timecode_update = true; }
@ -1227,6 +1227,8 @@ private:
static void init_name_id_counter (guint n);
static unsigned int name_id_counter ();
boost::shared_ptr<SessionPlaylists> _playlists;
/* stuff used in process() should be close together to
maximise cache hits
*/

View file

@ -61,6 +61,8 @@ public:
boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
void sync_all_regions_with_regions ();
std::vector<boost::shared_ptr<Playlist> > playlists_for_track (boost::shared_ptr<Track>) const;
std::vector<boost::shared_ptr<Playlist> > get_used () const;
std::vector<boost::shared_ptr<Playlist> > get_unused () const;
uint32_t n_playlists() const;
private:

View file

@ -170,7 +170,7 @@ bool
AudioPlaylistImporter::_prepare_move ()
{
// Rename
while (session.playlists->by_name (name) || !handler.check_name (name)) {
while (session.playlists()->by_name (name) || !handler.check_name (name)) {
std::pair<bool, string> rename_pair = *Rename (_("A playlist with this name already exists, please rename it."), name);
if (!rename_pair.first) {
return false;

View file

@ -214,7 +214,7 @@ AudioTrack::set_state_part_two ()
_freeze_record.processor_info.clear ();
if ((prop = fnode->property (X_("playlist"))) != 0) {
boost::shared_ptr<Playlist> pl = _session.playlists->by_name (prop->value());
boost::shared_ptr<Playlist> pl = _session.playlists()->by_name (prop->value());
if (pl) {
_freeze_record.playlist = boost::dynamic_pointer_cast<AudioPlaylist> (pl);
_freeze_record.playlist->use();
@ -379,7 +379,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
candidate = string_compose ("<F%2>%1", _freeze_record.playlist->name(), n);
if (_session.playlists->by_name (candidate) == 0) {
if (_session.playlists()->by_name (candidate) == 0) {
new_playlist_name = candidate;
break;
}

View file

@ -78,6 +78,12 @@ DiskIOProcessor::~DiskIOProcessor ()
channels.flush ();
delete _midi_buf;
for (uint32_t n = 0; n < DataType::num_types; ++n) {
if (_playlists[n]) {
_playlists[n]->release ();
}
}
}

View file

@ -68,12 +68,6 @@ DiskReader::DiskReader (Session& s, string const & str, DiskIOProcessor::Flag f)
DiskReader::~DiskReader ()
{
DEBUG_TRACE (DEBUG::Destruction, string_compose ("DiskReader %1 @ %2 deleted\n", _name, this));
for (uint32_t n = 0; n < DataType::num_types; ++n) {
if (_playlists[n]) {
_playlists[n]->release ();
}
}
}
void

View file

@ -78,6 +78,7 @@
#include "ardour/send.h"
#include "ardour/session.h"
#include "ardour/session_object.h"
#include "ardour/session_playlists.h"
#include "ardour/sidechain.h"
#include "ardour/solo_isolate_control.h"
#include "ardour/solo_safe_control.h"
@ -261,6 +262,7 @@ CLASSKEYS(boost::shared_ptr<ARDOUR::PluginInfo>);
CLASSKEYS(boost::shared_ptr<ARDOUR::Processor>);
CLASSKEYS(boost::shared_ptr<ARDOUR::Readable>);
CLASSKEYS(boost::shared_ptr<ARDOUR::Region>);
CLASSKEYS(boost::shared_ptr<ARDOUR::SessionPlaylists>);
CLASSKEYS(boost::shared_ptr<Evoral::ControlList>);
CLASSKEYS(boost::shared_ptr<Evoral::Note<Temporal::Beats> >);
CLASSKEYS(boost::shared_ptr<Evoral::Sequence<Temporal::Beats> >);
@ -1127,6 +1129,7 @@ LuaBindings::common (lua_State* L)
.addFunction ("combine", &Playlist::combine)
.addFunction ("uncombine", &Playlist::uncombine)
.addFunction ("split_region", &Playlist::split_region)
.addFunction ("get_orig_track_id", &Playlist::get_orig_track_id)
//.addFunction ("split", &Playlist::split) // XXX needs MusicSample
.addFunction ("cut", (boost::shared_ptr<Playlist> (Playlist::*)(std::list<AudioRange>&, bool))&Playlist::cut)
#if 0
@ -1143,6 +1146,17 @@ LuaBindings::common (lua_State* L)
.addFunction ("set_note_mode", &MidiPlaylist::set_note_mode)
.endClass ()
.beginWSPtrClass <SessionPlaylists> ("SessionPlaylists")
.addFunction ("by_name", &SessionPlaylists::by_name)
.addFunction ("by_id", &SessionPlaylists::by_id)
.addFunction ("source_use_count", &SessionPlaylists::source_use_count)
.addFunction ("region_use_count", &SessionPlaylists::region_use_count)
.addFunction ("playlists_for_track", &SessionPlaylists::playlists_for_track)
.addFunction ("get_used", &SessionPlaylists::get_used)
.addFunction ("get_unused", &SessionPlaylists::get_unused)
.addFunction ("n_playlists", &SessionPlaylists::n_playlists)
.endClass ()
.deriveWSPtrClass <Track, Route> ("Track")
.addCast<AudioTrack> ("to_audio_track")
.addCast<MidiTrack> ("to_midi_track")
@ -1636,6 +1650,10 @@ LuaBindings::common (lua_State* L)
.beginStdVector <boost::shared_ptr<Source> > ("SourceList")
.endClass ()
// from SessionPlaylists
.beginStdVector <boost::shared_ptr<Playlist> > ("PlaylistList")
.endClass ()
// std::list< boost::weak_ptr <AudioSource> >
.beginConstStdList <boost::weak_ptr<AudioSource> > ("WeakAudioSourceList")
.endClass ()
@ -2279,6 +2297,7 @@ LuaBindings::common (lua_State* L)
.addFunction ("abort_reversible_command", &Session::abort_reversible_command)
.addFunction ("add_command", &Session::add_command)
.addFunction ("add_stateful_diff_command", &Session::add_stateful_diff_command)
.addFunction ("playlists", &Session::playlists)
.addFunction ("engine", (AudioEngine& (Session::*)())&Session::engine)
.addFunction ("get_block_size", &Session::get_block_size)
.addFunction ("worst_output_latency", &Session::worst_output_latency)

View file

@ -265,7 +265,7 @@ MidiTrack::set_state_part_two ()
std::string str;
if (fnode->get_property (X_("playlist"), str)) {
boost::shared_ptr<Playlist> pl = _session.playlists->by_name (str);
boost::shared_ptr<Playlist> pl = _session.playlists()->by_name (str);
if (pl) {
_freeze_record.playlist = boost::dynamic_pointer_cast<MidiPlaylist> (pl);
} else {

View file

@ -2475,7 +2475,7 @@ Playlist::bump_name (string name, Session &session)
do {
newname = bump_name_once (newname, '.');
} while (session.playlists->by_name (newname)!=NULL);
} while (session.playlists()->by_name (newname)!=NULL);
return newname;
}

View file

@ -170,7 +170,7 @@ Session::Session (AudioEngine &eng,
const string& snapshot_name,
BusProfile* bus_profile,
string mix_template)
: playlists (new SessionPlaylists)
: _playlists (new SessionPlaylists)
, _engine (eng)
, process_function (&Session::process_with_events)
, _bounce_processing_active (false)
@ -794,7 +794,7 @@ Session::destroy ()
}
/* not strictly necessary, but doing it here allows the shared_ptr debugging to work */
playlists.reset ();
_playlists.reset ();
emit_thread_terminate ();
@ -3342,7 +3342,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
XMLNode* ds_node = find_named_node (node_copy, "Diskstream");
if (ds_node) {
const std::string playlist_name = ds_node->property (X_("playlist"))->value ();
boost::shared_ptr<Playlist> playlist = playlists->by_name (playlist_name);
boost::shared_ptr<Playlist> playlist = _playlists->by_name (playlist_name);
// Use same name as Route::set_name_in_state so playlist copy
// is picked up when creating the Route in XMLRouteFactory below
playlist = PlaylistFactory::create (playlist, string_compose ("%1.1", name));
@ -3352,7 +3352,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
XMLNode* ds_node = find_named_node (node_copy, "Diskstream");
if (ds_node) {
const std::string playlist_name = ds_node->property (X_("playlist"))->value ();
boost::shared_ptr<Playlist> playlist = playlists->by_name (playlist_name);
boost::shared_ptr<Playlist> playlist = _playlists->by_name (playlist_name);
playlist->share_with ((node_copy.property (X_("id")))->value());
}
}
@ -4714,7 +4714,7 @@ Session::destroy_sources (list<boost::shared_ptr<Source> > srcs)
tmp = r;
++tmp;
playlists->destroy_region (*r);
_playlists->destroy_region (*r);
RegionFactory::map_remove (*r);
(*r)->drop_sources ();
@ -5328,7 +5328,7 @@ Session::add_playlist (boost::shared_ptr<Playlist> playlist, bool unused)
return;
}
playlists->add (playlist);
_playlists->add (playlist);
if (unused) {
playlist->release();
@ -5350,7 +5350,7 @@ Session::remove_playlist (boost::weak_ptr<Playlist> weak_playlist)
return;
}
playlists->remove (playlist);
_playlists->remove (playlist);
set_dirty();
}
@ -5773,7 +5773,7 @@ Session::tempo_map_changed (const PropertyChange&)
{
clear_clicks ();
playlists->update_after_tempo_map_change ();
_playlists->update_after_tempo_map_change ();
_locations->apply (*this, &Session::update_locations_after_tempo_map_change);

View file

@ -111,7 +111,7 @@ Session::memento_command_factory(XMLNode *n)
return new MementoCommand<TempoMap>(*_tempo_map, before, after);
} else if (type_name == "ARDOUR::Playlist" || type_name == "ARDOUR::AudioPlaylist" || type_name == "ARDOUR::MidiPlaylist") {
if (boost::shared_ptr<Playlist> pl = playlists->by_name(child->property("name")->value())) {
if (boost::shared_ptr<Playlist> pl = _playlists->by_name(child->property("name")->value())) {
return new MementoCommand<Playlist>(*(pl.get()), before, after);
}
@ -165,7 +165,7 @@ Session::stateful_diff_command_factory (XMLNode* n)
}
} else if (type_name == "ARDOUR::AudioPlaylist" || type_name == "ARDOUR::MidiPlaylist") {
boost::shared_ptr<Playlist> p = playlists->by_id (id);
boost::shared_ptr<Playlist> p = _playlists->by_id (id);
if (p) {
return new StatefulDiffCommand (p, *n);
} else {

View file

@ -521,6 +521,34 @@ SessionPlaylists::region_use_count (boost::shared_ptr<Region> region) const
return cnt;
}
vector<boost::shared_ptr<Playlist> >
SessionPlaylists::get_used () const
{
vector<boost::shared_ptr<Playlist> > pl;
Glib::Threads::Mutex::Lock lm (lock);
for (List::const_iterator i = playlists.begin(); i != playlists.end(); ++i) {
pl.push_back (*i);
}
return pl;
}
vector<boost::shared_ptr<Playlist> >
SessionPlaylists::get_unused () const
{
vector<boost::shared_ptr<Playlist> > pl;
Glib::Threads::Mutex::Lock lm (lock);
for (List::const_iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
pl.push_back (*i);
}
return pl;
}
/** @return list of Playlists that are associated with a track */
vector<boost::shared_ptr<Playlist> >
SessionPlaylists::playlists_for_track (boost::shared_ptr<Track> tr) const

View file

@ -1263,8 +1263,8 @@ Session::state (bool save_template, snapshot_t snapshot_type, bool only_used_ass
set<boost::shared_ptr<Source> > sources_used_by_this_snapshot;
if (only_used_assets) {
playlists->sync_all_regions_with_regions ();
playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot), false);
_playlists->sync_all_regions_with_regions ();
_playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot), false);
}
for (SourceMap::iterator siter = sources.begin(); siter != sources.end(); ++siter) {
@ -1475,7 +1475,7 @@ Session::state (bool save_template, snapshot_t snapshot_type, bool only_used_ass
}
}
playlists->add_state (node, save_template, !only_used_assets);
_playlists->add_state (node, save_template, !only_used_assets);
child = node->add_child ("RouteGroups");
for (list<RouteGroup *>::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) {
@ -1663,13 +1663,13 @@ Session::set_state (const XMLNode& node, int version)
if ((child = find_named_node (node, "Playlists")) == 0) {
error << _("Session: XML state has no playlists section") << endmsg;
goto out;
} else if (playlists->load (*this, *child)) {
} else if (_playlists->load (*this, *child)) {
goto out;
}
if ((child = find_named_node (node, "UnusedPlaylists")) == 0) {
// this is OK
} else if (playlists->load_unused (*this, *child)) {
} else if (_playlists->load_unused (*this, *child)) {
goto out;
}
@ -3245,7 +3245,7 @@ Session::cleanup_regions ()
for (RegionFactory::RegionMap::const_iterator i = regions.begin(); i != regions.end();) {
uint32_t used = playlists->region_use_count (i->second);
uint32_t used = _playlists->region_use_count (i->second);
if (used == 0 && !i->second->automatic ()) {
boost::weak_ptr<Region> w = i->second;
@ -3265,7 +3265,7 @@ Session::cleanup_regions ()
continue;
}
assert(boost::dynamic_pointer_cast<PlaylistSource>(i->second->source (0)) != 0);
if (0 == playlists->region_use_count (i->second)) {
if (0 == _playlists->region_use_count (i->second)) {
boost::weak_ptr<Region> w = i->second;
++i;
RegionFactory::map_remove (w);
@ -3375,14 +3375,14 @@ Session::cleanup_sources (CleanupReport& rep)
/* consider deleting all unused playlists */
if (playlists->maybe_delete_unused (boost::bind (Session::ask_about_playlist_deletion, _1))) {
if (_playlists->maybe_delete_unused (boost::bind (Session::ask_about_playlist_deletion, _1))) {
ret = 0;
goto out;
}
/* sync the "all regions" property of each playlist with its current state */
playlists->sync_all_regions_with_regions ();
_playlists->sync_all_regions_with_regions ();
/* find all un-used sources */
@ -3442,7 +3442,7 @@ Session::cleanup_sources (CleanupReport& rep)
* This will include the playlists used within compound regions.
*/
playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot));
_playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot));
/* add our current source list
*/
@ -4005,9 +4005,9 @@ Session::config_changed (std::string p, bool ours)
} else if (p == "edit-mode") {
Glib::Threads::Mutex::Lock lm (playlists->lock);
Glib::Threads::Mutex::Lock lm (_playlists->lock);
for (SessionPlaylists::List::iterator i = playlists->playlists.begin(); i != playlists->playlists.end(); ++i) {
for (SessionPlaylists::List::iterator i = _playlists->playlists.begin(); i != _playlists->playlists.end(); ++i) {
(*i)->set_edit_mode (Config->get_edit_mode ());
}
@ -5292,8 +5292,8 @@ Session::archive_session (const std::string& dest,
set<boost::shared_ptr<Source> > sources_used_by_this_snapshot;
if (only_used_sources) {
playlists->sync_all_regions_with_regions ();
playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot), false);
_playlists->sync_all_regions_with_regions ();
_playlists->foreach (boost::bind (merge_all_sources, _1, &sources_used_by_this_snapshot), false);
}
/* collect audio sources for this session, calc total size for encoding

View file

@ -181,11 +181,11 @@ Track::set_state (const XMLNode& node, int version)
set_align_choice (ac, true);
}
if (boost::shared_ptr<AudioPlaylist> pl = boost::dynamic_pointer_cast<AudioPlaylist> (_session.playlists->by_name (name))) {
if (boost::shared_ptr<AudioPlaylist> pl = boost::dynamic_pointer_cast<AudioPlaylist> (_session.playlists()->by_name (name))) {
use_playlist (DataType::AUDIO, pl);
}
if (boost::shared_ptr<MidiPlaylist> pl = boost::dynamic_pointer_cast<MidiPlaylist> (_session.playlists->by_name (name))) {
if (boost::shared_ptr<MidiPlaylist> pl = boost::dynamic_pointer_cast<MidiPlaylist> (_session.playlists()->by_name (name))) {
use_playlist (DataType::MIDI, pl);
}
}
@ -390,7 +390,7 @@ Track::set_name (const string& str)
boost::shared_ptr<Track> me = boost::dynamic_pointer_cast<Track> (shared_from_this ());
if (_playlists[data_type()]->all_regions_empty () && _session.playlists->playlists_for_track (me).size() == 1) {
if (_playlists[data_type()]->all_regions_empty () && _session.playlists()->playlists_for_track (me).size() == 1) {
/* Only rename the diskstream (and therefore the playlist) if
a) the playlist has never had a region added to it and
b) there is only one playlist for this track.
@ -608,7 +608,7 @@ Track::find_and_use_playlist (DataType dt, PBD::ID const & id)
{
boost::shared_ptr<Playlist> playlist;
if ((playlist = _session.playlists->by_id (id)) == 0) {
if ((playlist = _session.playlists()->by_id (id)) == 0) {
return -1;
}

View file

@ -519,7 +519,7 @@ FPGUI::build_mix_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
vector<pair<string,string> > actions;
actions.push_back (make_pair (string (_("Show Mixer Window")), string (X_("Common/show-mixer"))));
actions.push_back (make_pair (string (_("Show/Hide Mixer list")), string (X_("Common/ToggleMixerList"))));
actions.push_back (make_pair (string (_("Show/Hide Mixer list")), string (X_("Mixer/ToggleMixerList"))));
actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
actions.push_back (make_pair (string (_("Show/Hide Editor mixer strip")), string (X_("Editor/show-editor-mixer"))));

View file

@ -7,7 +7,7 @@
<Button name="F3" plain="Common/toggle-meterbridge"/>
<Button name="F4" plain="Window/toggle-big-clock"/>
<Button name="F5" plain="Editor/show-editor-list"/>
<Button name="F6" plain="Common/ToggleMixerList"/>
<Button name="F6" plain="Mixer/ToggleMixerList"/>
<Button name="F7" plain="Editor/show-editor-mixer"/>
<Button name="F8" plain="Main/close-current-dialog"/>
</Buttons>

View file

@ -0,0 +1,27 @@
ardour { ["type"] = "Snippet", name = "Dump Playlists" }
function factory () return function ()
print ("Number of playlists:", Session:playlists():n_playlists())
print ()
print ("Used playlists:")
for p in Session:playlists():get_used():iter() do
print ("-", p:name(), p:n_regions())
end
print ()
print ("Unused playlists:")
for p in Session:playlists():get_unused():iter() do
print ("-", p:name(), p:n_regions())
end
print ()
print ("Playlists by Track:")
for r in Session:get_tracks():iter() do
print ("*", r:name())
for p in Session:playlists():playlists_for_track (r:to_track()):iter() do
print (" -", p:name(), p:n_regions())
end
end
end end

View file

@ -7,7 +7,7 @@
<Button name="F3" plain="Common/toggle-meterbridge"/>
<Button name="F4" plain="Window/toggle-big-clock"/>
<Button name="F5" plain="Editor/show-editor-list"/>
<Button name="F6" plain="Common/ToggleMixerList"/>
<Button name="F6" plain="Mixer/ToggleMixerList"/>
<Button name="F7" plain="Editor/show-editor-mixer"/>
<Button name="F8" plain="Main/close-current-dialog"/>
<Button name="Play" shift="Transport/Loop"/>