Author Topic: Resume Random Play after an Album Break?  (Read 4999 times)

Zzyzx

  • Posts: 55
Resume Random Play after an Album Break?
« on: 21 Nov '14 - 07:08 »

Let's say I load up a couple of hundred tracks and start random play using replay gain.

After a while, I want to take a break from that to load up and play a couple of albums in track order, with no replay gain (just auto-amp with preferably an initial pre-amp setting for the album).

Then I want to resume the random play with replay gain, and with XMPlay remembering where it left off. I suppose if the order changed it doesn't matter since it was random, but I don't want to repeat what was played until it finishes up what it hadn't played.

What's the best way to pull all that off with the least amount of manual settings changing, and to retain the random play state in some way for resuming?

Thanks.

saga

  • Posts: 2179
Re: Resume Random Play after an Album Break?
« Reply #1 on: 21 Nov '14 - 11:22 »
I'd just let the random play setting untouched and put the the album in the queue. The queue always has precedence over random play.
You can also set per-file or per-path auto-amp settings in the "Saved Settings" part of the options dialog. Create a path setting with an empty path as a "default" setting and then create the appropriate path or file settings for overriding specific files or paths.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #2 on: 21 Nov '14 - 17:39 »
I'd just let the random play setting untouched and put the the album in the queue. The queue always has precedence over random play.

