INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Classical music: Shuffle play for multi-movement works  (Read 3139 times)

tom9920

  • Recent member
  • *
  • Posts: 28
Classical music: Shuffle play for multi-movement works
« on: May 17, 2020, 11:25:51 am »

I have found a way to enable shuffle play in a way that keeps multi-movement works together.  Here's how I did it.  At a high level, the approach is based on these steps:
  • Create a user-defined field that has a unique value for each multi-movement work;
  • Create a "seed" playlist that contains individual tracks from works to be included in the final playlist;
  • Create the final playlist by expanding the seed playlist to all the tracks in the multi-movement work.

Let's see how this works using an example. Let's suppose I want to play three randomly selected piano sonatas by Beethoven.

Step 1:  Create a user-defined field called "opus" and, for each track of a Beethoven piano sonata, store the related opus number (e.g., "Op. 106")

Step 2:  Create a seed playlist that randomly selects three unique tracks and is itself randomly shuffled:  [Media Type]=[Audio] -[Opus]=[] [Composer]=[Beethoven, Ludwig van] [Name]="Piano Sonata" ~nodup= ~n=3 ~sort=Random

Notes For Step 2:  The rule for opus is not blank is included as the expand step later would otherwise include all tracks without an opus number in the final playlist.  The rules for composer and name are included to exclude works by other composers and works that are not sonatas; depending on the way you tag tracks you may need some other rule(s) to limit the results to Beethoven piano sonatas..

