LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2017, 02:08 PM   #1
Archy1
Member
 
Registered: Jan 2014
Distribution: Debian
Posts: 95

Rep: Reputation: 2
Question Any music player that can shuffle by work? [for classical music]


Pointless intro:
[spoiler]
Sometimes I like to put my music on shuffle - it's like listening to the radio except it only plays my music.

For popular works, this works fine, but for multi-movement classical works this is disastrous. The second movement of Schubert's string quintet might play, followed by the 23rd movement of the Messiah. That's like reading chapter 2 from one book and then reading chapter 23 from another. Doesn't make for a good reading (listening) experience, but I still want to randomly select a book (work), not a chapter (track).
[/spoiler]

I've tagged my music so that all tracks from the same album that belong to the same piece have identical grouping tags.

So an album of mine might be tagged like this:
Click image for larger version

Name:	grouping.png
Views:	115
Size:	188.0 KB
ID:	24525

A feature that many players have is the ability to shuffle by album. An album will be randomly selected and played from start to finish (in order), and then another album will be randomly selected and played from start to finish.

What I'm looking for is the same feature except applied to groups. Randomly select a group (work) and play it from start to finish in order, then select another group and do the same (shuffle by grouping).

I haven't seen a linux player that can do that and it's been driving me crazy. I've almost considered swapping the grouping and album tags just so I can use the shuffle by album features for this purpose, but it would cause way too much disorganization amongst my music library, and sometimes I would want to actually shuffle by the albums.

Some quick notes:
Why don't you just join tracks together from the same work?
Sometimes I want to just hear a single movement on it's own, like Beethoven's Große Fuge from his 13th string quartet. (This is much how most people would not find it acceptable to have a whole album joined into one track.)

Why doesn't shuffle by album do what you want?
See above, and unless it's a very long work often there are many works on one album (also consider box sets - I would not want to hear those start to finish).

Some problems I see happening:
Just as players needs to be smart enough to know that "The Cow" by Billy Fat Head and "The Cow" by Samuel S. Samson are different albums, it needs to know that the grouping "Symphony no. 5 in C minor" from album A is a different grouping than "Symphony no. 5 in C minor" from album B.

So shuffle by album isn't really shuffling by album, it's shuffling by artsist+album (albumartist+album would actually make more sense but whatever) and shuffling by grouping would shuffle by artist+album+grouping. Of course some works will be single movement and thus not belong to a group so if a grouping tag is empty or doesn't exist, that track should be treated as an individual group consisting of only itself. So shuffle by albumartist+album+(if grouping exists && grouping !=null, grouping, else track).

Does anything like this exists? I've thought about altering some players' shuffle by album function to do this, but the code quickly went over my head.

Even if the player sucks for classical music in others ways, if it has this capability, I'd be interested.

Some more notes:
iTunes and MusiCHI can already do this, but they are not linux friendly and iTunes can not play FLAC files (FLAC plays nicer with custom tags than ALAC does).

Last edited by Archy1; 03-16-2017 at 02:10 PM.
 
Old 03-23-2017, 11:25 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 365

Rep: Reputation: 82
Lovely music collection! Try rhythmbox maybe?
 
Old 03-24-2017, 06:37 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,356
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
I understand your points and also your notes about how manually overriding by combination is not effective.

I have no proposed player built-in solution.

Just noting something you have left out in your notes, but I'm sure you've already considered: Playlists.

I realize you wish to shuffle and thus have the shuffle grab an entire collection of movements which are related.

Also as far as the combination option, I see nothing wrong with combining an entire album and having that be a new track, so therefore the individual tracks are also still there, but you also have the combined album.

However as you cite, putting in effort towards this when there are other players for other platforms which already fulfill the features, seems inefficient.

I use VLC a lot, but I only normally play single tracks, or a collection of tracks which I've selected from the file manager and then when you open that all using VLC it is like a custom playlist.
 
Old 03-24-2017, 07:32 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Debian has randomplay, although command line and cryptic. But it'll play whatever your wildcards pick up and pass to it. Most gui players have a random option, although random relative to your playlist(s).