Oh wow, I have been using the WAClassic skin because I like the look and compactness of it. But it seems it doesn't even have the small Playlist panel with the Queue view! The little playlist tab only opens and closes the Extended Playlist. So, I haven't even been aware of the queue and what to do with it.  :-[

When I look at some other other skins, I see the smaller Playlist panel. Some seem to have a separate Playlist/Queue toggle button, while other skins only show the queue.

So, cool, I get what you're saying that I can insert an album into the queue, in the middle of all the random play songs already there, and it will play in the order shown in the queue.

You can also set per-file or per-path auto-amp settings in the "Saved Settings" part of the options dialog. Create a path setting with an empty path as a "default" setting and then create the appropriate path or file settings for overriding specific files or paths.

Ah, yeah, I've seen all those options in Saved Settings, but really never knew what to do with them.

I guess the trick is that I store all my songs under folders for Artist/Album. When I random play, I add songs from various album folders into the playlist and then random play that. If I play an entire album, it comes from the same folder tree as the songs did, so I'm not sure how it would know the difference to load the replaygain vs. not settings?

Many thanks! That will give me some things to learn about and play around with.  ;D

saga

  • Posts: 2179
Re: Resume Random Play after an Album Break?
« Reply #3 on: 21 Nov '14 - 18:09 »
Quote
If I play an entire album, it comes from the same folder tree as the songs did, so I'm not sure how it would know the difference to load the replaygain vs. not settings?
Oh, so I might have misunderstood you. Do you mean that you just want to disable ReplayGain when you want to play the entire album, and keep it enabled when just playing random files? I don't think that would be possible through saved settings.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #4 on: 21 Nov '14 - 19:20 »
Quote
If I play an entire album, it comes from the same folder tree as the songs did, so I'm not sure how it would know the difference to load the replaygain vs. not settings?
Oh, so I might have misunderstood you. Do you mean that you just want to disable ReplayGain when you want to play the entire album, and keep it enabled when just playing random files? I don't think that would be possible through saved settings.

Yep, I'd want to not use replaygain for the album (or switch to replaygain album mode instead of track mode), since I'd want the tracks to play at the same level across the album.

When I random play, I usually select a certain set of songs that work as "singles." I could go through and copy all the candidate singles into another folder outside the album tree like "Big Mix" or something. And then I can apply the saved settings with replaygain to that specific path, and save the album settings with the empty default path (it would match the more specific path first, right, because it would be a longer path than the empty one?). I have a 10 TB media server that's only half full, so duplicating 100 GB of FLAC songs isn't a big deal (and about 5 days worth of music should be enough for a random play "radio station").  ;D

Side question: I have some albums that have been FLAC encoded with replaygain, and others that are still in raw wav format with no tags of course. If XMPlay is set for track replaygain, pre-amp -5.0, auto-amp reduction, reset on new track, and it hits a wav file, what does it do? Will it just set the level to -5.0 and use reduction if needed (i.e., assume the replay gain is 0.0)? I guess same question applies for a FLAC that doesn't contain replaygain tags?

Although the Illustrated Manual says auto-amp reduction is disabled while using replaygain, IIRC there was a recent update that changed that, correct?

Thanks, I'm really happy there are still features in XMPlay I haven't explored that can help me do what I want!
« Last Edit: 22 Nov '14 - 02:28 by Zzyzx »

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #5 on: 22 Nov '14 - 02:27 »
Not a comprehensive test, but...

I loaded up a bunch of songs into the Playlist, all FLAC encoded with track replaygain tags. I then started playing them in random order, with the DSP set to Replaygain: Track, Pre-amp: -5.0, Auto-amp: Reduction, Reset on new track: checked, Limit according to peak: unchecked. The random play went as expected, using the replaygain tag + pre-amp output level for each song.

I then went to the Queue pane, and inserted the songs for an album, all wav files with no tags. Sure enough, when the current random song ended, the first song from the album played. Cool.

When the inserted wav tracks played under the same DSP settings as above, XMPlay reset the output level to 0.0 for each song. The auto-amp reduction worked to reduce the level on the song peaks, and I could also of course manually drag the output level to what I wanted. Resetting at the start of each song is not unexpected, since Reset on new track is checked.

But I'm curious as to the choice to set the output level to 0.0? I guess I expected it to be set to -5.0, but perhaps the Pre-amp setting only applies if a replaygain is active? Is replaygain only active when an actual replaygain tag is present, or only on certain file formats (like FLAC) with or without a tag, or ???

But I think with Saved Settings I can set the Amplification level to -5.0, Auto-amp: Reduction and Reset on new track: checked, Replaygain: Off (or doesn't matter?) to get that behavior for wav files, right?

If I had Saved Settings for wav files with Reset on new track: unchecked, would it still reset to the saved Amplification level on the first track played on the new settings load? I'd like it to go to that level (e.g., -5.0) on the first track, and then just use Auto-amp: Reduction to reduce further it as it encounters louder tracks (until it finishes the inserted tracks and goes back to replaygain). Make sense?

Sorry for all the questions - I did not (yet) try any saved settings. That's next when I get a bunch more time to play around with it.

Clarification on Saved Settings:

AMP: Is this just the settings in the Amplification group on the DSP options page (level, Reset on new track, Auto-amp, Replaygain, Pre-amp, Limit according to peak level)?

DSP: Is this just the settings I would find if I select a DSP and generated plugins entry on the Plugins option page, and hit the Config button? In my case, I only use the built-in Equilizer DSP plugin, so that would be the set of frequency settings (same thing as in the Equalizer group of the DSP options page)?

Loop: All the settings in the Track looping/ending box on the Miscellaneous options page, right?

Decoder: Everything on the MOD options page (including the Mixing options box), plus the settings for the Input and archive plugins on Plugins->Input options page, right?
« Last Edit: 22 Nov '14 - 02:30 by Zzyzx »

Dotpitch

  • Posts: 2871
Re: Resume Random Play after an Album Break?
« Reply #6 on: 22 Nov '14 - 11:59 »
Although the Illustrated Manual says auto-amp reduction is disabled while using replaygain, IIRC there was a recent update that changed that, correct?
Yes, that was changed in 3.8.0.22.

But I'm curious as to the choice to set the output level to 0.0? I guess I expected it to be set to -5.0, but perhaps the Pre-amp setting only applies if a replaygain is active? Is replaygain only active when an actual replaygain tag is present, or only on certain file formats (like FLAC) with or without a tag, or ???
I had to look it up in the manual:
Quote from: xmplay.txt
Reset on new track: Resets the amp level to 0 dB (or replaygain value) when a track is loaded. ...
Pre-amp: This is added to the replaygain level.
So the output level is set to 0 dB or replaygain+pre-amp indeed. RG is only active if the file has the right tags, but those can appear in multiple file formats.

RG sets the volume to the maximum without clipping. A DSP (for example an equalizer) could change the peaks, thereby introducing clipping. The pre-amp was added to compensate this, but not to serve a default for all non-RG'ed files. I agree it would make sense to extend it a bit.

Using Saved settings for filetype wav would directly solve this, as you already figured out. If you auto-load them, it's even an invisible process.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #7 on: 22 Nov '14 - 22:02 »
Clarification on Saved Settings:

AMP: Is this just the settings in the Amplification group on the DSP options page (level, Reset on new track, Auto-amp, Replaygain, Pre-amp, Limit according to peak level)?

DSP: Is this just the settings I would find if I select a DSP and generated plugins entry on the Plugins option page, and hit the Config button? In my case, I only use the built-in Equalizer DSP plugin, so that would be the set of frequency settings (same thing as in the Equalizer group of the DSP options page)?

Loop: All the settings in the Track looping/ending box on the Miscellaneous options page, right?

Decoder: Everything on the MOD options page (including the Mixing options box), plus the settings for the Input and archive plugins on Plugins->Input options page, right?

Do I have the above correct?

I don't see Options->Playlist->List Advancing options saved anywhere - are they? For my scheme to work, I need to toggle Random Order on and off for when I switch from the Big Mix radio list to an album and back.

I know this is probably not something that will happen, but it would be really nice if the saved settings were in a plain text file (like the .ini file format). That would allow me to easily see which settings are included or not when I choose the various settings sets. Plus I could tweak on the settings files without having to load the setting, delete the old setting, get all the settings the way I want, and re-saving them again. Just something to think about if the saved settings system ever gets revamped.  ;)

Dotpitch

  • Posts: 2871
Re: Resume Random Play after an Album Break?
« Reply #8 on: 22 Nov '14 - 22:33 »
Do I have the above correct?
Yes, you do.

I don't see Options->Playlist->List Advancing options saved anywhere - are they? For my scheme to work, I need to toggle Random Order on and off for when I switch from the Big Mix radio list to an album and back.
No, they are not part of the Saved Settings. But why would you want to toggle Random? As saga said, if you queue the album it will play in order. Toggling Random off would make XMPlay forget which tracks have already been played.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #9 on: 22 Nov '14 - 23:00 »
For my scheme to work, I need to toggle Random Order on and off for when I switch from the Big Mix radio list to an album and back.

Er, sorry, I think I'm confusing myself...  :-[  The queue plays in order regardless of the random play setting, so I don't think I need it in the saved settings.

Also, it looks like I don't need Reset on New Track at all, since on an album, I want it to keep adjusting the level as it goes through the tracks and finds something louder (Auto-Amp: Reduction), and then stay there. On the random play, it looks like Replaygain resets the level on each track based on the replaygain + pre-amp values regardless of whether Reset On New Track is set or not, right?

However, I notice Options->DSP->Amplification->Reset On New Track is *not* saved/restored with the saved settings. I would suggest this might be a bug/oversight since all the Amplification settings are advertised (in the manual) as being part of AMP, right?

But sadly, my scheme doesn't work after all...

I load up the Playlist (not the Queue) with all my random play tracks. When I hit play, the auto-load saved settings correctly loads the settings against the path where I keep all the "singles", and it happily random plays my radio station.

Then I can load up the tracks of an album into the Queue. When the current random play track ends, it starts play of the first queued album track with the auto-load settings correctly loaded against the default empty path, and happily plays the album in order.

The show-stopper is that when the Queue is done playing the album, it does not go back to the random play of the Playlist. It just stops playing altogether.

Bummer, I had hoped it would go back and resume random play of the remainder of the Playlist. I can manually hit play again, but then it reshuffles the entire Playlist instead of playing just the ones not played before the album was started.

Am I missing something, can I get the random Playlist to resume after the queue ends?

The other thing I notice is that when I load the album into the Queue, it is also added at the end of the Playlist. I really don't want that since I want the Playlist to only contain my single list, and I don't want the album tracks to become part of the random play Playlist. I can delete them manually if needed - is there a way to avoid that?

Thanks!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #10 on: 22 Nov '14 - 23:08 »
Also, it looks like I don't need Reset on New Track at all, since on an album, I want it to keep adjusting the level as it goes through the tracks and finds something louder (Auto-Amp: Reduction), and then stay there. On the random play, it looks like Replaygain resets the level on each track based on the replaygain + pre-amp values regardless of whether Reset On New Track is set or not, right?

However, I notice Options->DSP->Amplification->Reset On New Track is *not* saved/restored with the saved settings. I would suggest this might be a bug/oversight since all the Amplification settings are advertised (in the manual) as being part of AMP, right?

Yikes, now I'm really getting confused...

So, it looks like Replaygain *does* need Reset On New Track to set the level to replaygain + pre-amp. I was seeing the level change on a new song, but it was being set to 0.0 (the saved settings level) and Auto-Amp: Reduction kicked in to reduce it - it wasn't the replaygain + pre-amp level.

Not having that part of the saved settings does break my scheme also.


« Last Edit: 22 Nov '14 - 23:13 by Zzyzx »

Dotpitch

  • Posts: 2871
Re: Resume Random Play after an Album Break?
« Reply #11 on: 23 Nov '14 - 19:36 »
The show-stopper is that when the Queue is done playing the album, it does not go back to the random play of the Playlist. It just stops playing altogether.
I guess you have Options and stuff > Playlist > 'Stop at end of queue' ticked? Unticking it will have XMPlay continue playing.

The other thing I notice is that when I load the album into the Queue, it is also added at the end of the Playlist. I really don't want that since I want the Playlist to only contain my single list, and I don't want the album tracks to become part of the random play Playlist. I can delete them manually if needed - is there a way to avoid that?
XMPlay needs the tracks on the playlist to play them. What you could do is enable 'Remove after playing' (in the context menu of the Remove-button on the playlist) and mark all your singles with 'Don't auto-remove' (in the context menu of the playlist entry).

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #12 on: 24 Nov '14 - 00:02 »
First off, many thanks for the help! I know my questions may seem obvious for a power user like you guys, but it's taking me a bit to figure out all the settings and especially how they can combine together. But I really, really appreciate all the hard work everyone puts into XMPlay, and for helping people out, whether as a developer or a power user!

I guess you have Options and stuff > Playlist > 'Stop at end of queue' ticked? Unticking it will have XMPlay continue playing.

Yep, I did. Not any more... ;D

XMPlay needs the tracks on the playlist to play them. What you could do is enable 'Remove after playing' (in the context menu of the Remove-button on the playlist) and mark all your singles with 'Don't auto-remove' (in the context menu of the playlist entry).

That's brilliant! I didn't even realize there was a context menu on the Remove button. :-[ Works like a charm to keep the singles in the Playlist, and cleans the albums out as they play.

Those changes allow me to run the tracks exactly the way I want. I can normally have my "radio station" random playing all the singles, and when the mood strikes I can load up an album or two in the Queue, and then go back to the random play.

I can sort of work around not having Reset On New Track in the AMP saved settings by picking a saved level that 80-90% of the albums fall within, so they will play at a consistent level across the album tracks. For the 10-20% that might be louder, they would hit the Auto-Amp: Reduction to lower the level and then it would reset back up on the next track. But it shouldn't be much of an up and down volume change, maybe -0.5 to -1.5 except for the extremely loud albums.

The other down side is that there will 10-20% of the albums that are mastered at a real low level, so the standard level I choose will make them very quiet and not use the available bandwidth to keep the output level strong and clean. I can live with that, and consider myself fortunate I can do everything else I want.

Perhaps consider it a feature request to add Reset On New Track to the AMP saved settings - is there an official way to submit those? ;)


Dotpitch

  • Posts: 2871
Re: Resume Random Play after an Album Break?
« Reply #13 on: 24 Nov '14 - 06:40 »
First off, many thanks for the help!
You're welcome :). I'm glad XMPlay is the right player for you.

I didn't even realize there was a context menu on the Remove button. :-[
Better start right-clicking other buttons too then, just to see what happens ;). Pretty much every button has a context menu.

