ashuffle
ashuffle copied to clipboard
How to shuffle one song from each tag
Is it possible to shuffle song from 2 artist like this:
Artist A: [A1, A2, A3] Artist B: [B1, B2, B3, B4, B5] Queue: [B2, A1, B3, A3, B5, A2, B4, A3, B1, A2....]
Thank you for your help..
Just so I'm understanding correctly, the idea is to interleave the values of the tag (in this case artist) in a random order. E.g. [B3, A1, B2, A4, B5, A2, ...]
would also be valid ordering. How would this generalize to more than 2 values? E.g., what if I have A
, B
, and C
? Would it be [A1, B4, C2, A3, B1, C3, ...]
or something else? What if there's only one unique tag value, would that just be the normal shuffle that ashuffle
already implements?
Assuming my understanding is correct, there's no support for this today. Songs are pulled from a common pool without regard for their attributes. So, this would need to be implemented to be supported.
I think interleaving in this way wouldn't work super well with ashuffle's shuffling algorithm. If you'd like this feature in ashuffle, I'd propose instead a more configurable window-uniqueness. E.g. no two songs by the same artist can be in the window at the same time. With the standard window size of 7, and songs by artists A..Z
, this would end up doing a shuffle like [A1, X9, F2, Q7, B2, R5, M1, A3, ...]
Notice that A
repeats before a song by every letter is played. This means that it wouldn't guarantee the interleave across all songs, just for the window length. I think that should be enough space between the artists to be good enough, and it fits better with ashuffle's model.
Thank you for your answer. To be precise, my use-case is the following:
I have a playlist of 500+ podcasts and a playlist of 50 songs. I want to have: [1 random podcast, 1 random song, 1 random podcast, one random song] Obviously songs gonna repeat before podcasts, but that's ok.
------- Original Message ------- On Tuesday, June 14th, 2022 at 07:55, Josh Kunz @.***> wrote:
Just so I'm understanding correctly, the idea is to interleave the values of the tag (in this case artist) in a random order. E.g. [B3, A1, B2, A4, B5, A2, ...] would also be valid ordering. How would this generalize to more than 2 values? E.g., what if I have A, B, and C? Would it be [A1, B4, C2, A3, B1, C3, ...] or something else? What if there's only one unique tag value, would that just be the normal shuffle that ashuffle already implements?
Assuming my understanding is correct, there's no support for this today. Songs are pulled from a common pool without regard for their attributes. So, this would need to be implemented to be supported.
I think interleaving in this way wouldn't work super well with ashuffle's shuffling algorithm. If you'd like this feature in ashuffle, I'd propose instead a more configurable window-uniqueness. E.g. no two songs by the same artist can be in the window at the same time. With the standard window size of 7, and songs by artists A..Z, this would end up doing a shuffle like [A1, X9, F2, Q7, B2, R5, M1, A3, ...] Notice that A repeats before a song by every letter is played. This means that it wouldn't guarantee the interleave across all songs, just for the window length. I think that should be enough space between the artists to be good enough, and it fits better with ashuffle's model.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Just so I'm understanding correctly, the idea is to interleave the values of the tag (in this case artist) in a random order. E.g.
[B3, A1, B2, A4, B5, A2, ...]
would also be valid ordering. How would this generalize to more than 2 values? E.g., what if I haveA
,B
, andC
? Would it be[A1, B4, C2, A3, B1, C3, ...]
or something else? What if there's only one unique tag value, would that just be the normal shuffle thatashuffle
already implements?Assuming my understanding is correct, there's no support for this today. Songs are pulled from a common pool without regard for their attributes. So, this would need to be implemented to be supported.
I think interleaving in this way wouldn't work super well with ashuffle's shuffling algorithm. If you'd like this feature in ashuffle, I'd propose instead a more configurable window-uniqueness. E.g. no two songs by the same artist can be in the window at the same time. With the standard window size of 7, and songs by artists
A..Z
, this would end up doing a shuffle like[A1, X9, F2, Q7, B2, R5, M1, A3, ...]
Notice thatA
repeats before a song by every letter is played. This means that it wouldn't guarantee the interleave across all songs, just for the window length. I think that should be enough space between the artists to be good enough, and it fits better with ashuffle's model.
Old discussions but I'm left wondering if you meant that "no two songs by the same artist can be in the window at the same time" is already possible? if so, how ? This is exactly what I'm hoping to do as I mainly listen to a huge music library on random and would like to avoid hearing the same artist within the defined window.
@joshkunz I'm unfortunately unable to contribute code but I can say that I,d very much like to have the feature "no two songs by the same artist can be in the window at the same time" added if it's not too much trouble or out of scope.