View Issue Details

IDProjectCategoryView StatusLast Update
0010327ardourfeaturespublic2026-05-11 09:13
Reportercolinf Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version9.2 
Summary0010327: 'New Playlist (for group)' should default playlist name to group name
DescriptionBefore a8395718 or thereabouts, creating new playlists for members of a route group would name the playlists after the group, which made sense to me. Currently though, new playlists for grouped tracks are just named 'Take.[n]' with a global incrementing take number, as 'New Playlists (for selected/all tracks)' does.

I don't know whether this change for grouped tracks was a deliberate design decision or an oversight, but either way I preferred the old behaviour.
Additional InformationSimple patch to make it so attached, in case anyone's interested. There was some weird whitespace going on in this area, fixed in the second patch.
TagsNo tags attached.

Activities

colinf

2026-05-11 08:30

updater  

0001-name-New-Playlist-for-group-after-group.patch (1,718 bytes)   
From 6a09c507959db15297a4cdc840c10fd7592f8220 Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Sun, 10 May 2026 22:38:26 +0100
Subject: [PATCH 1/2] name 'New Playlist (for group)' after group

Default the playlist name chosen by 'New Playlist (for group)' to be the
group name (followed by an incrementing number if necessary).
---
 gtk2_ardour/editor.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 4934fce118..b474916f6b 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3653,9 +3653,10 @@ Editor::stamp_new_playlist (string title, string &name, string &pgroup, bool cop
 
 	if (name.length()==0) {
 		name = _("Take.1");
-		if (_session->playlists()->by_name (name)) {
-			name = Playlist::bump_name (name, *_session);
-		}
+	}
+
+	if (_session->playlists()->by_name (name)) {
+		name = Playlist::bump_name (name, *_session);
 	}
 
 	Prompter prompter (true);
@@ -3732,7 +3733,8 @@ void
 Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name,gid,copy)) {
+	name = rui->route_group()->name();
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_grouped_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists), rui, ARDOUR::Properties::group_select.property_id);
-- 
2.47.3

0002-whitespace.patch (2,433 bytes)   
From 4764b630aeb45fdfbc6a3dc91541618b1de1f3c9 Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Sun, 10 May 2026 22:38:38 +0100
Subject: [PATCH 2/2] whitespace

---
 gtk2_ardour/editor.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index b474916f6b..858e9e7626 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3651,7 +3651,7 @@ Editor::stamp_new_playlist (string title, string &name, string &pgroup, bool cop
 {
 	pgroup = Playlist::generate_pgroup_id ();
 
-	if (name.length()==0) {
+	if (name.length() == 0) {
 		name = _("Take.1");
 	}
 
@@ -3722,7 +3722,7 @@ void
 Editor::new_playlists_for_all_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for ALL Tracks") : _("New Playlist for ALL Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for ALL Tracks") : _("New Playlist for ALL Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
@@ -3745,7 +3745,7 @@ void
 Editor::new_playlists_for_selected_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for Selected Tracks") : _("New Playlist for Selected Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for Selected Tracks") : _("New Playlist for Selected Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
@@ -3756,7 +3756,7 @@ void
 Editor::new_playlists_for_armed_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist( copy ?  _("Copy Playlist for Armed Tracks") : _("New Playlist for Armed Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for Armed Tracks") : _("New Playlist for Armed Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
-- 
2.47.3

0002-whitespace.patch (2,433 bytes)   

colinf

2026-05-11 09:13

updater   ~0030357

And here's a version that doesn't crash creating a new playlist for a track that's not a member of a group...
0001-whitespace.patch (3,191 bytes)   
From c6d36775bc985db6bad94a01a76432931405b3bf Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Sun, 10 May 2026 22:38:38 +0100
Subject: [PATCH 1/2] whitespace

---
 gtk2_ardour/editor.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 4934fce118..441098ff0e 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3651,7 +3651,7 @@ Editor::stamp_new_playlist (string title, string &name, string &pgroup, bool cop
 {
 	pgroup = Playlist::generate_pgroup_id ();
 
-	if (name.length()==0) {
+	if (name.length() == 0) {
 		name = _("Take.1");
 		if (_session->playlists()->by_name (name)) {
 			name = Playlist::bump_name (name, *_session);
@@ -3721,7 +3721,7 @@ void
 Editor::new_playlists_for_all_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for ALL Tracks") : _("New Playlist for ALL Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ? _("Copy Playlist for ALL Tracks") : _("New Playlist for ALL Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
@@ -3732,7 +3732,7 @@ void
 Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_grouped_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists), rui, ARDOUR::Properties::group_select.property_id);
@@ -3743,7 +3743,7 @@ void
 Editor::new_playlists_for_selected_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for Selected Tracks") : _("New Playlist for Selected Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ? _("Copy Playlist for Selected Tracks") : _("New Playlist for Selected Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
@@ -3754,7 +3754,7 @@ void
 Editor::new_playlists_for_armed_tracks (bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist( copy ?  _("Copy Playlist for Armed Tracks") : _("New Playlist for Armed Tracks"), name,gid,copy)) {
+	if (stamp_new_playlist( copy ? _("Copy Playlist for Armed Tracks") : _("New Playlist for Armed Tracks"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
-- 
2.47.3

0001-whitespace.patch (3,191 bytes)   
0002-name-New-Playlist-for-group-after-group.patch (1,830 bytes)   
From 3bdd717d92f1aaaeb914bb4d02601776a3d8cca0 Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Sun, 10 May 2026 22:38:26 +0100
Subject: [PATCH 2/2] name 'New Playlist (for group)' after group

Default the playlist name chosen by 'New Playlist (for group)' to be the
group name (followed by an incrementing number if necessary).
---
 gtk2_ardour/editor.cc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 441098ff0e..f2ff9ec6d3 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3653,9 +3653,10 @@ Editor::stamp_new_playlist (string title, string &name, string &pgroup, bool cop
 
 	if (name.length() == 0) {
 		name = _("Take.1");
-		if (_session->playlists()->by_name (name)) {
-			name = Playlist::bump_name (name, *_session);
-		}
+	}
+
+	if (_session->playlists()->by_name (name)) {
+		name = Playlist::bump_name (name, *_session);
 	}
 
 	Prompter prompter (true);
@@ -3732,7 +3733,13 @@ void
 Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist( copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name, gid, copy)) {
+	std::shared_ptr<RouteGroup> rg = rui->route_group();
+	if (rg)
+		name = rg->name();
+	else
+		name = rui->track()->playlist()->name();
+
+	if (stamp_new_playlist( copy ? _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_grouped_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists), rui, ARDOUR::Properties::group_select.property_id);
-- 
2.47.3

Issue History

Date Modified Username Field Change
2026-05-11 08:30 colinf New Issue
2026-05-11 08:30 colinf File Added: 0001-name-New-Playlist-for-group-after-group.patch
2026-05-11 08:30 colinf File Added: 0002-whitespace.patch
2026-05-11 09:13 colinf Note Added: 0030357
2026-05-11 09:13 colinf File Added: 0001-whitespace.patch
2026-05-11 09:13 colinf File Added: 0002-name-New-Playlist-for-group-after-group.patch