Perhaps consider it a feature request to add Reset On New Track to the AMP saved settings - is there an official way to submit those? ;)
Mentioning it in a thread is usually enough for Ian to think about it, so you just found the official way!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #14 on: 24 Nov '14 - 20:06 »
I didn't even realize there was a context menu on the Remove button. :-[

Better start right-clicking other buttons too then, just to see what happens ;). Pretty much every button has a context menu.

What I did was first select the default skin, so I could make sure I had all the buttons and everything.

Nothing like RTFM, so now I'm going back through the Illustrated Manual, section by section. I had kinda read through it a while ago, but I didn't know enough then to appreciate what all the features and options could be used for.

Yes, it was a pleasant surprise at all the functionality under the right-click menus on all the various buttons and controls - and that's just from reading the section on the Main Window!  ;D

And other really cool stuff, like nested conditional formatting of track info: %?1{%1|%cut{%0|12|~}} (%8)

Now if only there was an option to cut the rightmost n characters instead of leftmost (still using the Omit Filename Extension switch of course), since with a file naming convention like "Artist - Album - ## - Title.wav" it's the rightmost that are most significant for identifying the track if I only have 12 characters on the little Queue panel. Maybe: %cut{%0|12r|~} - and it puts the ~ at the left instead of the right. ;)

