Old 29th March 2013, 14:16   #1
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Need Help With A Smart View

I created smart views for many genres of music to help prevent hearing the same songs over and over every day when I randomize my playlists. I am having issues that I can't seem to figure out.

Here is my advanced smart view (that does not work correctly):

genre = "Hip-Hop" AND (lastplay >= [30 days ago] or lastplay isempty)

This appears logically correct, but Winamp is including music that has been played less than thirty days ago.

If I get rid of the OR, things work as they should in all test cases:

genre = "Hip-Hop" AND lastplay >= [30 days ago]

genre = "Hip-Hop" AND lastplay isempty

I need to combine lastplay isempty test with the >= 30 days ago test, which is why I need to use OR.

Help please?
Jamil is offline   Reply With Quote
Old 29th March 2013, 15:04   #2
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Hi Jamil,

Have you tried using 3 filters and using "and" between the last two instead of "or"?

genre = "specific genre"
AND
played last = "is empty"
AND
played last => "30 days"

This should list files of the specified genre that have not been played and the files of the specified genre last played 30 or more days ago. Using "or" between the last 2 filters will tell Winamp to list files of the specified genre that do not fall in the other 2 groups, which is what you are seeing. What other result are you trying to achieve?

However, I don't see the played last "=>" option. What construct are you using to achieve this filter?

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 29th March 2013, 16:30   #3
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Hi, Aminifu.

I just tried this, and it does not work. It shows nothing at all. It is not possible for lastplay to both be empty and >= [30 days ago].

>= [30 days ago] was what the query builder entered automatically. I simply copied what Winamp created followed by making changes.
Jamil is offline   Reply With Quote
Old 29th March 2013, 16:58   #4
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by Jamil View Post
Hi, Aminifu.

I just tried this, and it does not work. It shows nothing at all. It is not possible for lastplay to both be empty and >= [30 days ago].
Sorry (that teaches me not to suggest something without trying it)! Ok, try this (works on my system);

"Genre" - "Equals" - 'a specific genre'
AND
"Played Last" - "Before" - "29 days ago"
OR
"Played Last" - "Is empty"

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 29th March 2013, 18:53   #5
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
This is not working. I am seeing music that is not in the genre I set. I believe the problem is order of evaluation. This was why I tried to force the correct order with parenthesis.
Jamil is offline   Reply With Quote
Old 30th March 2013, 02:31   #6
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by Jamil View Post
This is not working. I am seeing music that is not in the genre I set. I believe the problem is order of evaluation. This was why I tried to force the correct order with parenthesis.
I don't understand how that could happen if the first filter is genre. I suggest you check your tags with an app like MP3Tag or TagScanner. Maybe you have discovered a bug in the processing.

I also suggest you select all the files in your library and force a reread of the metadata (use the right click context menu). You may have some records with old data in them.

I tried rearranging the filters on my system and it still worked.

"Played Last" - "Is empty"
OR
"Played Last" - "Before" - "29 days ago"
AND
"Genre" - "Equals" - 'a specific genre'

You should also try "Contains" instead of "Equals" in the genre filter, in case some of the genre tags don't have the exact word or phrase.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 12:42   #7
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
I'll post some screenshots so you can see how this is not working. It's not a case of genre tags being similar to another. It's totally broken.

My library was newly created without a single file changed.
Jamil is offline   Reply With Quote
Old 30th March 2013, 13:01   #8
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Hi Jamil,

Also attached a copy of your Winamp configuration. You can create one with the Winamp Info Tool (link below).

http://forums.winamp.com/showthread.php?t=328932

Maybe the Query Builder is broken. Try the simple mode and enter the filters in the order I posted in #6 above.

Have you tried the lastest Winamp beta version (link below)?

http://forums.winamp.com/showthread.php?t=356750

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 13:35   #9
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Here's the info tool report. It showed me an error about unable to retrieve system components or something.

Since the smart play list works as it should as two separate ones without the OR (as I stated above), this seems like an defect.

<<<<< Winamp Info Report >>>>>

File was generated by Winamp Info Tool v4.0.0 RC3 on: 03/30/2013 at: 9:26:16
Copyright © 2011-2013 by Christoph Grether


<<<<< General Information >>>>>

