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: Alternate lists and trim songs questions (Read 2292 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Alternate lists and trim songs questions

Hello,

I have used foobar for a while as a simple (and satisfied) user. I'd have two questions to improve my foobar experiment :

1 - Alternative lists display
Considering for instance 3 different playlists, each one comprised of flac songs from 3 different folders on the hard disk (let's say a classical songs folder, a jazz songs folder and a pop songs folder).
How to play alternately one song of each list (play a classical one then a jazz one then a pop one and so on to the end of the lists) ?

2 - Trim songs
 2.1 - How to trim the few ending silent seconds of a song if there is ?
 2.2 - How to trim all songs after 3 min playing if they are longer ?
I mean trimming on display, not cutting the files themselves

I found a component (foo_skip) which could answer (?) question 2 according to its very brief documentation but didn't understand how to manage it.

Thanks a lot for your help

Re: Alternate lists and trim songs questions

Reply #1
Quote
2.1 - How to trim the few ending silent seconds of a song if there is ?
Lets say you have a track with length 4:28. Tag that specific file with a skip tag (SKIP) with this value:
Code: [Select]
03:47.00
Anythig from 3:47 on will be skipped. You have to manually tag tracks with silence.

If you use negative values, it's the beginning the section which will be skipped (thus starting at that point):
Code: [Select]
-00:47.00
In Playlist-Tools-SMP there is a handy utility to automate that tag creation in menus or buttons and evaluate dynamically if you are adding a tag to skip the beginning or the end (according to current playing position and total track length). (check my sig) If you are tagging tons of files while listening them, its a lifesaver. Otherwise do it manually.

Quote
2.2 - How to trim all songs after 3 min playing if they are longer ?
Not sure if that's possible with just the component. There is a config which allows to skip tracks according to a query, but it would skip the entire track in that case, not after 3 min of playing. You could do it, though, via SMP scripts.

Quote
1 - Alternative lists display
There is no native way as far as I know, nor with components (*). Playlist-Tools-SMP has a "similar" feature which allows you to create a playlist using other playlists as sources (pools) (*). So you could send tracks from those 3 playlists into another one and play from it. Picking method is configurable,  along final size, query filtering and final sorting. The only thing missing to do what you want is that specific final sorting method, alternating tracks from playlist A, B and C. I plan to add that at some point, no ETA. At the current release, you may sort the final playlist only by using a TF expression (**).

(*) There is a random pools component, but... 1. is pretty limited to an specific use case. 2. it only uses queries from library, no other playlists as sources.
(**) There would be another way, using the scatter tags feature (no 2 consecutive tracks with same X tag) of the script after playlist creation. I have not implemented it for a group of tags (all genre values), just for specific values ('instrumental'), but it should be easy to tweak it though. Again no ETA

Re: Alternate lists and trim songs questions

Reply #2
Thank you for the answers, regor.

- For 2.2, I created the tag "SKIP" on a songs playlist and gave it the value "00:03:00" on batch mode. It works. However I'd rather not take action on files (operation to do for each new song added in the playlist...)

- For 2.1, No way I listen all songs, evaluate the seconds of silence for each, modify it, etc. It's a pity because some other audio players do automatically what I asked for, that means it would be possible to implement in foobar or in a component...

- For 1, I understood it was not possible.

Thanks again

Re: Alternate lists and trim songs questions

Reply #3
1 - Alternative lists display

You can do it with this component https://www.foobar2000.org/components/view/foo_scheduler
Add a new Action list - Choose a name , then right click on it, Add action - Wait until N tracks played (in your case, it's 1) , then you add another acton, Change playlist (you choose your settings)

Then in Event list : add player event - on new track
Right click on this created event - assign action list (you choose the name of the action created)

You can also remove the played songs from the playlists, using this https://www.foobar2000.org/components/view/foo_playlist_attributes


Re: Alternate lists and trim songs questions

Reply #4
2 - Trim songs
 2.1 - How to trim the few ending silent seconds of a song if there is ?
Do you mean something like Skip Silence DSP?
(Preferences > Playback > DSP Manager > add Skip Silence and '...' to configure)

Quote
2.2 - How to trim all songs after 3 min playing if they are longer ?
Perhaps foo_preview ?
(Preferences > Playback > Preview > Start from 0, Length 180)
(Enable in Playback menu > Preview mode)


^ By the way it downloads as .7z file, you'd have to extract it with a 7zip supported archiver and drag the .DLL to Preferences > Components to install.

Re: Alternate lists and trim songs questions

Reply #5
Quote
- For 2.1, No way I listen all songs, evaluate the seconds of silence for each, modify it, etc. It's a pity because some other audio players do automatically what I asked for, that means it would be possible to implement in foobar or in a component...
What anamorphic said works too, but I understood you were meaning "non real" silence at specific places (end/start). If you find fine removing any section below a threshold the DSP approach will work fine. Note Skip silence removes silence at ANY place of the track, that includes even the middle... and that's why I did not recommend it.

I prefer adding tags while I listen to music from time to time (obviously I would never listen 1000 songs on batch just for tagging them hahahah). You may also cut the spoken chit chat at live tracks this way.

I think Gap Killer cuts silence only at the extremes of the tracks, that may work for you:
https://foobar.hyv.fi/?changes=foo_dsp_nogaps

Quote
- For 2.2, I created the tag "SKIP" on a songs playlist and gave it the value "00:03:00" on batch mode. It works. However I'd rather not take action on files (operation to do for each new song added in the playlist...)
You may use the DSP approach or m-tags or external tags to add tags to database instead of original files.

1- It's possible but simple there is not an easy way to do it. What Koshingg said works, although it requires some more steps:
X
Note you may need to expand it to 3 pls and adjust the pls names to yours. Also... you will need to always start the playback at the last playlist on those steps (in my example Library Viewer), to then play the other 2 and finally complete the cycle.

You have to call the macro manually too when being on that playlist. It will use the currently selected tracks on the playlist, meaning... that if you selected other item than the first one in any of the 3 playlists, it will start from there when switching (it may lead to wrong behavior if the 3 pls have different size, etc.).

Having in mind those limits (fixed play order, fixed starting playlist, you have to recreate the actions everytime you change a playlist or you want others, etc.), that's why I prefer the pool approach. But it works, yep.

 

Re: Alternate lists and trim songs questions

Reply #6
Btw just updated Playlist-Tools-SMP's pools feature with the intercalation method, was easier than expected without breaking other things.  I created an example pool which adds a rate 3, then rate 4 and then rate 5 track. You may use your 3 different playlists as source, queries or whatever you want. So (1) should be covered now without the problems of switching playlists method.
Spoiler (click to show/hide)

As a bonus I created a preset 'intercalate_playlists.json' which can be loaded to intercalate 3 playlists (edit the json file with your desired names).

Spoiler (click to show/hide)

In this example I used Playlist A, B, ... which contain rate 3, 4 & 5 tracks, thus resulting in the same result than the query approach. (there are more 5 rated tracks at the end because I configure the pool to get more of those).

Will update the repo on a few hours.

Re: Alternate lists and trim songs questions

Reply #7
Thank you Regor, Anamorphic and Koshingg.

For now I have tried foo_preview as proposed by Anamorphic for 2.2. That could do the job, but one disadvantage is that it cuts suddendly the sound at the given value before going to the next track (I mean there is no more fading between two tracks).

I will examine and test your others suggestions.

Thanks