Skip to main content

Topic: foo_skip: skip tracks that match a specified search query (Read 182367 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Grand Dizzy
  • [*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #250
Hi there,

I was looking for a plugin that would make songs more likely to play based on their rating. Foo_skip seems to be exactly what I was looking for and I was all ready to write the script!

Apart from one thing… how do you generate random numbers?

Without random numbers, it’s impossible to control the probability of songs playing. You can only either make them always play or never play, which is not very helpful for a 0–5 rating system like mine.

  • Grand Dizzy
  • [*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #251
To be specific. Here’s what I want:

Songs rated 0 = 2% probability of playing
Songs rated 1 = 25% probability of playing
Songs rated 2 = 50% probability of playing
Songs rated 3 = 75% probability of playing
Songs rated 4 = 100% probability of playing

Is this so unusual, wanting songs to play more based on how much I like them?

All I need is random number generation! Please, can anyone help?

  • Sandrine
  • [*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #252
May I request something that let's me skip certain tracks when foobar is in random mode, but listen to them when in album mode? There are tracks like prologues/epilogues/reprises which mess up the playlist in random but which still blend in nicely when listening to the complete album.
  • Last Edit: 27 January, 2013, 11:19:54 AM by Sandrine

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
foo_skip: skip tracks that match a specified search query
Reply #253
It seems you already can. Someone had requested support for querying playback mode earlier in the thread and it seems to be implemented. You can use something like (%playback_order% IS random OR %playback_order% IS "Shuffle (tracks)") AND %skip% IS 1.

  • Sandrine
  • [*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #254
Splendid, thanks!

  • Hancoque
  • [*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #255
Skipping tracks doesn't work for me (version 1.7.5). The tracks just play normally when their position is reached in the playlist. Here is a screenshot with my settings: http://bayimg.com/lAjaMAaEf

  • marc2003
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #256
if you have foo_playcount installed, the rating from that over-rides the tags in your files.

to get around that, you can change the query to....

Code: [Select]
"$meta(rating)" IS 1

  • Hancoque
  • [*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #257
Thanks, that solved the problem.

  • Speech
  • [*][*]
foo_skip: skip tracks that match a specified search query
Reply #258
Following your example, I adapted it to skip an arbitrary number of seconds at the beginning and at the end of the audio file.

Code: [Select]
-A;$div($add($mul($cut(%length%,$sub($strchr(%length%,:),1)),60),$right(%length%,$strchr(%length%,:)),-B),60):$mod($add($mul($cut(%length%,$sub($strchr(%length%,:),1)),60),$right(%length%,$strchr(%length%,:)),-B),60)-
Now it becomes difficult to follow this code, but, for your understanding, the formula is (min*60+sec-x)/60 : (min*60+sec-x) mod 60
It works for durations shorter than 1 hour, otherwise you have to include the hours in the calculation.

Adapt it to your needs as follows:
A is the duration you want to skip at the beginning. Format in minutes (ex. "0:25" without the quotes).
B is the duration you want to skip at the end. Format in seconds (ex. "29" without the quotes)

A useful Tip for users of this component: I often listen to full length DJ Tracks which usually have a long intros and outros for syncing mixing and transitions. When i listen to such tracks i normally want to skip the first and the last Minute of the track.

Setting the Skip Tag for the first Minute is no problem with this component. Setting the last Minute is the trickier Part because you have to calculate the Time one Minute (or whatever you want to skip)

i solved this with the "Automatically fill values..." Tool in the Tag editor Window.

i chose source -> Other: and used this script

Code: [Select]
-1:00;$sub($cut(%length%,$sub($strchr(%length%,:),1)),1):$right(%length%,$strchr(%length%,:))-

Pattern is then the Tag Name

Code: [Select]
%skip%


With this examples foo_skip skips the first and last minute of each chosen (tagged) track

  • hgodzillay
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #259
Hi,

i installed skiptracks component and so far my query is only:
Code: [Select]
%rating% IS 3 OR %rating% IS 2


i would like to add :
Code: [Select]
OR %tempo% < 110

but i don't know if that's the right way to write it because it doesn't work .. any help please ? (i have BPM analysis and tempo values on all my tracks)

i have 2 another questions maybe you have an idea.

1 - i would like to be able to change the comments of a track simply on clicking on the comment's column and entering text. for the moment i have to rightclic / propreties / enter infos ..

2 - when my foobar is playing a random track from a selection of let say 200 i would like the window to actually scroll to that track so i can see all the datas and edit them. for the moment i have to manually scroll to search for it.
  • Last Edit: 24 February, 2013, 10:28:10 AM by hgodzillay

  • Chibicon
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #260
To be specific. Here’s what I want:

Songs rated 0 = 2% probability of playing
Songs rated 1 = 25% probability of playing
Songs rated 2 = 50% probability of playing
Songs rated 3 = 75% probability of playing
Songs rated 4 = 100% probability of playing

Is this so unusual, wanting songs to play more based on how much I like them?

All I need is random number generation! Please, can anyone help?


Is this possible? Because it would be just what I need.

  • marc2003
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #261
@hgodzillay. use LESS. full documentation here: http://wiki.hydrogenaudio.org/index.php?ti...00:Query_syntax

and you should start a new thread for your other questions.

@Chibicon, i don't think so. what you're asking is beyond the scope of this plugin.

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
foo_skip: skip tracks that match a specified search query
Reply #262
Actually the probability skipping is possible since January.
Note that with foo_playcount component you can't have rating 0 so this example skip query uses $meta check with it:
("$meta(rating)" IS 0 AND "$mod($rand(),100)" GREATER 1) OR (%rating% IS 1 AND "$mod($rand(),100)" GREATER 24) OR (%rating% IS 2 AND "$mod($rand(),100)" GREATER 49) OR (%rating% IS 3 AND "$mod($rand(),100)" GREATER 74)

  • hgodzillay
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #263
marc2003 thx

  • Chibicon
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #264
Actually the probability skipping is possible since January.
Note that with foo_playcount component you can't have rating 0 so this example skip query uses $meta check with it:
("$meta(rating)" IS 0 AND "$mod($rand(),100)" GREATER 1) OR (%rating% IS 1 AND "$mod($rand(),100)" GREATER 24) OR (%rating% IS 2 AND "$mod($rand(),100)" GREATER 49) OR (%rating% IS 3 AND "$mod($rand(),100)" GREATER 74)


Just place this in the skip track query?

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
foo_skip: skip tracks that match a specified search query
Reply #265
Yes. Though if you use Playback Statistics component I suggest removing the "("$meta(rating)" IS 0 AND "$mod($rand(),100)" GREATER 1) OR " part.

  • hgodzillay
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #266
i can get the playback to skip 0 and 2 rating by using

Code: [Select]
%rating% IS 2 OR %rating% IS 0


but when i try to add something to skip tracks below 112 BPM it doesn't work with

Code: [Select]
%rating% IS 2 OR %rating% IS 0 OR %tempo% LESS 112

it skips every thing.

i have a tempo column in foobar that is felt by BPM Analysis is that the right way to do ?

ok my last question that is way beyond my abilities :
i want to play tracks in this order matching these ratings :
ONE 5 rating track then TWO 4 rating track then ONE 3 rating track then back to ONE 5 rating track and so one .. could you give me the code for that  ?


  • marc2003
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #267
is %tempo% present in every single file? if not, you might want to do something like this.

Code: [Select]
%rating% IS 2 OR %rating% IS 0 OR (%tempo% PRESENT AND %tempo% LESS 112)


i'm not even going to attempt to say anything about your 2nd point. 
  • Last Edit: 01 March, 2013, 04:15:29 PM by marc2003

  • hgodzillay
  • [*]
foo_skip: skip tracks that match a specified search query
Reply #268
is %tempo% present in every single file? if not, you might want to do something like this.

Code: [Select]
%rating% IS 2 OR %rating% IS 0 OR (%tempo% PRESENT AND %tempo% LESS 112)


i'm not even going to attempt to say anything about your 2nd point. 



haha #1 works fine thx for help ! but caman at least tell me why #2 is not possible ?

  • Speech
  • [*][*]
foo_skip: skip tracks that match a specified search query
Reply #269
A useful Tip for users of this component: I often listen to full length DJ Tracks which usually have a long intros and outros for syncing mixing and transitions. When i listen to such tracks i normally want to skip the first and the last Minute of the track.

Setting the Skip Tag for the first Minute is no problem with this component. Setting the last Minute is the trickier Part because you have to calculate the Time one Minute (or whatever you want to skip)

i solved this with the "Automatically fill values..." Tool in the Tag editor Window.

i chose source -> Other: and used this script

Code: [Select]
-1:00;$sub($cut(%length%,$sub($strchr(%length%,:),1)),1):$right(%length%,$strchr(%length%,:))-

Pattern is then the Tag Name

Code: [Select]
%skip%


With this examples foo_skip skips the first and last minute of each chosen (tagged) track

*Bug correction for tracks longer than 10:00 and simplification of my above post*

Following your example, I adapted your code to skip an arbitrary number of seconds at the beginning and at the end of the audio file.

A is the duration you want to skip at the beginning. Format in minutes (example: 2:30)
B is the duration you want to skip at the end. Format in seconds (example: 151)
Code: [Select]
-A;$div($add($mul($cut(%length%,$sub($strchr(%length%,:),1)),60),$right(%length%,2),-B),60):$mod($add($mul($cut(%length%,$sub($strchr(%length%,:),1)),60),$right(%length%,2),-B),60)-
Now it becomes difficult to follow this code, but, for your understanding, the formula is (min*60+sec-B)/60 : (min*60+sec-B) mod 60
It works for durations shorter than 1 hour, otherwise you have to include the hours in the calculation.

  • marc2003
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #270
%length_seconds% might make your life easier.

  • EpicForever
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #271
I noticed that this component works bit slowly in some scenarios. When foobar is in Shuffle mode and tries to open track referenced by .cue file from mp3, then I can hear less than half of second of sound before it is skipped. This doesn't occur for normal mp3 files (not .cue referenced).

My skip query is simple I think: "%keywords% HAS transcode" . It is used to omit playing of MP3 files when FLAC version of such file exists. Such tracks are manually tagged by me in custom, multipurpose tag field named KEYWORDS. It can contain several words, separated with simple comma.

I recalled other problematic thing - it skips even files from playback queue... Just lets them play for less than half of second and them skips them... I don't like it. Couldn't it be configured?
  • Last Edit: 23 March, 2013, 03:10:13 PM by EpicForever

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
foo_skip: skip tracks that match a specified search query
Reply #272
The component works as fast as it can. Playback notifications don't come from the core in real time, but there is the DSP part that should deal with that. Do you have it enabled?

  • sollniss
  • [*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #273
To be specific. Here’s what I want:

Songs rated 0 = 2% probability of playing
Songs rated 1 = 25% probability of playing
Songs rated 2 = 50% probability of playing
Songs rated 3 = 75% probability of playing
Songs rated 4 = 100% probability of playing

Is this so unusual, wanting songs to play more based on how much I like them?

All I need is random number generation! Please, can anyone help?


Using the Dynamic fields component you can generate a random number from 0 to 100 that changes on a daily basis like this:
Code: [Select]
$mod($mod(%length_samples%,$date_diff(2010-11-12)),100)


I'm not aware of a tag that changes constantly that doesn't depend on the song. You could take the milisecond part of %current date% if there was such a tag, or the crc32 of %next song in playlist%.
  • Last Edit: 23 March, 2013, 10:51:54 PM by sollniss
The very act of observing, influences what happens.

  • EpicForever
  • [*][*][*][*][*]
foo_skip: skip tracks that match a specified search query
Reply #274
The component works as fast as it can. Playback notifications don't come from the core in real time, but there is the DSP part that should deal with that. Do you have it enabled?


Yes. I use "Dynamic DSP", "Skip Silence", often "Convert 5.1 to stereo", "Convert mono to stereo", and rarely, but it's present in DSP chain nearly all the time, "Playback Rate Shift" from mudlord's "foo_dsp_effect".
If the speed of skipping can not be "corrected", then it is OK, I can accept it. But it will be nice if skipping tracks from playback queue could be resolved... I mean it could be done like it was with "manually selected tracks" - just one checkbox.