Installed Windows Version: Windows 7 Enterprise Service Pack 1 (64 Bit)
Installed DirectX Version: DirectX 11
Installed Internet Explorer Version: 8.0.7601.17514 (64-Bit)
Installed Winamp Version: 5.6.3.3235
Installed Winamp Backup Tool Version: Winamp Backup Tool is not present on the system
Installed Sonic Burning Engine Version: 4.28.6.0
Installed Gracenote CDDB/MusicID Version: 2.6.206.205
Winamp Installation Type: Winamp Pro Version
Currently Used Skin: Bento
Currently Used Language Pack: None
Currently Used Output Plug-in: Nullsoft DirectSound Output [out_ds.dll]
Currently Used Visualization Plug-in: MilkDrop 2 [vis_milk2.dll]
Currently Used DSP Plug-in: None
Currently Used Encoding Plug-in: Nullsoft MP3 Encoder [enc_lame.dll]
Currently Used File Type Icon Library: None
Currently Used Tray Control Icon Pack: None


<<<<< Winamp Directories >>>>>

Winamp Installation Path: C:\Program Files (x86)\Winamp
Winamp Configuration Path: C:\Users\user_a\AppData\Roaming\Winamp
Winamp Configuration File Path: C:\Users\user_a\AppData\Roaming\Winamp\winamp.ini
Media Library Configuration File Path: C:\Users\user_a\AppData\Roaming\Winamp\Plugins\gen_ml.ini
Winamp Backup Path: No Backup directory available
Winamp Plug-in Path: C:\Program Files (x86)\Winamp\Plugins
Winamp System Components Path: C:\Program Files (x86)\Winamp\System
Winamp Skins Path: C:\Program Files (x86)\Winamp\Skins
Winamp Language Pack Path: No Language Pack directory available
Winamp Visualization Plug-in Path: C:\Program Files (x86)\Winamp\Plugins
Winamp DSP Plug-in Path: C:\Program Files (x86)\Winamp\Plugins
Winamp File Type Icon Library Path: No File Type Icon directory available
Winamp Tray Control Icon Pack Path: No Tray Control Icon directory available
MilkDrop Presets Path: C:\Program Files (x86)\Winamp\Plugins\Milkdrop2\presets
AVS Presets Path: C:\Program Files (x86)\Winamp\Plugins\avs


<<<<< Winamp Playlist Settings >>>>>

Repeat Mode: Repeat Mode and Manual Playlist Advance disabled (Repeat None)
Shuffle Mode: Disabled
Currently used Playlist Font: Arial
Currently used Playlist Font Size: 11 Pixels
Currently used Playlist Text Direction: Force left-to-right order
Show Numbers in Playlist: Enabled
Metadata Reading: Metadata will be read, when file(s) are played or viewed in Playlist Editor (recommenced setting)
Currently used ATF String: [%artist% - ]$if2(%title%,$filepart(%filename%))


<<<<< Winamp Playback Settings >>>>>

Playback Thread Priority: Highest (Default)
Output Bit Depth: 16 Bit Output
Surround Sound: Enabled
Dithering: Enabled
Forced Mono Output: Disabled
ReplayGain Support: Disabled
Equalizer: Disabled
Crossfading at start: Disabled
Crossfading on first start: Disabled
Crossfading at end of song: Disabled
Crossfading on Pause/Stop: Enabled (Duration: 333 ms)
Crossfading On Seek: Enabled (Duration: 333 ms)
Remove silence at the beginning/end of track: Disabled


<<<<< Registered File Extensions >>>>>

APE; FLAC; M3U


<<<<< Installed Winamp Input Plug-ins >>>>>

in_APE.dll [Size: 419 KB]
in_avi.dll [Size: 67 KB]
in_cdda.dll [Size: 100 KB]
in_dshow.dll [Size: 70 KB]
in_flac.dll [Size: 60 KB]
in_flv.dll [Size: 42 KB]
in_linein.dll [Size: 7 KB]
in_midi.dll [Size: 107 KB]
in_mkv.dll [Size: 48 KB]
in_mod.dll [Size: 161 KB]
in_mp3.dll [Size: 284 KB]
in_mp4.dll [Size: 51 KB]
in_nsv.dll [Size: 73 KB]
in_swf.dll [Size: 23 KB]
in_vorbis.dll [Size: 247 KB]
in_wave.dll [Size: 16 KB]
in_wm.dll [Size: 306 KB]


<<<<< Installed Winamp Output Plug-ins >>>>>

out_disk.dll [Size: 22 KB]
out_ds.dll [Size: 51 KB]
out_wave.dll [Size: 18 KB]


<<<<< Installed Winamp Vizualization Plug-ins >>>>>

