Erland i found this old thread;

erland;405411 Wrote: 
> I'm sorry, I forgot about this thread.
> 
> If you like to choose about average BMP numbers, something like this
> might do it:
> > 
Code:
--------------------
  >   > 
  > -- PlaylistName:BPM
  > -- PlaylistGroups:
  > -- PlaylistParameter1:custom:Select BPM:select 
20*floor(customscan_track_attributes.value/20)+10,20*floor(customscan_track_attributes.value/20)+10
 from customscan_track_attributes where 
customscan_track_attributes.module='customtag' and 
customscan_track_attributes.attr='BPM' group by 
20*floor(customscan_track_attributes.value/20)+10 order by 
customscan_track_attributes.value
  > select tracks.url from tracks
  >     join track_statistics on
  >             tracks.url=track_statistics.url
  >     join customscan_track_attributes on
  >             tracks.id=customscan_track_attributes.track and 
customscan_track_attributes.module='customtag' and 
customscan_track_attributes.attr='BPM' and 
customscan_track_attributes.value>='PlaylistParameter1'-10 and 
customscan_track_attributes.value<'PlaylistParameter1'+10
  >     left join dynamicplaylist_history on
  >             tracks.id=dynamicplaylist_history.id
  >     where
  >             audio=1
  >             and dynamicplaylist_history.id is null
  >     group by tracks.id
  >     order by rand()
  >     limit 25;
  > 
--------------------
> > 
> 
> Or if you like to select a free range, you should be able to do
> something like this:
> > 
Code:
--------------------
  >   > 
  > -- PlaylistName:BPM Range
  > -- PlaylistGroups:
  > -- PlaylistParameter1:custom:Select Low BPM:select 
10*floor(customscan_track_attributes.value/10),10*floor(customscan_track_attributes.value/10)
 from customscan_track_attributes where 
customscan_track_attributes.module='customtag' and 
customscan_track_attributes.attr='BPM' group by 
10*floor(customscan_track_attributes.value/10) order by 
customscan_track_attributes.value
  > -- PlaylistParameter2:custom:Select High BPM:select 
10*ceil(customscan_track_attributes.value/10),10*ceil(customscan_track_attributes.value/10)
 from customscan_track_attributes where 
customscan_track_attributes.module='customtag' and 
customscan_track_attributes.attr='BPM' and 
customscan_track_attributes.value>='PlaylistParameter1' group by 
10*ceil(customscan_track_attributes.value/10) order by 
customscan_track_attributes.value
  > select tracks.url from tracks
  >     join track_statistics on
  >             tracks.url=track_statistics.url
  >     join customscan_track_attributes as lowbpm on
  >             tracks.id=lowbpm.track and lowbpm.module='customtag' and 
lowbpm.attr='BPM' and lowbpm.value>='PlaylistParameter1'
  >     join customscan_track_attributes as highbpm on
  >             tracks.id=highbpm.track and highbpm.module='customtag' and 
highbpm.attr='BPM' and highbpm.value<='PlaylistParameter2'
  >     left join dynamicplaylist_history on
  >             tracks.id=dynamicplaylist_history.id
  >     where
  >             audio=1
  >             and dynamicplaylist_history.id is null
  >     group by tracks.id
  >     order by rand()
  >     limit 25;
  > 
--------------------
> > 
> 
> I don't have BPM tags in my own library at the moment, so I've no way
> to verify if this works or not. 
> 
> There is also a "bpm" column in the standard "tracks" table, if this
> is filled when you have bpm tags it should be possible to do all this
> completely without Custom Scan. In this case the playlist SQL will
> also be a bit simpler.

It is working for my flacs now after an customscan.
But can you add one extra playlistparameter for me about intesity.
So i can choose an range of the BPM and the intensity of it.

You would make me a happy guy.

Ewreck


-- 
ewreck

http://www.last.fm/user/phvdlinden
------------------------------------------------------------------------
ewreck's Profile: http://forums.slimdevices.com/member.php?userid=18665
View this thread: http://forums.slimdevices.com/showthread.php?t=80304

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to