BTW, is the PDF Illustrated manual the same as the on-line version? It's dated the same (2011-07-15), so I'm assuming so.

Cheers!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #15 on: 25 Nov '14 - 01:06 »
I think I either found a little bug in all this, or perhaps there's another related setting I have wrong?

XMPlay 3.8.0.26

My settings:

Under a saved setting for the empty path (intended to catch album tracks):

Amplification (AMP) settings:
Level: -6.5
Reset On New Track: checked  ...And Subsong: unchecked  (wish I could save Reset On New Track: unchecked with the settings)
Auto-Amp: Reduction
Replaygain: Off  Pre-Amp: -5.5
Limit According To Peak Level: unchecked

Under a saved setting for a specific separate folder containing my "singles" tracks (intended for "radio station" random play):

Amplification (AMP) settings:
Level: 0.0
Reset On New Track: checked  ...And Subsong: unchecked
Auto-Amp: Reduction
Replaygain: Track  Pre-Amp: -5.5
Limit According To Peak Level: unchecked

How to reproduce:

1. Load up the Playlist with a bunch of tracks from the "singles" folder. They are all set to Don't Auto-Remove, if that matters.
2. Start playing (I just hit the Play/Pause button on the main window). It randoms picks the first track and starts.
3. The level is correctly set to replaygain tag + pre-amp.
4. Keep playing a few more tracks, they all play with the level set correctly per replaygain.
5. Add a few tracks to the Queue from the albums folder tree (not the singles folder).
6. After the current random play track ends, it begins playing the first Queue track.
7. The level is correctly set to -6.5.
8. The Queue tracks play. If Auto-Amp: Reduction kicks in, the level is set back to -6.5 for the next track (although I'd prefer it wasn't).
9. The Queue tracks are not set for Don't Auto-Remove, and Remove After Playing is set for the Playlist, so they are correctly removed after playing.
10. After the last Queue track ends, it resumes random playing out of the Playlist.
11. For the first random play track, the level is incorrectly set to 0.0. For example, the REPLAYGAIN_TRACK_GAIN tag was -2.04, so the level should have been -7.54.
12. After the first random play track finishes, it correctly sets the level to replaygain + pre-amp for the second and all following tracks.