vis_avs.dll [Size: 396 KB]
vis_milk2.dll [Size: 426 KB]
vis_nsfs.dll [Size: 34 KB]


<<<<< Installed Winamp DSP/Effects Plug-ins >>>>>

dsp_sps.dll [Size: 39 KB]


<<<<< Installed Winamp General Purpose Plug-ins >>>>>

gen_ff.dll [Size: 1697 KB]
gen_hotkeys.dll [Size: 27 KB]
gen_jumpex.dll [Size: 181 KB]
gen_ml.dll [Size: 311 KB]
gen_mwblock.dll [Size: 6 KB]
gen_orgler.dll [Size: 56 KB]
gen_tray.dll [Size: 25 KB]


<<<<< Installed Winamp Media Library Plug-ins >>>>>

ml_addons.dll [Size: 24 KB]
ml_autotag.dll [Size: 28 KB]
ml_bookmarks.dll [Size: 28 KB]
ml_devices.dll [Size: 244 KB]
ml_disc.dll [Size: 197 KB]
ml_downloads.dll [Size: 56 KB]
ml_history.dll [Size: 51 KB]
ml_impex.dll [Size: 56 KB]
ml_local.dll [Size: 288 KB]
ml_nowplaying.dll [Size: 22 KB]
ml_online.dll [Size: 122 KB]
ml_playlists.dll [Size: 82 KB]
ml_plg.dll [Size: 81 KB]
ml_pmp.dll [Size: 235 KB]
ml_rg.dll [Size: 33 KB]
ml_transcode.dll [Size: 31 KB]
ml_wire.dll [Size: 115 KB]


<<<<< Installed Winamp Portable Media Player Plug-ins >>>>>

pmp_activesync.dll [Size: 28 KB]
pmp_android.dll [Size: 59 KB]
pmp_ipod.dll [Size: 166 KB]
pmp_njb.dll [Size: 20 KB]
pmp_p4s.dll [Size: 115 KB]
pmp_usb.dll [Size: 52 KB]
pmp_wifi.dll [Size: 111 KB]


<<<<< Installed Winamp Encoder Plug-ins >>>>>

enc_fhgaac.dll [Size: 949 KB]
enc_flac.dll [Size: 17 KB]
enc_lame.dll [Size: 17 KB]
enc_vorbis.dll [Size: 1604 KB]
enc_wav.dll [Size: 13 KB]
enc_wma.dll [Size: 21 KB]



<<<<< Installed Winamp Language Packs (.wlz Extension) >>>>>

None installed



<<<<< Installed Additional Language Files (.lng Extension) >>>>>

None installed


<<<<< Installed Winamp System Components >>>>>

aacdec.w5s [Size: 900 KB]
adpcm.w5s [Size: 15 KB]
albumart.w5s [Size: 23 KB]
auth.w5s [Size: 170 KB]
bmp.w5s [Size: 19 KB]
devices.w5s [Size: 43 KB]
dlmgr.w5s [Size: 16 KB]
filereader.w5s [Size: 14 KB]
gif.w5s [Size: 19 KB]
gracenote.w5s [Size: 16 KB]
h264.w5s [Size: 641 KB]
jnetlib.w5s [Size: 609 KB]
jpeg.w5s [Size: 151 KB]
mp4v.w5s [Size: 197 KB]
ombrowser.w5s [Size: 294 KB]
pcm.w5s [Size: 12 KB]
playlist.w5s [Size: 82 KB]
png.w5s [Size: 85 KB]
primo.w5s [Size: 13 KB]
tagz.w5s [Size: 21 KB]
theora.w5s [Size: 52 KB]
timer.w5s [Size: 34 KB]
vlb.w5s [Size: 121 KB]
vp6.w5s [Size: 177 KB]
vp8.w5s [Size: 229 KB]
xml.w5s [Size: 89 KB]


<<<<< Installed Winamp System Components >>>>>

None installed

<<<<< Installed DLL Files in Winamp's Root Dir >>>>>

burnlib.dll [Size: 81 KB]
elevatorps.dll [Size: 45 KB]
libFLAC.dll [Size: 133 KB]
libmp4v2.dll [Size: 176 KB]
libsndfile.dll [Size: 247 KB]
nde.dll [Size: 77 KB]
nsutil.dll [Size: 407 KB]
pxsdkpls.DLL [Size: 194 KB]
tataki.dll [Size: 82 KB]
zlib.dll [Size: 63 KB]