Step 3:  Create a final playlist:  (([Media Type]=[audio] [=save(0,v_filter[opus][artist])1]=1) or (playlistid==insert your seed playlist # here [=save(1,v_filter[opus][artist])1]=1)) [=load(v_filter[opus][artist])]=1

Notes for Step 3:  Use the seed playlist number (not name) to replace the text in red. The first command in this string stores the value "0" in the global variable "v_filter" for each combination of opus and artist in your database.  The reason for using the opus and artist combination is for the case that you have multiple performances of the same work by different artists.  After this command is executed, if Richard Goode playing the second movement of Op. 106 is in the seed playlist, the global variable associated with this combination now equals "1".  The next command stores the value "1" in the global variable in the opus and artist combination where it matches a combination in your seed playlist.  So to continue the example,  the global variable related to the tracks for Goode's first and third movements of Op. 106 will now also equal 1. The last command loads the tracks with the global variable = "1" into your final playlist.

Thanks to mark_h whose post titled "[HOWTO] Generate an EXPANDED superset from a limited subset" provided the general approach used here.

Have fun with this!

Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #1 on: May 17, 2020, 01:13:13 pm »

As you've found, MC doesn't have good straightforward support for the multi-movement compositions of Classical music.

However, a feature was added that makes this task much easier than the method you've happened onto using global variables.  (In fact there are a couple of easier ways to do this, without using global variables.)  Global variables are too complicated to easily implement for a lot of people.

The easiest way is to rely on the "Link Tracks" feature.

Simply select all the movements in a composition, and right-click, and select Library Tools->Link Tracks

Now, when added to a Smartlist, these tracks will play together in order.

You should still use the "Remove Duplicate" modifier to ensure the composition appears on the playlist only once.

Also, regarding your "Opus" field, you may find it's more efficient to use calculated data, rather than entering data manually.

I use a custom field "Composition" for this purpose.  It is a field of type "Calculated Data" with the definition:
listitem([name],0,:)

This works in conjunction with having a consistent naming convention for classical music.   I name my classical tracks such that the name of the composition comes first, separated from the track-specific info by a colon. So if you have the three tracks for Mozart's 1st Piano Concerto named as follows:

Concerto No.1 in F major, K.37: I. Allegro
Concerto No.1 in F major, K.37: II. Andante
Concerto No.1 in F major, K.37: III. Allegro

They will all automatically share the [Composition] value "Concerto No.1 in F major, K.37"

So simply by naming tracks correctly, they will automatically share Composition fields.  This makes it possible to do what you're after without using global variables, and in fact without even using linked tracks.
Logged

tom9920

  • Recent member
  • *
  • Posts: 28
Re: Classical music: Shuffle play for multi-movement works
« Reply #2 on: May 17, 2020, 04:27:17 pm »

Thanks for the reply.  My goal was to be able to play classical compositions randomly.

I tested link tracks and found that play order was not preserved when shuffling a playlist.  But maybe I made a mistake in testing?  (Also, I didn't see that it was easy in practice to automate the process of linking tracks.) 

And of course sorting by name (with the right naming convention) will keep multi-movement tracks together, but again, it wouldn't work in the case where you have a rule in a smartlist that shuffles the tracks.

Regarding the "opus" field, I used that example to keep my explanation simple.  In practice any field that groups the related movements with a shared unique value works, and I populated the field I used for this purpose with an expression based on my own naming conventions.

I agree that my approach is not very intuitive.  My ask--many versions back--was for a playlist group containing other playlists to shuffle the child playlists rather than the tracks of all the child playlists combined.  There are probably other good solutions but I guess there aren't enough people using J River to manage classical music to make a better solution a priority.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #3 on: May 17, 2020, 04:56:56 pm »

(Also, I didn't see that it was easy in practice to automate the process of linking tracks.) 
Linking tracks is a manual process, but it's a two-second process that can be performed when ripping or importing tracks.  It's a very small component of the time necessary to edit metadata, especially the metadata of classical music, which always requires manipulation.

I tested link tracks and found that play order was not preserved when shuffling a playlist.  But maybe I made a mistake in testing?
I presume because you are posting in the MC25 board, you are using that version.  Perhaps there is some issue with shuffling linked tracks in that version, but I don't have a copy laying around to test, so I couldn't say if it's something you're doing wrong or some issue in MC25.

However, in MC26, the correct order of linked tracks is respected, when shuffling both manually ordered playlists and smartlists where the shuffle modifier is used. I see no mention in the release notes this was changed since MC25.

And of course sorting by name (with the right naming convention) will keep multi-movement tracks together, but again, it wouldn't work in the case where you have a rule in a smartlist that shuffles the tracks.
Not correct.  I do this all the time.  If you construct your smartlist correctly, the order of multi-movement compositions can be preserved in a shuffled smartlist, even without using linked tracks.  I myself don't use linked tracks, because I just can't be bothered.  My naming scheme coupled with the calculated fields I use gets the job done. If I recall correctly, I developed it before the Linked Tracks feature was created.
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #4 on: September 23, 2020, 06:53:39 am »



I use a custom field "Composition" for this purpose.  It is a field of type "Calculated Data" with the definition:
listitem([name],0,:)

This works in conjunction with having a consistent naming convention for classical music.   I name my classical tracks such that the name of the composition comes first, separated from the track-specific info by a colon. So if you have the three tracks for Mozart's 1st Piano Concerto named as follows:

Concerto No.1 in F major, K.37: I. Allegro
Concerto No.1 in F major, K.37: II. Andante
Concerto No.1 in F major, K.37: III. Allegro

They will all automatically share the [Composition] value "Concerto No.1 in F major, K.37"

So simply by naming tracks correctly, they will automatically share Composition fields.  This makes it possible to do what you're after without using global variables, and in fact without even using linked tracks.

You lost me.   I understand the Composition calculated field and movemnet naming convention.   What I don't understand is how they play as a group in a playlist as the composition name and in the correct order.  How do you play a "composition?"
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #5 on: September 23, 2020, 11:45:53 am »

Try it, Dennis.

Add [Composition] as a level to your view and try it.

Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #6 on: September 23, 2020, 01:11:01 pm »

I added composition as a field but when I went to edit the view, it wasn't available to add as a level

But I did try adding the expression again (listitem([name],0,:)) and I see what you mean.   

I would need to change all my file names.....currently my Album name is the same as composition.   Maybe I can do some fancey global change if I get up the nerve.
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #7 on: September 23, 2020, 02:17:56 pm »

I added composition as a field but when I went to edit the view, it wasn't available to add as a level

I'd have to guess you didn't do something correctly, or didn't do what you thought you did.

If you actually add Composition as a field:


Then it WILL be available to add as a level when configuring your view:


And then you'll be able to have a view like this:

Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #8 on: September 23, 2020, 02:24:14 pm »

Regarding your file names, as I'd mentioned in my previous tutorial on compositions and album ratings, yes, you do have to be rigorous about naming your tracks.  You have to have a system, and stick to it.

These modifications certainly do not make MC perfect or ideal for handling classical music, but it gets you a lot closer than the stock configuration.
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #9 on: September 23, 2020, 02:39:54 pm »

Regarding your file names, as I'd mentioned in my previous tutorial on compositions and album ratings, yes, you do have to be rigorous about naming your tracks.  You have to have a system, and stick to it.

These modifications certainly do not make MC perfect or ideal for handling classical music, but it gets you a lot closer than the stock configuration.

I got it now....thanks a million...that's exactly what I was trying to do.

You are right ... MC could add Classical music friendly views.   
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #10 on: September 23, 2020, 04:17:17 pm »

Good, glad to help.
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #11 on: September 26, 2020, 06:49:44 am »

In your post above, how did you get the selection "Artists>Beethoven Compositions" or did you rename a view?
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #12 on: September 26, 2020, 12:28:25 pm »

I got it now....

I don't understand your last post in this context.  I've already given you that information in my posts above.  Please pay attention to the screenshots and try it. If you're actually trying this and are not getting the desired results, you'll have to provide a detailed post with screenshots, showing exactly what you've tried step by step and exactly what results you achieved.

If you don't know how to create or customize a view at all, please refer to Marko's excellent tutorial:
https://yabb.jriver.com/interact/index.php?topic=68960.0
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #13 on: October 09, 2020, 05:44:13 am »

I figured it out.   I'm guessing you used a custom view expression like

      [composer] Compositions   which displays as "Bach Compositions"


I have a minor problem primarily with classical music.  How do I treat compilations?   Let's say I have an album "Van Cliburn's favorite Piano Pieces" which doesn't have complete works, but maybe one movement.  I was thinking of putting an album type such as "Compilation" and treating all compilations separate from the composer full compositions.

And how to name the individual tracts?   For instance --Van Cliburn has Beethoven's "Fur Elise"  on his "Best of" album......I currently have it named Beethoven:Fur Elise but I don't like that
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #14 on: October 09, 2020, 11:44:15 am »

You guessed wrong; my screenshot showed what I did, so look at the customize views screenshot. Feel free to embellish as you'd like.

It's not required you have a colon in the name of every classical track in your library; many classical works are a single track. Omit the colon, and the entire track name will be considered the composition.

How you organize compilations is up to you; everyone has a different method. I mostly keep the few that I have separate, under the Album Artist "Various".

Fragments are an anomaly. If you want the fragment to look like a separate composition from the complete work, as I would recommend, omit the colon.

If you don't like "Beethoven: Fur Elise" why don't you just call it "Beethoven's Fur Elise" as you just did, or "Beethoven - Fur Elise" or just "Fur Elise" ?  That's just you own personal preference and sense of esthetics; suit yourself. It's like you asking someone else what color you should like.  :)
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #15 on: October 09, 2020, 12:49:10 pm »

You guessed wrong; my screenshot showed what I did,

To be clear...what I am puzzling over is the "Compositions" after Beethoven (see my attached screenshot test.jpg and arrow)
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #16 on: October 09, 2020, 01:43:30 pm »

Yes, I know.  And if you had tried building a view exactly as I had shown in my screenshot, you would have seen that MC names the tab that way naturally.

Again, look at my Customize View screenshot.  It shows a top level category of Artist, and the second level as Composition.
Both of these are simply library fields. Artist is a default field, and Composition is a custom field, defined as I told you.

And when you create a view with these two categories and open it, you would first see a bunch of Artists. And then if you drilled down into Beethoven, you would see the tab name changes to Beethoven Compositions.  That is the way MC is written; it builds the tab name based on the levels of categories you drill down into. Those words are even active links, you can click on them to change levels.  Don't ask how the tab name change happens: Observe that it does happen. MC does this on every tab you have, for every view.

There is no secret expression here.  If you're not getting the results as shown in my screenshot, you're not building the view as shown in my screenshot.

You keep saying in this thread "I don't understand how you got so-and-so", but you don't show your own divergent results.  If you actually get different results, then show your work with screenshots from your own computer showing how the view is configured on your system, so I can explain where you went wrong.  If you don't have any divergent results to show because you didn't try what I gave you, then try it.
Logged

Dennis in FL

  • Galactic Citizen
  • ****
  • Posts: 375
Re: Classical music: Shuffle play for multi-movement works
« Reply #17 on: October 09, 2020, 03:40:24 pm »

I have Beethoven in Composer, and Artist is the conductor, orchestra, and if there is another artist (pianist, etc).   

So I don't have artist in use....I have composer, composition, and then album artist
Logged
WiiM Ultra --> Gustard X16 --> Fosi ZA3 --> KEF LS50 Metas

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Classical music: Shuffle play for multi-movement works
« Reply #18 on: October 09, 2020, 03:58:13 pm »

You can see from the screenshot what I have in the Artist field, and the fields I am using to create the view, so it should be obvious why the tab is named what it is based on the content you see in the screenshot. There is no secret.

Structure the view however you want; use Composer as the top level if you prefer.  The way the tab name is built is the same.  Learn by experimenting.

Good luck...

Logged
Pages: [1]   Go Up