More info:  For that incorrectly set track in step 11, it loaded all the correct saved settings for the "singles" path, including Replaygain: Track and Pre-Amp: -5.5, but it did not set the level according to those. It seems to act as if it's not using replaygain, only the saved level of 0.0, for this first track. It makes the resume back the Playlist a little loud and jarring!  ;)

If you need any more info, or screen shots or anything, please let me know. I can reproduce this behavior every time.

Did I miss some setting to re-trigger replaygain on the random Playlist resume after the Queue tracks, or is this a bug?

Thanks!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #16 on: 26 Nov '14 - 04:35 »
This might be related, or possibly "as designed":

I'm playing a replaygain track (with the "singles" settings from my last post).

I hit Stop (not pause) because I want to change and update the saved settings. I only press Play/Pause once, so I just stop the track, not unload it. XMPlay sets the track position back to the start of the track.

This particular track is sitting at a level of -7.9 (replaygain tag of -2.4 + pre-amp of -5.5).

I go into the DSP settings and change the pre-amp to -6.0. I also set the level to 0.0 to have that in the saved settings (I don't know if the level even matters in a saved settings with Replaygain: Track?). I Update and Save Settings.

Now I hit Play/Pause to start the track again. But the level stays at 0.0 rather than being set to -8.4. Is that a bug, or as designed since I manually set the level while the track was loaded?

I notice that with the DSP settings at Level: 0.0 and Pre-Amp: -6.0, if I click the up arrow on the pre-amp setting to change it to -5.9, the level then goes to -8.3, rather than sitting at 0.0, so that's why I thought it should calculate the level again when I hit Play/Pause - it seemed like it was trying to dynamically keep the level set to the current replaygain calculation.

Let me know if I explained that OK.

...And did I say XMPlay is really, really cool? Thanks for all the work making it available!

« Last Edit: 26 Nov '14 - 08:07 by Zzyzx »

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: Resume Random Play after an Album Break?
« Reply #17 on: 26 Nov '14 - 15:15 »
11. For the first random play track, the level is incorrectly set to 0.0. For example, the REPLAYGAIN_TRACK_GAIN tag was -2.04, so the level should have been -7.54.

I don't seem to be able to reproduce that here. Do the amp sliders in both the main XMPlay window and in the DSP options page show the incorrect level, and can you hear that it is at the incorrect level? Anyway, please try this latest build...

   www.un4seen.com/stuff/xmplay.exe

If you still get the problem with that, to help narrow it down, please exclude the queue/random/auto-remove stuff from the equation, eg. does it happen if you manually switch between tracks in the 2 paths? If it only happens when auto-advancing, do the tracks have the same sample format, ie. sample rate and channel count?

This might be related, or possibly "as designed":

I'm playing a replaygain track (with the "singles" settings from my last post).

I hit Stop (not pause) because I want to change and update the saved settings. I only press Play/Pause once, so I just stop the track, not unload it. XMPlay sets the track position back to the start of the track.

This particular track is sitting at a level of -7.9 (replaygain tag of -2.4 + pre-amp of -5.5).

I go into the DSP settings and change the pre-amp to -6.0. I also set the level to 0.0 to have that in the saved settings (I don't know if the level even matters in a saved settings with Replaygain: Track?). I Update and Save Settings.

Now I hit Play/Pause to start the track again. But the level stays at 0.0 rather than being set to -8.4. Is that a bug, or as designed since I manually set the level while the track was loaded?

Yep, that's as intended. If the amp slider has been moved away from the replaygain level, XMPlay won't automatically move it back (unless replaygain is re-enabled or the pre-amp is adjusted). You can right-click on the amp slider to reset it.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #18 on: 27 Nov '14 - 06:21 »
11. For the first random play track, the level is incorrectly set to 0.0. For example, the REPLAYGAIN_TRACK_GAIN tag was -2.04, so the level should have been -7.54.

I don't seem to be able to reproduce that here. Do the amp sliders in both the main XMPlay window and in the DSP options page show the incorrect level, and can you hear that it is at the incorrect level? Anyway, please try this latest build...

   www.un4seen.com/stuff/xmplay.exe

If you still get the problem with that, to help narrow it down, please exclude the queue/random/auto-remove stuff from the equation, eg. does it happen if you manually switch between tracks in the 2 paths? If it only happens when auto-advancing, do the tracks have the same sample format, ie. sample rate and channel count?

Yes, both amp sliders show the same (incorrect) level.

Yes, I can definitely hear the louder volume (very noticeable going up from -7.5 to 0.0).

I updated to the 3.8.0.27 build.

It still happens with the new build with everything set the same.

I have a bunch of things going on with my scheme - the Playlist/Queue switch, random play, auto-advance, replaygain, saved settings.

I am usually mixing some different formats (44.1/16 FLAC vs. 44.1/24 WAV, 96/24 WAV, 196/32 WAV, etc.). All the singles tracks are 44.1/16 FLAC (the random play Playlist is all this format), but the album tracks are all in WAV format of varying sample rates and bit depths (these go into the Queue). Everything is just 2 channel stereo.

And I also use short 2 second silence tracks in all the different sample rate/bit depth combinations to switch between formats, since the Xonar decoder needs about 250 ms to reset on a sample rate/bit depth change and that glitches the start of a song.

XMPlay seems to be pre-loading the next track 5.0 seconds before the end of the current track - is that because I have Output->Buffer set to 5.0 seconds?

It correctly pre-loads the short silence track 5.0 seconds ahead, but then it does not pre-load the next track (which is on the switch from the Queue to the Playlist). Or at least the Playlist pointer doesn't shift to that track after it starts playing the silence track. Maybe that's because it doesn't have 5.0 seconds worth of track time to pre-load? Is this a little bug? (But it's not the sole cause of the problem, see below.)

I'll need a little time to test all the combinations to see what works and doesn't work. We have a holiday in the U.S. over the next few days, so maybe I can get some testing done in between family gatherings.

I just tried one, which was simply inserting only 44.1/16 FLAC tracks in both the Playlist and the Queue which are all way more than 5.0 seconds long (so no format change and no short silence track). Still with random play on the Playlist and auto-advance. That didn't work, the level was still set to 0.0 for the first Playlist track.

But I'll take a step back as you ask and start with a simple manual play between the paths in just the Playlist and then add things from there.

Thanks!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #19 on: 29 Nov '14 - 06:25 »
Well, I was afraid it might take a lot of testing to find the combination that broke, but it failed on the first basic test.

Hopefully you can reproduce this, or if not we can find what's different in my configuration.

Note: For settings, [X] = checked; [ ] = unchecked; [value] = specific value

I started with two folders, containing only 44.1/16 FLAC files. The two folders are not under the same root folder (e.g., C:\Singles\ and C:\Albums\).

The singles folder (C:\Singles) has 44.1/16 FLAC files with replaygain tags.
This specific path has a Saved Settings entry, with the DSP settings:
DSP -> Amplification -> (Level): [+1.0]
DSP -> Amplification -> [X] Reset on new track ... and subsong [ ]  (this isn't saved)
DSP -> Amplification -> Auto-amp: [reduction]
DSP -> Amplification -> Replaygain: [track] pre-amp: [-5.5]
DSP -> Amplification -> [ ] Limit according to peak level

The albums folder (C:\Albums) has 44.1/16 FLAC files without any replaygain tags.
There is a Saved Setting entry for the default empty path intended to catch this folder, with the DSP settings:
DSP -> Amplification -> (Level): [-8.0]
DSP -> Amplification -> [X] Reset on new track ... and subsong [ ]  (this isn't saved)
DSP -> Amplification -> Auto-amp: [reduction]
DSP -> Amplification -> Replaygain: [off] pre-amp: [-5.5]
DSP -> Amplification -> [ ] Limit according to peak level

Other related settings are like this:
Playlist -> List advancing -> [ ] Auto-advance
Playlist -> List advancing -> [ ] Random order ... apply to play/next/previous controls [ ]
Playlist -> [ ] Remove after playing
Output -> Buffer: [5.000s]

I loaded the Playlist only (the Queue was not used at all), with 9 unique tracks (no repeats) in the order listed below, a mix of singles tracks and album tracks.

I manually started each track by double-clicking on the track, and then let it play to completion, then started the next track manually, and so on through the Playlist.

Here's the results:

Track 1, single, correctly loaded singles saved settings, correctly set level to replaygain + pre-amp
Track 2, album, correctly loaded album saved settings, correctly set level to -8.0
Track 3, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)
Track 4, single, correctly loaded singles saved settings, correctly set level to replaygain + pre-amp
Track 5, album, correctly loaded album saved settings, correctly set level to -8.0
Track 6, album, correctly loaded album saved settings, correctly set level to -8.0
Track 7, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)
Track 8, album, correctly loaded album saved settings, correctly set level to -8.0
Track 9, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)