<<<<< Installed Gracenote System Files >>>>>

CDDBControlWinamp.dll [Size: 1577 KB]
CddbMusicIDWinamp.dll [Size: 905 KB]
CddbPlaylist2Winamp.dll [Size: 1101 KB]
CDDBUIWinamp.dll [Size: 1017 KB]
CddbWOManagerWinamp.dll [Size: 381 KB]
Cddbx1.dll [Size: 221 KB]
Cddbx2.dll [Size: 1353 KB]
Cddbx3.dll [Size: 1641 KB]
Cddbx4.dll [Size: 269 KB]
Cddbx5.dll [Size: 381 KB]


<<<<< Installed Classic Skins (.wsz Extension) >>>>>

None installed


<<<<< Installed Modern Skins (.wal Extension) >>>>>

None installed


<<<<< Installed Skins (.zip Extension) >>>>>

None installed


<<<<< Installed Skins (in a Folder) >>>>>

Bento [Size: 345 KB]
Big Bento [Size: 959 KB]
Winamp Modern [Size: 931 KB]


<<<<< Installed Winamp File Type Icon Libraries >>>>>

None installed


<<<<< Installed Nullsoft Tray Control Icon Packs >>>>>

None installed


<<<<< Summary of installed Plug-ins >>>>>

17 Installed Input Plug-ins
3 Installed Output Plug-ins
3 Installed Visualization Plug-ins
1 Installed DSP/Effects Plug-ins
7 Installed General Purpose Plug-ins
17 Installed Media Library Plug-ins
7 Installed Portable Media Player Plug-ins
6 Installed Encoder Plug-ins

Total: 61 Plug-ins installed


<<<<< Summary of installed Language Files >>>>>

0 Installed Winamp Language Packs (.wlz Extension)
0 Installed Additional Language Files (.lng Extension)

Total: 0 Language Files installed


<<<<< Summary of installed System Files >>>>>

26 Installed Winamp System Components
10 Installed DLL Files in Winamp's Root Dir
26 Installed Gracenote System Files

Total: 46 System Files installed


<<<<< Summary of installed Skins >>>>>

0 Installed Classic Skins (.wsz Extension)
0 Installed Modern Skins (.wal Extension)
3 Installed Skins (in a Folder)
0 Installed Skins (.zip Extension)

Total: 3 Skins installed


<<<<< Summary of installed Visualization Presets >>>>>

552 Installed MilkDrop Visualization Presets
124 Installed AVS Visualization Presets

Total: 676 Visualization Presets installed


<<<<< Summary of installed Miscellaneous Files >>>>>

0 Installed Winamp File Type Icon Libraries
0 Installed Nullsoft Tray Control Icon Packs
17 Installed Nullsoft Signal Processing Studio DSP Presets


<<<<< End of Report >>>>>
Jamil is offline   Reply With Quote
Old 30th March 2013, 13:47   #10
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
I suggest you delete the general purpose plug-in "gen_orgler.dll". That service was discontinued and that plug-in has been shown to cause problems in other areas. I don't think it is related to this issue, but you never know.

Did you see my edit to my last post about not using the query builder and entering the filters directly using the simple mode?

Also, I don't get an error message when I run the Info Tool. Are you running it with Winamp shutdown? Exactly what is the error message?

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 14:01   #11
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Okay -- I will remove the orgler plugin. This was a recent download and install of the latest from the main Winamp website, so I am surprised it is still included in the package.

I did create your last example exactly as you stated in simple mode. This is what my screen shots show:



As soon as I click the OK button above, this is what I see for the smart view:



It is showing every genre that exists in my media library. The only thing from the query being honored is Played Last is empty. This is why I think it is an order of operations issues that the parenthesis is not correcting.
Jamil is offline   Reply With Quote
Old 30th March 2013, 14:13   #12
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Try the rearrangement of filters as listed in post #6.

Orgler is removed in the beta installation package and will be removed from the next stable installation package.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 14:19   #13
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Chaging the order now is showing only the genre I specified.

I think this is a bug.

What is the purpose of parenthesis?
Jamil is offline   Reply With Quote
Old 30th March 2013, 14:24   #14
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
To elaborate on what I mean, I have some other smart playlists that match on several genres. It uses OR to do this. It looks like anytime I use OR with AND, I will encounter this problem.

These are not going to work either.
Jamil is offline   Reply With Quote
Old 30th March 2013, 14:29   #15
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
I don't know why changing the order works for you, but glad it does.

