Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Request: Logically join tracks in playlist. (Read 2636 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Request: Logically join tracks in playlist.

Not sure if this has been thought of before, or if any other players implement this, but I thought it would be a really cool feature. (BTW. My apologies if this is already implemented and I just haven't figured out where it is yet. LOL )

You know when you have album tracks that need to flow together, like the first 4 tracks on side 1 of "Pink Floyd - Dark Side of the Moon" for a classic example. To me, foobar seems do a pretty nice job of playing them seamlessly. But if you play a large selection in shuffle mode, as we often do, then naturally these tracks are going to get broken.

I know that some people join multiple tacks into a single files just to avoid this problem. I was just thinking it would be a really cool feature to have a way to logically join files in a playlist so that: (1) they always play consecutively, even when you're shuffling, and (2) they use a common replay gain - even when track gain is selected.

As anyone ever seen this implemented in a media player?




Request: Logically join tracks in playlist.

Reply #3
OK I got it working. It's got a few shortcomings so I'll list those first, but overall it does work quite well.

Shortcomings
1.  It's a pretty manual procedure.
2. You must add new tag to ALL your music, not just the tracks you need to segue.
3. It usurps regular "Album Shuffle" functionality. It's one or the other, you can't have both.

Now for detailed instructions on how to do it. I made the steps very detailed because I'm a dummy and had trouble knowing where to access the various fields and setting in the other linked post. I've used basically the same procure but simplified it slightly.

Steps (verbose).

1. Start with your target playlist sorted in the default "artist-album-track" format (mine does this automatically when I click the top of the "artist/album" column).
.
2. Edit - "Select all"

3. Right click the selected (all) tracks and click "Properties"

4. Right click in whitespace of metadata and select "Add New Field" and give it the name LINK.

5. Right click the field  <LINK> that you just created and select "Format From Other Fields" and enter %title% for the pattern. When applied this will fill the new field with a copy of the track title, which is hopefully a unique value for each track.

6. Now select two consecutive tracks that you want to segue. Right click and select "Tagging" - "Copy Info Between Files". Now untick everything except the "LINK" checkbox, then ok.

At this point all the tracks have a new field "LINK" and they all contain a unique value in this field, which is a copy of the track title - EXCEPT for the two segued tracks, which will now both contain the "title" value of just the first of the two tracks. Repeat step 6 for as many tracks as you wish to segue.

We now just have to tell foobar to use this new LINK field for the "album shuffle grouping pattern".

7. Navigate through "File" - "Preferences" - "Advanced" - "Playback" - "Shuffle"  and set "Album Grouping Pattern" to %LINK%

8. Finally, select "Shuffle Albums" from the order dropdown (or from the "playback-order" menu) and you're done.

It should now go through the playlist in a random manner, except for the tracks you've joined which should play consecutively. (If it doesn't work first time then exit foobar and restart.)

To undo the segueing on any tracks just select them and re-apply the "Format From Other Fields" operation from step 5.

Hope this helps someone else.

Request: Logically join tracks in playlist.

Reply #4
But then you’ll probably end up with unrelated tracks being linked because they happen to have the same title, won’t you? It must also be a huge pain to have to add the new field to everything, when only a few tracks will actually need it in principle.

I wonder if there’s a better way to do this, but I’m drawing a blank due to being a bit out of my depth here, so I’m interested to see if anyone else has any ideas!

Request: Logically join tracks in playlist.

Reply #5
But then you’ll probably end up with unrelated tracks being linked because they happen to have the same title, won’t you? It must also be a huge pain to have to add the new field to everything, when only a few tracks will actually need it in principle.

I wonder if there’s a better way to do this, but I’m drawing a blank due to being a bit out of my depth here, so I’m interested to see if anyone else has any ideas!


Yes I totally agree, that's why I listed the shortcoming first.  I think this is something that Peter would have to add as a core feature for it to really function properly (including track RG overrides etc). But for now this is just a work around.

Re the repeated titles, with a large enough playlist or poorly tagged tracks (track01 track02 etc springs to mind) then yes you are likely to get unintended joins. This is easily overcome however by just using something more detailed, like %title%%album% in step 5 (I was just trying to keep it as simple as possible, but the principle is the same - tracks with unique LINK are un-joined and tracks with identical LINK are joined).

At the moment I cant see any way around adding the new field to all tracks, which as you say is a pain, not least for the fact that it will increase every file size ever so slightly. I tried tagging only the tracks that I wanted to join, but fortunately the "shuffle albums" function treated all tracks without the "LINK" field as being identical - and hence the same album, so they all played consecutively.

Request: Logically join tracks in playlist.

Reply #6
foobar2000 is really not designed to deal with stuff like this. Title formatting works on a per-track basis exclusively. What you could do without all that much effort is to label albums that have continuous parts with a field. I'm going to go with PART. I intend it to be used as a sub-album but super-track categorization. If you have an album with 4 tracks, where 2 and 3 are continuous, there are 3 PARTs. Tag track 1 as PART=1, track 2 and 3 as PART=2, and track 4 as PART=3.

Then, just sort by: $crc32(seed %artist% %album% $if2(%part%,%tracknumber%))

Change "seed" to something else to get a different order.

 

Request: Logically join tracks in playlist.

Reply #7
foobar2000 is really not designed to deal with stuff like this. Title formatting works on a per-track basis exclusively. What you could do without all that much effort is to label albums that have continuous parts with a field. I'm going to go with PART. I intend it to be used as a sub-album but super-track categorization. If you have an album with 4 tracks, where 2 and 3 are continuous, there are 3 PARTs. Tag track 1 as PART=1, track 2 and 3 as PART=2, and track 4 as PART=3.

Then, just sort by: $crc32(seed %artist% %album% $if2(%part%,%tracknumber%))

Change "seed" to something else to get a different order.


Sorry Canar, I'm not a "power user" so you've lost me there. I don't know where to enter $crc.....

But in overview, are you saying that we should ...

1. Select playback order as default.

2. Do an "Edit" - "Sort" - "Randomize"

3. Use your magic $crc32... command to sort only the tracks having the "PART" field, leaving the remaining tracks random.

Is that the basic overview of what you're suggesting Canar?

Request: Logically join tracks in playlist.

Reply #8
1. Select playback order as default.

2. Do an "Edit" - "Sort" - "Randomize"

3. Use your magic $crc32... command to sort only the tracks having the "PART" field, leaving the remaining tracks random.
The $crc32 bit is what you sort by. There's no need for step 2. You'll end up with a nice shuffled playlist with all the tracks with the same PART right next to each other.

That said, I made a boo boo. The sort string should be:
Code: [Select]
$crc32(seed %artist% %album% $if2(%part%,%tracknumber%)) $if(%part%,%tracknumber%)

...otherwise your parts might be in arbitrary order!

Request: Logically join tracks in playlist.

Reply #9
foobar2000 is really not designed to deal with stuff like this. Title formatting works on a per-track basis exclusively.

just out of curiosity, has it ever been considered to view the library as a set of sets rather than a set of objects? i.e. to have the possibillity to tell foobar to think in terms of, e.g., albums instead of tracks? i'm asking this because every once in a while i think that would make certain thinks - sorting comes to my mind - a lot more easier (of course, other thinks would be harder, like sorting)

in a same vein i would love to be able to tag such sets...

Request: Logically join tracks in playlist.

Reply #10
just out of curiosity, has it ever been considered to view the library as a set of sets rather than a set of objects?
While I can't answer this question with certainty, the fact is that since its inception, foobar2000 has been tightly-coupled to a track-oriented paradigm. Peter's put significant effort into making album-as-file into a first-class citizen, but the real focus is on individual tracks.

Request: Logically join tracks in playlist.

Reply #11
I just played around with this a bit more today and, crude as it is, I think I actually like the original redundant "LINK" tag method best.

The big advantage for me is that it's a one-off effort. I simply add the link tag to my collection and change from using "shuffle tracks" to "shuffle albums" and I'm done. I can add a join in seconds any time I find the need. And no matter how I move things around or add new playlists etc the joins persist (stay with the files rather than being tied to a fixed playlist in a fixed order). I can move music to my media center PC and again the joins go with the tracks, no need to manually shuffle or sort every time I want to change anything. Just select "shuffle albums" and I'm done.  It's actually working very nicely.

As for the extra size of the redundant tags, it worked out to be less than 40 bytes average per 8MB average file size (mixture of lossless and mp3). That's only a 5 parts per million increase! No matter which way you slice dice chop shred puree or julienne it, 5 parts per million (0.0005%) is nothing.