It does not set the replaygain + pre-amp level when it switches from Replaygain: off to Replaygain: track. It sets it to 0.0, not the +1.0 level saved with the settings.

I believe this is just testing the loading of Saved Settings with everything else removed from the context, with the exception of the presence or lack of replaygain tags in the two folders.

I can reproduce this every time with any combination of tracks. It always and only fails on the Replaygain: off to Replaygain: track Saved Settings transition.

I'm going to stop here until I hear back what you want me to do next.

Please let me know if you want me to adjust this test in any way, or try different tests, or report any other settings I have, etc.

Many thanks for your help!

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: Resume Random Play after an Album Break?
« Reply #20 on: 1 Dec '14 - 16:43 »
I manually started each track by double-clicking on the track, and then let it play to completion, then started the next track manually, and so on through the Playlist.

Here's the results:

Track 1, single, correctly loaded singles saved settings, correctly set level to replaygain + pre-amp
Track 2, album, correctly loaded album saved settings, correctly set level to -8.0
Track 3, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)
Track 4, single, correctly loaded singles saved settings, correctly set level to replaygain + pre-amp
Track 5, album, correctly loaded album saved settings, correctly set level to -8.0
Track 6, album, correctly loaded album saved settings, correctly set level to -8.0
Track 7, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)
Track 8, album, correctly loaded album saved settings, correctly set level to -8.0
Track 9, single, correctly loaded singles saved settings, incorrectly set level to 0.0 (right click on level correctly sets to replaygain + pre-amp)

It does not set the replaygain + pre-amp level when it switches from Replaygain: off to Replaygain: track. It sets it to 0.0, not the +1.0 level saved with the settings.

I believe this is just testing the loading of Saved Settings with everything else removed from the context, with the exception of the presence or lack of replaygain tags in the two folders.

I can reproduce this every time with any combination of tracks. It always and only fails on the Replaygain: off to Replaygain: track Saved Settings transition.

Oh yes, I can reproduce that, thanks. Here's an update that should fix it...

   www.un4seen.com/stuff/xmplay.exe

Let me know if it still gives you trouble.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #21 on: 1 Dec '14 - 21:42 »
Oh yes, I can reproduce that, thanks. Here's an update that should fix it...

   www.un4seen.com/stuff/xmplay.exe

Let me know if it still gives you trouble.

Very cool, that seems to have fixed it!

I ran the same test as above with manual triggering, and it sets all the levels correctly.

I then added in Auto-advance, and it sets all the levels correctly.

I then added in Random order, and it sets all the levels correctly.

All of that is still just in the Playlist, without using the Queue.

When I get a chance this evening, I'll load up my full Playlist of singles and then insert an album into the Queue to test everything put back together.

I notice that when the same conditions hit that caused the error (Replaygain: off to Replaygain: track Saved Settings transition), I see the level pop up to 0.0 for a brief moment before being set to the correct level, so I guess that's your new code forcing it to be set correctly? ;)

Many, many thanks! I very much appreciate all the time and effort put into XMPlay, and especially your dedication to helping folks out and improving the software!

Not to push my good fortune, but if you're ever into the Saved Settings code, I'd love to have DSP -> Amplification -> Reset on new track added to the DSP set of saved settings, so I can turn that off for my album tracks and back on for my singles tracks. But it would still need to set all the settings when it loads a new saved settings, so having that off shouldn't override the initial set on load. Make sense?

Thanks again!

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #22 on: 2 Dec '14 - 00:15 »
When I get a chance this evening, I'll load up my full Playlist of singles and then insert an album into the Queue to test everything put back together.

So, I went for it all. I loaded up the Playlist with my big singles list, all 44.1/16 FLAC with replaygain tags.

I had Playlist -> List advancing -> Auto-advance and Random order turned on from the last test, and they are still on.

I turned back on Playlist -> Remove after playing, and set all the singles tracks to Don't auto-remove.

[Side question: Is there a way to save the Don't auto-remove setting for tracks, so that if I load a playlist it's already set for me?]

I have the same saved settings from my prior post - one setting to catch the singles in their folder with replaygain, and another to catch everything else in the default path with a fixed level.

I hit play, and my random play starts and continues, with the levels correctly set to replaygain + pre-amp (no surprise, that worked before).

I add to the Queue:

1. 44.1/24 WAV with 0:02 of silence (to trigger the decoder into 24 bit without hearing a little glitch at the start of the song)
2. An album with 6 tracks in 44.1/24 WAV
3. 44.1/16 WAV with 0:02 of silence (to trigger the decoder back to 16 bit)

The silence tracks have entries in the Playlist with Skip and Don't auto-remove set, so they stay there for later use, but don't play in the random selections. I just right click -> Queue them.

When the current random play replaygain track ends, the level is correctly set to the fixed level of -8.0, and all the album tracks in the Queue play in order.

One of the album tracks had Auto-amp: reduction kick in to reduce the level by -0.7, and then the level was set to -8.0 at the start of the next track.

The album tracks are correctly removed from the Playlist after play.

When the last track in the Queue (the 44.1/16 0:02 silence track) ends, the random play resumes with the level correctly set to replaygain + pre-amp for the next track. Yay!

So, that's the whole scheme, working as envisioned! Very, very cool!

I'm not all that familiar with other popular players like Foobar2000 or Media Monkey, etc., but I'm really impressed with all features baked into XMPlay without making it overly complex to work with (although I suppose my little scheme required a bunch of interrelated settings to get right). And the level of support on the XMPlay forums is awesome, without the elitist attitude found elsewhere.

Many thanks to Ian, saga and Dotpitch for helping me get this going!

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: Resume Random Play after an Album Break?
« Reply #23 on: 2 Dec '14 - 15:15 »
[Side question: Is there a way to save the Don't auto-remove setting for tracks, so that if I load a playlist it's already set for me?]

If you save the playlist in PLS format, the tracks' "Don't auto-remove" settings should be retained so that they're reapplied whenever you load that playlist.

Good to hear that the replaygain saved-setting stuff is working properly now.

Zzyzx

  • Posts: 55
Re: Resume Random Play after an Album Break?
« Reply #24 on: 2 Dec '14 - 17:01 »
If you save the playlist in PLS format, the tracks' "Don't auto-remove" settings should be retained so that they're reapplied whenever you load that playlist.

Ah, I didn't think to save the playlist from within XMPlay. I've been using OddGravity Playlist Creator to make my playlists in M3U format.

Cool, it saves the skip setting as well, so my silence tracks will load the way I want, too.  :)

Thanks!