Logically both arrangements should work. I have never tried using a parenthesis or the query builder. If a dev, or user with more experience, is monitoring this thread hopefully he/she will shed some light on this issue.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 14:37   #16
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by Jamil View Post
To elaborate on what I mean, I have some other smart playlists that match on several genres. It uses OR to do this. It looks like anytime I use OR with AND, I will encounter this problem.

These are not going to work either.
I suggest trying the same thing (rearranging the filters) until you get a combination that works. But, I agree this should not be necessary.

Anyway, Good Luck in getting your smart views working the way you want.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

Last edited by Aminifu; 30th March 2013 at 16:23.
Aminifu is offline   Reply With Quote
Old 30th March 2013, 16:21   #17
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by Jamil View Post
It's not a case of genre tags being similar to another.
My suggestion to use "Contains" instead of "Equals" in the genre filter was not because of similar tags.

It is not uncommon for an unintentional (and unnoticed) trailing space character to be added at the end of a word or phrase typed into a tag field. If there is a trailing space and the filter value does not have a trailing space (or the reverse) then using "Equals" will not provide a match, but "Contains" will.

Less common is a leading space or an extra space between words. Using "Contains" will also allow a match to a filter value without these extra space characters.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 16:23   #18
lostinsound
Senior Member
 
Join Date: Jul 2009
Posts: 139
Quote:
Originally Posted by Jamil View Post
I created smart views for many genres of music to help prevent hearing the same songs over and over every day when I randomize my playlists. I am having issues that I can't seem to figure out.

Here is my advanced smart view (that does not work correctly):

genre = "Hip-Hop" AND (lastplay >= [30 days ago] or lastplay isempty)

This appears logically correct, but Winamp is including music that has been played less than thirty days ago.

If I get rid of the OR, things work as they should in all test cases:

genre = "Hip-Hop" AND lastplay >= [30 days ago]

genre = "Hip-Hop" AND lastplay isempty

I need to combine lastplay isempty test with the >= 30 days ago test, which is why I need to use OR.

Help please?
If you go back to your original advanced query:

genre = "Hip-Hop" AND (lastplay >= [30 days ago] or lastplay isempty)

I think this will actually display all songs that have been played in the last 30 days and nothing that was played over 30 days ago (as well as the tracks with empty lastplay). Which I don't think is what you want? You only want to display songs that were last played more than 30 days ago correct?

So if you just flip your first OR statement and say:

genre = "Hip-Hop" AND (lastplay <= [30 days ago] or lastplay isempty)

that should work. That should display all songs with genre=Hip-Hop that were either played more than 30 days ago or haven't been played at all.

It does seem a little backwards, but it must be the case that if the lastplay date is after 30 days ago, that means lastplay is a greater value than [30 days ago].
lostinsound is offline   Reply With Quote
Old 30th March 2013, 16:26   #19
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,349
Quote:
It showed me an error about unable to retrieve system components or something.
Could you please post the exact error message in the Info Tool thread?

[Edit] never mind found the bug, thanks for saying that something was wrong.
Koopa is offline   Reply With Quote
Old 30th March 2013, 16:34   #20
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Quote:
Originally Posted by lostinsound View Post
So if you just flip your first OR statement and say:

genre = "Hip-Hop" AND (lastplay <= [30 days ago] or lastplay isempty)

that should work. That should display all songs with genre=Hip-Hop that were either played more than 30 days ago or haven't been played at all.

It does seem a little backwards, but it must be the case that if the lastplay date is after 30 days ago, that means lastplay is a greater value than [30 days ago].
Thanks so much!

This does indeed work with the parenthesis and the AND/OR combo.
Jamil is offline   Reply With Quote
Old 30th March 2013, 17:02   #21
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
To help out others who wish to do this sort of thing, here are examples of all my Smart Playlist queries. Most of the genres are standard except for Urban Crossover (this is a custom genre I created for music in my library such as Brandy, Monica, Ne-Yo, etc.).

These will select tunes in various genres that have not been played in either 15 or 30 days or have not been played at all:

genre = "Hip-Hop" AND (lastplay <= [15 days ago] OR lastplay isempty)


(genre = "New Age" OR genre = "Ethnic" OR genre = "Instrumental") AND (lastplay <= [30 days ago] OR lastplay isempty)


genre = "Reggae" AND (lastplay <= [15 days ago] OR lastplay isempty)