$ randomplay --noremember --random --player mp3=mpv ./*.mp3
 
1 members found this post helpful.
Old 03-24-2017, 09:01 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
Quote:
For popular works, this works fine, but for multi-movement classical works this is disastrous. The second movement of Schubert's string quintet might play, followed by the 23rd movement of the Messiah. That's like reading chapter 2 from one book and then reading chapter 23 from another. Doesn't make for a good reading (listening) experience, but I still want to randomly select a book (work), not a chapter (track).
try making a play list to play the moments in the order you want to hear them instead. that'd require you making that list of all your music using find then opening up the list and manipulating it in the order you want then telling it to just play that list no longer needing shuffle.
 
Old 03-25-2017, 12:52 AM   #6
Archy1
Member
 
Registered: Jan 2014
Distribution: Debian
Posts: 95

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by cyent View Post
Lovely music collection! Try rhythmbox maybe?
I just tried it out and I don't see anyway to shuffle by any grouping, not even by album, at least not in Version 3.1 (the one in the Jessie repository). I'll give 3.4 a shot if another person recommends it.

Quote:
Originally Posted by rtmistler View Post
Also as far as the combination option, I see nothing wrong with combining an entire album and having that be a new track, so therefore the individual tracks are also still there, but you also have the combined album.
Hmm. I'm surprised I didn't realize I could have the best of both worlds. Doubling the hard disk usage however doesn't seem worth it.

Quote:
Originally Posted by Shadow_7 View Post
Debian has randomplay, although command line and cryptic. But it'll play whatever your wildcards pick up and pass to it. Most gui players have a random option, although random relative to your playlist(s).
I think I can see how I could make this work. I already mentioned I've tagged movements of a work with identical grouping tags. I currently have my music organized in the standard Music/Artist/Album/Track structure, but I could change that pretty easily to Music/Artist/Album/Grouping/Track with some tools. Then I could have a script randomly go three directories down from the Music directory, landing within a Grouping directory, then play all songs in order, then cd back to Music, and repeat. This would also solve the Identically-named-group-but-actually-a-different-group-because-it-belongs-to-a-different-album problem. I will strongly consider doing this but having subdirectories within an album directory will make playing entire albums slightly more annoying when not using a music manager like Banshee, Quod Libet, etc.

Quote:
Originally Posted by BW-userx View Post
try making a play list to play the moments in the order you want to hear them instead.
In some ways I have already done that by sorting with the "grouping" tag. Grouping the movements into a playlist isn't a problem, it's selecting a random grouping/playlist to play that is. Plus that would be a lot of playlists if I had a separate one for each work. But if I could auto-generate playlists based off the grouping tag and then have a mechanism to select a random playlist, play it in order, then select another playlists and repeat, that would work very well.

Last edited by Archy1; 03-25-2017 at 01:08 AM.
 
Old 03-25-2017, 01:05 AM   #7
Archy1
Member
 
Registered: Jan 2014
Distribution: Debian
Posts: 95

Original Poster
Rep: Reputation: 2
Lightbulb

Sorry for the double post but I think this warrants it.

I just came up with a pretty good solution for the Quod Libet player. I mentioned it on github but I'll repeat it here.

Say all movements of the same work have an identical 'grouping' tag. We could shuffle by that tag, just as we can shuffle by albums, with "quodlibet --random=grouping". This script issues “quodlibet --random=grouping”, plays the song list, detect when the song list has finished, and issues “quodlibet --random=grouping” again.

For Quod Libet 3.2.2:
Code:
#!/bin/sh

## Quod Libet 3.2.2 shuffle by grouping Bourne shell script.

## This may not work in all browsers. If it doesn't work in your preferred
## browser, switch to the search browser.

## Defines grouping tag as first argument, else defaults to 'grouping'.
tag=${1:-'grouping'}

while :; do

  if [ "$(quodlibet --status)" = "" ] && sleep 1 &&
     [ "$(quodlibet --status)" = "" ]; then

    quodlibet --random=$tag &&
    sleep 4 && ## See note
    quodlibet --next &&
    sleep 2

  fi

done

## NOTE: The value '4' will need to be larger for larger libraries.
For Quod Libet 3.8.1:
Code:
#!/bin/sh

## Quod Libet 3.8.1 shuffle by grouping Bourne shell script.

## This may not work in all browsers. If it doesn't work in your preferred
## browser, switch to the search browser.

## Defines grouping tag as first argument, else defaults to 'grouping'.
tag=${1:-'grouping'}

control=$HOME/.quodlibet/control

while :; do

  if [ "$(quodlibet --status | tail -c 6)" = "0.000" ] && sleep 1 &&
     [ "$(quodlibet --status | tail -c 6)" = "0.000" ]; then

    test -p $control && echo "random $tag" > $control || exit 1

    sleep 4 && ## See note
    test -p $control && echo "next" > $control || exit 2

    sleep 2

  fi

done

## For some reason "quodlibet --random=tag" wasn't working for me with 3.8.1,
## hence the use of '$HOME/.quodlibet/control'.

## NOTE: The value '4' will need to be larger for larger libraries.
Caveats:
Say a group of movements from the album “Sammy Conducts Beethoven” have a grouping tag of “Symphony No. 5” and another group of movements from the album “Samantha Conducts Beethoven” also have a grouping tag of “Symphony No. 5”. Those two different works (well different recordings) will be grouped together because they share the same grouping tag.

You probably would not assign a grouping tag to a single movement piece, but that piece will be excluded from this shuffle if it does not have a grouping tag.
Solution: Copy the track title to the grouping tag of all single movement works.

In the Pane browser, selecting pane items will not act as a filter. So if you only want to listen to Concertos and Symphonies, selecting Concerto and Symphony from the <genre> pane will not achieve that.
Solution: The search bar can be used to act as a filter, |(genre=Concerto, genre=Symphony) would achieve the above.


This still has the Identically-named-group-but-actually-a-different-group-because-it-belongs-to-a-different-album issue and its annoying having to create groups for single movement works but given the simplicity (read easiness) of the implementation, I'm pretty pleased at least for now. Will still have Shadow_7's proposal on my mind though...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Play your Music on Linux with Music Player Daemon LXer Syndicated Linux News 0 03-03-2014 06:41 PM
CD Ripping - Classical music - Ubuntu 10.10 Slowbey Linux - Software 6 04-04-2011 11:14 AM
LXer: Encode and sync music to your portable music player in linux LXer Syndicated Linux News 0 09-15-2009 08:40 AM
LXer: Exaile Music Player - Music Player for GTK+ in openSUSE LXer Syndicated Linux News 0 08-31-2008 12:50 AM
Yamipod Classical Music Track Order kajensen Linux - Software 9 04-18-2007 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration