INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: IsPlaying() = IsAwesome() :D  (Read 11524 times)

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
IsPlaying() = IsAwesome() :D
« on: May 03, 2010, 01:22:07 pm »

Thanks for adding IsPlaying() - I've been requesting this functionality since MC11 I think...  Finally I can update my Voting views to include the currently playing track.  Previously I could only include the last played track which meant voting after the fact, not while a track was playing, but now I can access the currently playing track in my smartlists/views the final piece of that puzzle is complete.

MC15 purchased.

Cheers,

Mark
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4583
Re: IsPlaying() = IsAwesome() :D
« Reply #1 on: May 03, 2010, 05:02:19 pm »

sweet isnt it. i made some plug to do something like that way back. but im also really happy. besides what you said,one thing i like is that when i play radio/some mixed smartlist, i can just press a button on my remote when some song comes along that i want to hear the whole album from...

very nice addition indeed.

 :)
gab
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
Re: IsPlaying() = IsAwesome() :D
« Reply #2 on: May 04, 2010, 04:30:32 am »

Just added a smartlist that pulls out all the tracks with the same name as the isplaying() track.  This allows me to find all versions, especially live versions and covers of a track, for comparative rating.  Note I'm using some expression fields to massage the track names into shape for comparisons and also to provide the >>>>> highlight.  For me, this is the sort of power that sets MJ apart from it's peers.

Mark


Logged

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: IsPlaying() = IsAwesome() :D
« Reply #3 on: May 04, 2010, 09:01:32 am »

That's pretty neat!  Could you share the how-to details with we smartlist-challenged folks?   ;)
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
Re: IsPlaying() = IsAwesome() :D
« Reply #4 on: May 04, 2010, 10:17:26 am »

I'll try!

I have a bunch of different views that show the current track against various sets of data: the entire library, artists of the same genre, my favourite artist (Yes) so that I can make strong comparative ratings, the artist's other tracks and the new one all tracks of the same name.

The final view (above) is a combination of a few smartlists and there are a number of distinct parts to the view.  I'll document my view that pulls tracks of the same genre as the one playing.

First, I have set up a user library field called IsPlayingNow, which contains the expression:

=isplaying()

It simply returns a 1 or 0 but allows the isplaying() function to be used in smartlists, eg to create a sublist containing only the playing track as you will see.

The 'Playing' column is an expression column with the following expression:

if(isequal(isplaying(),1),>>>>>>,)

The final view is:

([IsPlayingNow]=[1] or playlistid==1) ~sort=[My Rating]-d

smartlist 1 is:

playlistid==2 ~mix=20,10,[my rating]=10,18%,[my rating]=9,16%,[my rating]=8,14%,[my rating]=7,12%,[my rating]=6,10%,[my rating]=5,8%,[my rating]=4,6%,[my rating]=3,4%,[my rating]=2,2%,[my rating]=1 ~sort=[My Rating]-d

What we see here is the creation of a sublist from smarlist 2 which is sorted by the track rating and is a mix of ratings with more highly rated
tracks than lower rated tracks in the list.  The field [my rating] is my own user rating field that allows me to rate tracks 1-10

The idea here is that it gives you the full range of ratings to compare the playing track against.

smartlist 2 is:

([IsPlayingNow]=[1]  or [Media Type]=[Audio]) ~sort=[IsPlayingNow]-d ~limit=1,-1,[genre]

Here we see the IsPlayingNow field in action.  This smartlist adds the now playing track to the entire database, sorted so that the IsPlayingNow track is at the front of the list and then it limits the output to only the 1 genre, and which genre is first?  The nowplaying track, so the entire sublist is of the same genre. (I use the same trick to generate lists of the same artist, track name etc)

OK, so first we generate a list of tracks of the same genre, based on the now playing track.  Then we create a small mix of rated tracks from that list.  Then we once again add the nowplaying track to that list and sort by rating.  This is displayed along with the Playing expression column to get the view you see.

Going back to the final view expression:

([IsPlayingNow]=[1] or playlistid==1) ~sort=[My Rating]-d

Notice the OR construct here which is used to add the currently playing track to the results of the playlist.

EASY :D

The view that compares like track names has to handle various postfixes to the trackname, eg [live] etc.  I simply created user fields containing expressions that strip the postfixes from the [name] field leaving just the a-z text - this allows all tracks of the same name to be filtered out in the same way as the genres above, just using my library field in place of genre.

Questions?

Mark
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: IsPlaying() = IsAwesome() :D
« Reply #5 on: May 04, 2010, 10:51:13 am »

What formula did you use to create Album Rating?  That would be incredibly useful.
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
Re: IsPlaying() = IsAwesome() :D
« Reply #6 on: May 04, 2010, 10:55:11 am »

That's external processing.  I dump the entire database in MPL format and have some PERL scripts run over it.  These generate a new file, including an ALBUM RATING field, and then I import the entire database back in.  The result is that the ALBUM RATING field is updated and everything else stays the same.

I wish we could do album work within MJ, but until then...

Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4583
Re: IsPlaying() = IsAwesome() :D
« Reply #7 on: May 04, 2010, 11:05:13 am »

impressive smartlist construction mark.  :)

That's external processing.  I dump the entire database in MPL format and have some PERL scripts run over it.  These generate a new file, including an ALBUM RATING field, and then I import the entire database back in.  The result is that the ALBUM RATING field is updated and everything else stays the same.

I wish we could do album work within MJ, but until then...


you could make a script inside mc to do that. or that is how i do that. mr chriz made a plugin to make your own script fairly easy..

 :)
gab
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: IsPlaying() = IsAwesome() :D
« Reply #8 on: May 04, 2010, 09:04:30 pm »

Thanks for this, Mark. I'm not willing to hurt my brain handling ratings this way, but I was able to understand how to do something somewhat simpler. I created what I call an "Artist PN" view, using your technique to display all the tracks of the artist currently playing. The list is sorted by year, so it gives me some perspective of where the current track fits in the artist's work (in my collection). I've included the expression column =If(IsInPlayingNow(),♪,) to flag the tracks in PN. The playing track is in bold, which is obvious enough for me.

This is fun to use with Radio play. One drawback is the view doesn't refresh when the artist changes. That doesn't matter much to me, as the primary purpose of this is for my amusement in Theatre View. For that, I've programmed my remote to refresh when I skip tracks and as required. Another problem is a zone cannot be specified with the function. The view can be rather confusing if something is playing in another zone. :P

These views not only offer something more interesting to look at while listening. I can easily select a different track by the same artist, and Play (Radio). Or abandon Radio play and Play (All). It's also interesting playing any kind of "Top 100" list and having the other tracks by the currently playing artist that also made the list flagged. Hmmm. Seems I have more work to do—I need an "Album PN," "Similar to PN,"... 8)
Logged

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: IsPlaying() = IsAwesome() :D
« Reply #9 on: May 05, 2010, 12:15:21 am »

Thanks Mark!  That's incredibly useful!

I really appreciate the time you took to type that out.
Logged

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: IsPlaying() = IsAwesome() :D
« Reply #10 on: January 24, 2011, 06:16:25 pm »

Mark -

Part of this ended-up in my 'to-do' pile and, well... errr...

A recent board post reminded me.  One more question.  :)

The view that compares like track names has to handle various postfixes to the trackname, eg [live] etc.  I simply created user fields containing expressions that strip the postfixes from the [name] field leaving just the a-z text -

Questions?


Could you share these user field expressions?  I made several attempts way back then and couldn't cover them all (mostly parentheses and brackets... but some dashes too).

Thanks again!
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
Re: IsPlaying() = IsAwesome() :D
« Reply #11 on: January 25, 2011, 02:01:26 am »

Here are the rules I use to strip postfixes, eg (disc 1), [live] etc from [album] and [name].  I'm sure there is a more elegant way, but these work for me.  Just add a user library field and add these expressions as the calculated field.

Album (no postfix)
=if(isequal(left([album],1),(,1),[album],if(isequal(left([album],1),[,1),[album],if(isequal(listcount([album],(),1,5),clean(ListItem([album],0,()),if(isequal(listcount([album],[),1,5),clean(ListItem([album],0,[)),[album])))

Name (no postfix)
=if(isequal(left([name],1),(,1),[name],if(isequal(left([name],1),[,1),[name],if(isequal(listcount([name],(),1,5),clean(ListItem([name],0,()),if(isequal(listcount([name],[),1,5),clean(ListItem([name],0,[)),[name])))

Enjoy,

Mark

Logged

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: IsPlaying() = IsAwesome() :D
« Reply #12 on: January 25, 2011, 09:11:19 am »

Thanks!!!
Logged

fredele

  • World Citizen
  • ***
  • Posts: 165
Re: IsPlaying() = IsAwesome() :D
« Reply #13 on: September 10, 2014, 03:41:19 pm »

WOW, I just saw this post and soon realized that I could do with this technique  one of my dream :

Browsing my image files who are stored aside my Music Files (Classified in Folders for each Album).

Just create a Smartlist with this :

([IsPlayingNow]=[1] or [Media Type]=[Image]) ~sort=[IsPlayingNow]-d ~limit=1,-1,[filename (path)] ~sort=[IsPlayingNow] ~limit=1,-1,[Media type] ~sort=[Filename (name)]


Same technique as above, selects the playing track and all images, keeps the images files from the same folder, reverse the sorting to keep the files where's no "IsPlayingNow" tag (keeps the images, puts away the current playing audio track ..), sorts by filename.


Now, I simply push play, and  I can launch this playlist to view the booklet images and back cover ! Wonderfull ! 8)

The only problem who remains is when I press stop, I got some files showing, because I do not know how to put an IF statement in the expression, if possible, any suggestion ??

By the way, is there a thread somewhere where everybody could put his discoveries on expressions rathen than searching all over the forum ?

Thanks !

(Sorry for my approximate language ... )

 
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1855
Re: IsPlaying() = IsAwesome() :D
« Reply #14 on: September 11, 2014, 08:01:53 am »

You can put most logical statements inside smartlists using custom fields, eg

[=if(isequal(a,b))]=1

The statement inside the [] is evaluated and the result can then be tested in the smartlist.
Logged
Pages: [1]   Go Up