genre = "Classical" AND (lastplay <= [15 days ago] OR lastplay isempty)


genre = "Pop" AND (lastplay <= [30 days ago] OR lastplay isempty)


genre = "JPop" AND (lastplay <= [30 days ago] OR lastplay isempty)


(genre == "Fusion" OR genre == "Acid Jazz" OR genre == "Crossover") AND (lastplay <= [30 days ago] OR lastplay isempty)


For this query, I wanted to mix Jazz with some Classical music (but only if it has a five star rating):

(genre == "Jazz" OR (genre == "Classical" AND rating == 5)) AND (lastplay <= [30 days ago] OR lastplay isempty)


(genre == "R&B" OR genre == "Urban Crossover" OR genre == "Crossover" OR genre == "Reggae") AND (lastplay <= [30 days ago] OR lastplay isempty)


(genre == "JPop" OR genre == "Pop" OR genre == "R&B" OR genre == "Urban Crossover") AND (lastplay <= [30 days ago] OR lastplay isempty)


(genre begins "Electronic" OR genre = "Ambient" OR genre = "Industrial") AND (lastplay <= [30 days ago] OR lastplay isempty)
Jamil is offline   Reply With Quote
Old 30th March 2013, 17:10   #22
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Hi lostinsound,

Can you explain why the simple mode filters suggested in posts #4 and #6 above yield different results?

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 17:14   #23
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Hi Jamil,

Some of your SV queries in post #21 have double "=" signs. Are they required?

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 17:53   #24
lostinsound
Senior Member
 
Join Date: Jul 2009
Posts: 139
Quote:
Originally Posted by Aminifu View Post
Hi lostinsound,

Can you explain why the simple mode filters suggested in posts #4 and #6 above yield different results?
Using the simple mode is equivalent to the original query without the parenthesis like this:

genre = "Hip-Hop" AND lastplay <= [30 days ago] OR lastplay isempty

In that case it just does each one in order. So I think it would always satisfy the first two before going on to the third one. You can visualize it by putting parenthesis around the first two:

(genre = "Hip-Hop" AND lastplay <= [30 days ago]) OR lastplay isempty

So it would include all songs with genre Hip-Hop that were also played over 30 days ago, OR songs where lastplay is empty. So it would end up including all songs with lastplay empty, not just Hip-Hop songs. I think that's why when you switched the order it worked previously because it was like saying:

(lastplay <= [30 days ago] OR lastplay isempty) AND genre = "Hip-Hop".

The first two were satisfied before applying the third. I can't double check all this stuff right now, but I'm pretty sure this is what's happening.
lostinsound is offline   Reply With Quote
Old 30th March 2013, 18:32   #25
Jamil
Member
 
Join Date: Jun 2005
Location: USA
Posts: 95
Quote:
Originally Posted by Aminifu View Post
Hi Jamil,

Some of your SV queries in post #21 have double "=" signs. Are they required?
== tests for equality in the C programming language (also C++ and Java). Winamp supports both = and == for testing equality to help those who write code.
Jamil is offline   Reply With Quote
Old 30th March 2013, 20:47   #26
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by lostinsound View Post
So I think it would always satisfy the first two before going on to the third one.
Ok, thank you. That makes sense and would explain the difference between the two queries.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 30th March 2013, 20:49   #27
Aminifu
Forum King
 
Aminifu's Avatar
 
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
Quote:
Originally Posted by Jamil View Post
== tests for equality in the C programming language (also C++ and Java). Winamp supports both = and == for testing equality to help those who write code.
Ok, so the double "=" is allowed, but is not required. Thanks for the interesting examples of SV queries.

Winamp v5.9.1.10029 - Quinto Black CT v3.6 skin
Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system
Aminifu is offline   Reply With Quote
Old 31st March 2013, 06:16   #28
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 757
Quote:
Originally Posted by Aminifu View Post
Hi lostinsound,

Can you explain why the simple mode filters suggested in posts #4 and #6 above yield different results?
That is a good question. Those Simple Mode filters produce queries that are logically equivalent if the conventional order of operations in Boolean algebra is used. So it is not unreasonable to expect identical results.

I suspect that parentheses are evaluated first, but that the query expression is then processed without regard to the order of operations; perhaps from left to right. By adding the appropriate parentheses to a Simple Query expression, you can force the normal order: first; parentheses, second; AND, last; OR.

I don't know if this is a bug or not, but it is confusing when the Query Language looks Boolean but the conventions are not followed.

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump