Jump to content

New 'Add Shuffled' mode for Playlists


Si64

Recommended Posts

Thank you @maxmp for the addition of the 'add shuffled' to playlists / queues feature.

Could I just check an issue?  If the feature works by Shuffled mode mixes items randomly with the existing items, preferable after the currently played track, then it doesn't seem to work as expected, in that I have found that if the currently playing track is, for example, Whitesnake, then tracks are added after 'W' in artist alphabetical order in the playlist / queue, therefore not truly shuffled among the complete list.

It's quite possible that I am doing something wrong, as Queues seem to work differently to Playlists, but it would be good if tracks to be added shuffled are added and shuffled after the currently playing track, by track position, rather than by any alphabetical order.

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

@Si64 '>>Queue (shuffled)' definitely inserts the shuffled items after the currently playing (or most recently played) song in the Queue - otherwise the new songs would never get heard.

Using '+Playlist (shuffled)' behaves in much the same way, so if a Playlist is currently being played (even if it is paused) then the new items will be shuffled randomly throughout the remaining (i.e. unplayed) portion of the Playlist. If the Playlist is not currently playing, the new songs will be shuffled randomly throughout the entire Playlist.

Note: There is currently a slight known bug in that if the queue is initially empty (or you are creating a brand new playlist) the added songs are not shuffled correctly.

Andre

Link to comment
Share on other sites

@andrewilleyThanks for that.  Is there a difference in the way a shuffled Queue works, to a shuffled Playlist?  When a playlist is shuffled, the track position seems to run in number order, ie, 1,2,3,4, etc, but when a Queue is shuffled, the track position displayed seems to be random, like apps that shuffle randomly 'on the fly' (which leads to repeats), if you see what I mean?

I'll have another play, but when I tried it with a couple of smaller playlists (>100 tracks), there seemed to be a long stretch before the newly merged tracks started to appear, when merged into an already running playlist.  

Also, with the bug you mentioned, does that mean when a new shuffle playlist is created, these need to be shuffled again before adding more tracks to them?

Sorry for all the questions.  I've been hoping for this feature for years, and now it's here, I'm trying to get my head around it, but I'm probably over thinking it.  👀

 

Edited by Si64
Link to comment
Share on other sites

@Si64 Using the new shuffle option in either '+Playlist' or '>>Queue' should behave in much the same way.

When adding shuffled songs to a partially played queue, the new songs will be shuffled and then inserted into random positions after the most-recently-played song in the Queue (otherwise some would never be heard).

The same basic logic applies to a Playlist that is currently playing (including if it is paused)., However if the Playlist is not currently in use, the new shuffled songs will be inserted at random locations throughout the whole list. This could mean that the first insertion is quite a way into the existing list, or it may be the first song, that's just the nature of randomness.

And yes, the bug I mentioned means you currently will need to re-shuffle a Playlist that you just created from scratch, or the Queue if it was previously empty, using the Re-sort menu for that Playlist/Queue. This is a known issue and will be fixed in a forthcoming beta release.

Andre

Link to comment
Share on other sites

13 hours ago, Si64 said:

I don't tend to create Playlists directly in PA.  My main ones go back years and are imported from the system library.  I assume that doesn't make any difference?

Not really, other than where they are stored.

Internally-created playlists (including ones that were originally imported from the system library) are held in a local Poweramp database in your device, without any physical backup copies. File-based playlists on the other hand are loaded from storage files (e.g. M3U) and when you make a change it is written back into that physical file so is a bit more permanent and easier to copy for use on other devices/etc. If you only use internal playlists, making backup copies - either to files, or using PA's Export Settings/Data feature - is a good idea for longer-term safety.

But as far as general use is concerned, they both behave in much the same way. The Queue is different in that it is transient, and will automatically play as a temporarily list of songs until it is finished and then regular playback will resume wherever you last left off.

Andre

Link to comment
Share on other sites

@andrewilley - thanks for that.  Yes, I have several backups of my playlists in other music players on the device.  It's a bit more complex than it used to be, as now many music apps have their own playlists, updating one means updating them all indiviually.  I'm sure there's an easier way, but it's what I've got used to now.

Link to comment
Share on other sites

@Si64 That is of course one major difference between internal and file-based lists. If you create and manipulate your playlists internally within an app, they will generally be local and only available to that app (e.g. Poweramp). Whereas if you work with external file-based lists - such as M3U files - you can use and edit them anywhere you like, even in text editor if you want as they are plain text files.

There is one caveat to that though, which is that M3U files can be either absolute or relative. Absolute means the exact path to find the audio file is saved in the file, while Relative means only the subfolders from where the Playlist is saved are used. Relative makes the files rather more portable (e.g. between PCs and phones). PA has a trick it uses when reading full paths created on other sources though; it basically throws away any device-specific path information (such as a PC's "C:\Users\name\Music\" or an Android SD Card's "ABCD-1234/Music/" and only tries to match the extract filename and the first-level of folder that it is stored in. But when it writes absolute paths back out again, it includes the Android path details which will be fine for other apps on the same device, but might be difficult for a PC to understand unless the program has some fancy fuzzy logic like Poweramp.

I'm going to split this out into its own discussion thread as it's getting way off-topic for a build-release thread.

Andre

 

Link to comment
Share on other sites

I assume by "external file-based lists - such as M3U files", you mean any pre-existing M3U playlist?  So, if for example I create a playlist in Samsung's own music app, then export that playlist to internal storage, it would then become an "external file-based list", which can be imported into PA or other music players?

One of the issues is that Android keeps changing the location of system playlists, and some music apps need to be told where they are.

I've also been trying to find a way to copy an Android based playlist into iTunes, but have so far been unsuccessful.  I can copy a playlist to a text file, then change the file paths to the iTunes library, but it will either not work at all, or will import the playlist but not all the tracks are included.  

Link to comment
Share on other sites

Yes M3U files can be pre-existing, or you can export your current Poweramp internal playlists out to physical files (normally as .M3U8 for better extended filename handling, but same thing otherwise) using the Export feature in the Library=>Playlists menu.

iTunes is a law unto itself (Apple stuff always is) but I think it can handle M3U files. I'm afraid I never use it, so I don't know the details. 

Andre

Link to comment
Share on other sites

I only use iTunes as a reference library for my PC, but I don't use any Apple devices.  It would just be good to be able to sync my playlists, but I guess there's no real need as they can be backed up as text files anyway.  

Thanks.  🙂

Link to comment
Share on other sites

49 minutes ago, Si64 said:

I've also been trying to find a way to copy an Android based playlist into iTunes, but have so far been unsuccessful.  I can copy a playlist to a text file, then change the file paths to the iTunes library, but it will either not work at all, or will import the playlist but not all the tracks are included. 

iTunes can import standard m3u playlists. But unlike Poweramp, it requires a proper Absolute reference including the full path and directory structure. You can use any standard text editor to make a quick change here before you import it. Wordpad works fine since you are on a PC. Use the Replace feature under edit, and change the core path for the current one to reflect the library directory that iTunes is looking at. Be sure to use the correct slash character as well, Windows uses the opposite of Android. 

Link to comment
Share on other sites

46 minutes ago, MotleyG said:

iTunes can import standard m3u playlists. But unlike Poweramp, it requires a proper Absolute reference including the full path and directory structure. You can use any standard text editor to make a quick change here before you import it. Wordpad works fine since you are on a PC. Use the Replace feature under edit, and change the core path for the current one to reflect the library directory that iTunes is looking at. Be sure to use the correct slash character as well, Windows uses the opposite of Android. 

Thanks, yeah, I have done that, but still a good number of tracks were missing in the imported iTunes playlist.  I'll try it again on a smaller scale.  Trying to manage a playlist of over 3000 tracks might have been a little ambitious.  😄

Link to comment
Share on other sites

I seem to recall there was also an issue with certain characters in file names such as track titles.  You can't have a forward slash as part of a file name in Windows, so I think any tracks with slashes in the titles (such as Intro / Track One) in the playlist text file, didn't match up with those tracks in the iTunes library in Windows.

Link to comment
Share on other sites

Just now, Si64 said:

I seem to recall there was also an issue with certain characters in file names such as track titles.  You can't have a forward slash as part of a file name in Windows, so I think any tracks with slashes in the titles (such as Intro / Track One) in the playlist text file, didn't match up with those tracks in the iTunes library in Windows.

That is correct, the file name has to be identical or the song is skipped. Any non-Unicode or illegal filename characters are replaced by a space in iTunes.

Link to comment
Share on other sites

It always gets fun (OK, not so much...) when you try to use the same playlist content across multiple devices. An M3U (or M3U8, which is the same but is Unicode instead of ASCII so it supports more special characters) file at its simplest just contains a series of lines of text, each giving a path that links directly to an audio file. The problem is that these absolute paths probably only exist on that machine.
 

For example on my PC I might have a three-song playlist:

C:\Users\MyUsername\Music\Andre's MP3 Files\Artists\ABBA\Arrival\Dancing Queen.mp3
C:\Users\MyUsername\Music\Andre's MP3 Files\Artists\Blondie\Parallel Lines\Sunday Girl.mp3
C:\Users\MyUsername\Music\Andre's MP3 Files\Artists\Duran Duran\Rio\Hungry Like the Wolf.mp3

Poweramp is actually quite ingenious in the way it handles that sort of content, in that it ignores all the PC-only stuff like "C:\etc", and it can cope with either "/" or "\" for path separators. It will simply look for matches which fit this pattern:

A file called Dancing Queen.mp3 in a folder called Arrival
A file called Sunday Girl.mp3 in a folder called Parallel Lines
A file called Hungry Like the Wolf.mp3 in a folder called Rio

However the same thing re-saved from Poweramp, which then uses the phone's Android file system, might look like this - which a PC program is probably not going to understand if you copy it back again:

DOD8-86GE/Audio Files/Artists/ABBA/Arrival/Dancing Queen.mp3
DOD8-86GE/Audio Files/Artists/Blondie/Parallel Lines/Sunday Girl.mp3
DOD8-86GE/Audio Files/Artists/Duran Duran/Rio/Hungry Like the Wolf.mp3

 

For what it's worth, what I mostly do is manage my playlists on my PC (using music players or even a basic text editor) and create PC-style M3U files like the top example. Then I copy those files to my phone (you could sync them somehow if you wish, I generally just do it manually when I make any changes). I said above, Poweramp will then hopefully work it out.

There is a way to make bi-directional copying probably work, which is to create relative path playlists (i.e. basically without the C:\Users\MyUsername\etc stuff) and then re-save them from within Poweramp (which can now re-save using relative paths) but that brings its own set of complications such as the need for the playlist files to remain in the same relative subfolder locations on both systems.

Andre

Link to comment
Share on other sites

21 minutes ago, Si64 said:

You can't have a forward slash as part of a file name in Windows, 

Correct, you should never use either type of slash/oblique stoke character in any filename, nor any of other special reserved characters like double-quotes, *, ?, etc. They are all fine embedded in tag data for Titles, Albums etc, just not in the storage filenames.

If you really want to use a slash in a filename (but it's a pointless hassle, tags are more suited for that) you could get really creative and use Unicode characters which look visually similar to slashes (which is known as 'Solidus' in Unicode). e.g:

U+002F /  SOLIDUS
U+2044 ⁄  FRACTION SLASH
U+2215 ∕  DIVISION SLASH
U+2571 ╱  BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
U+29F8 ⧸  BIG SOLIDUS
U+FF0F /  FULLWIDTH SOLIDUS (fullwidth version of solidus)
U+1F67C 🙼  VERY HEAVY SOLIDUS

But really, what's the point for filenames?

Andre

Link to comment
Share on other sites

Agree with the above.  It's probably more trouble than it's worth.  I'd have just liked to have a duplicate playlist in iTunes, which I could then have kept manually updating once it was created.  

I used to have one, many moons ago when I had an iPhone 4S, but since I moved to Android I let the iTunes playlist lapse and now it's going to be a job to recreate it.

I guess there's better things to be doing anyway.  😄

Link to comment
Share on other sites

  • 9 months later...
On 6/2/2022 at 4:07 PM, andrewilley said:

@Si64 '>>Queue (shuffled)' definitely inserts the shuffled items after the currently playing (or most recently played) song in the Queue - otherwise the new songs would never get heard.

Using '+Playlist (shuffled)' behaves in much the same way, so if a Playlist is currently being played (even if it is paused) then the new items will be shuffled randomly throughout the remaining (i.e. unplayed) portion of the Playlist. If the Playlist is not currently playing, the new songs will be shuffled randomly throughout the entire Playlist.

Note: There is currently a slight known bug in that if the queue is initially empty (or you are creating a brand new playlist) the added songs are not shuffled correctly.

Andre

Unfortunately, this feature broke with an update back in February. Now when you use +Playlist (shuffled) to add songs to the currently playing playlist, the songs are added immediately after the current playing (or paused) song, in almost sequential order. This should not happen with a playlist that has over 5,000 songs.

Link to comment
Share on other sites

The fact that new shuffled songs get inserted after the current playback position if you add them into a Playlist that is already playing is by design. It's the same logic as for the Queue, in that there's no point inserting new songs at an earlier point than you are listening, as you won't get to hear them.

However I've just done several tests, and while the new songs do indeed get fully shuffled as expected, they are definitely being inserted "clumped" very close together within the target playlist, very soon after the current playback position. The same issue occurs with non-playing playlists too: I repeatedly inserted 8 numbered songs into a 200-song playlist, and all eight songs were interspersed randomly within the first 5-10 items in the target playlist - sometimes even less, with many of the inserted songs actually getting placed next to each other.

Andre

Link to comment
Share on other sites

I did several tests on this when it was first introduced, and found that the shuffled tracks were indeed added after the currently playing track, but if that was at the end of an alphabetically sorted playlist, then all the "add shuffled" tracks would appear at the end of the playlist.  So, if you happened to be playing Whitesnake, all the shuffled tracks would be bunched together at the end, but if you happened to be playing Aerosmith, they'd be shuffled more evenly throughout the playlist.  

For me, this didn't really work as an option, so I've not used the function.

On another player I use, when a playlist is shuffled, a new Queue is created, with the tracks in random order, but numbered sequentially.  So, when new tracks are "add shuffled", and you are, say, playing track 200 out of 2000, it will add the tracks after track 200 (ignoring those tracks previously played), shuffled within the playlist, but not dependent on the track title / artist currently playing.  

Link to comment
Share on other sites

I'm glad you were able to replicate this Andre. I contacted support twice and was basically blown off. I figured I would try here. Hopefully a fix for this will be released soon as I am constantly recording and adding songs to very large playlists in Poweramp.

Link to comment
Share on other sites

@CJ41 Yes, while perhaps not a fully fledged bug, it certainly is not behaving quite as would be expected. It's nothing to do with the playlist currently being played by the way. It also happens if (for example) you insert six new tracks into any large playlist using the Shuffle option. You would expect the six new tracks to be shuffled and scattered fairly randomly throughout the existing playlist songs - but instead they all seem to get clumped within a few tracks of each other very close to the beginning of the list.

Andre

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...