MLItunes / MLXMLobby Cross Search

In this forum you can share tips and tricks on how to use Cinemar products with some program or a task that you want it to do. So no one has to reinvent the wheel if you already did! (No questions in this forum only solutions, questions will be deleted without hesitation.)

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

MLItunes / MLXMLobby Cross Search

Postby ronsatter » Wed May 27, 2009 4:25 pm

Hi gang,

For those of you who have MLITunes and MLXMLobby, here's an example of how to integrate both in a practical way.

Often when I listen to XM Radio channels, I'm reminded of other songs by the current XM artist. So I created a button on my XM Radio "Now Playing" scene called "Search Artist". See Fig 1.

It triggers a macro "Radio_Search_Artist":

Macro|
SetVariable|Search_Name~ALBUM!
MLITunes|{{{{clientname}}_selected_Itunes}}~SearchArtists!
MLITunes|{{{{clientname}}_selected_Itunes}}~SearchSelect~{{xmcurrentartist}}!
MLCmd|{{clientname}}~loadOverlayAdvanced|itunes_search_album.mls~1


The last command in this macro will differ for you. It is loading a custom ITunes "Search Results" layer on my scene. The key lines of code are:

MLITunes|{{{{clientname}}_selected_Itunes}}~SearchArtists!
MLITunes|{{{{clientname}}_selected_Itunes}}~SearchSelect~{{xmcurrentartist}}!


It references the "Current Artist" variable populated by MLXMLobby - {{xmcurrentartist}} ... then searches MLItunes for all albums by that artist you may have in your ITunes library. See Fig 2.

The MLItunes "Search Results" scene displays, allowing you to choose an album to view and/or play. See Fig 3.

Although my scenes shown in this example are all custom, hopefully you can take this idea and adapt it to fit your own scenes.

Also, if you're curious about the large partial "Current Artist" text appearing in the snapshots, some horizontal ... some vertical, the text object is "Text.Marquee". This scrolls text from right to left through the text object.

See Fig 4.

In this example, I used the font "FuturaTMed" at a size of 120 and the alpha set to 10 %. The font color is black. To get it extra large, I set the graphic size to 200%.

Here is what is in the lable field:

{{MLItunes_{{{{clientname}}_Selected_ITunes}}_Current_Track_Artist}}~300~140~1

The numbers at the end set the object width and height, and the last number is the scroll speed (1 is slowest).

With some thought to your graphics layering, you can position and size the Text.Marquee to appear to reveal and hide under layers. Notice how in my example, the left edge of the text marquee is positioned at the right edge of the "Album Cover" graphic. This provides the illusion of the text marquee disappearing under the "Album Cover" graphic. The right edge of the text marquee is placed at the left of a vertical panel, thus appearing to start from beneath the panel.

Whenever the MLItunes or XM Radio "Now Playing" scene is displayed, the "Current Artist" marquee scrolls continually in a loop until you exit the scene. I especially like the effect when the song changes ... the marquee text updates with the new artist name. Pretty cool.8)

It's all "Smoke & Mirrors" as we say in the media biz, but adds a little classy pizazz to a scene.

Enjoy!

Ron
You do not have the required permissions to view the files attached to this post.
Last edited by ronsatter on Thu May 28, 2009 2:29 pm, edited 2 times in total.
If it ain't broke ... don't fix it!

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Thu May 28, 2009 7:53 am

Nice work Ron!
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Thu May 28, 2009 5:12 pm

Ron,

U da man!

I might use that if you dont mind.

Later
J.J. Jukebox
Member

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Thu May 28, 2009 7:58 pm

jjjukebox wrote:I might use that if you dont mind.


Thanks Jim. Anytime!

That's why I like to contribute. It's fun to see how others take an idea like this and improve on it. Go for it ...

Ron
If it ain't broke ... don't fix it!

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Thu May 28, 2009 9:37 pm

Tested this in my MLItunes scenes and I am beta testing Music Lobby 375 and got this to work in it as well. Will probably scrap my MLItunes if all goes well.

Basically a command map assigned to my Search Artist button HomeTek.XMGallery.SearchLibrary (my scene names are unique):
Macro|
MLMusicLobby|{{music_activemusicsourcenumber_{{clientname}}}}~SearchArtists!
MLCmd|{{clientname}}~loadOverlayAdvanced|Music Gallery - Search.mls~4!
MLCmd|{{clientname}}~loadOverlayAdvanced|Music Gallery - Search Results Album.mls~3!
MLMusicLobby|{{music_activemusicsourcenumber_{{clientname}}}}~SearchSelect~{{xmcurrentartist}}

This sets MLLobby search to "by artist", loads appropriate search scenes then you select one of the current XM artist's albums to look at all the track names.

Later
J.J. Jukebox

Member

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Fri May 29, 2009 12:05 am

I'm glad to know that this will work with the new MusicLobby. I thought it might, since much of the new MusicLobby is based on the MLItunes model.

That means less retrofit when I switch back from MLItunes to MusicLobby. :)

Ron
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Wed Jun 10, 2009 12:11 pm

I added a line of code to the macro to display a message box if the "Search Artist" command returns empty.

It uses MLConditional to check the MLItunes variable "{{{{clientname}}_mlitunes_{{{{clientname}}_selected_Itunes}}_Search_Item_Count}}"

If it is "0", then the message box is displayed. See Fig 1

Here's the updated macro.

"Radio_Search_Artist"

Code: Select all

Macro|
SetVariable|{{clientname}}_mlitunes_{{{{clientname}}_selected_Itunes}}_Search_Text~{{xmcurrentartist}}!
MLITunes|{{{{clientname}}_selected_Itunes}}~SearchArtists!
MLITunes|{{{{clientname}}_selected_Itunes}}~SearchSelect~{{xmcurrentartist}}!
MLPause|.5!
MLConditional|isEqual##{{{{clientname}}_mlitunes_{{{{clientname}}_selected_Itunes}}_Search_Item_Count}}##0##MLCmd|{{clientname}}~loadOverlayAdvanced|itunes_search_alert.mls~1##MLCmd|{{clientname}}~loadOverlayAdvanced|itunes_search_album.mls~1


This code uses a custom scene for the message box. If you prefer, you can use ML's Message Box. Check the wiki ... I can't recall the correct command syntax.

The custom scene referenced in the macro above is named "iTunes_Search_Alert" and is loaded into layer 1. It uses the variable {{xmcurrentartist}} to display the name of the artist not found. The remaining lines of text do not use any ML variables, because I use a dedicated scene for this alert message and the message is always the same. The "Close" button dismisses the message scene layer and returns to my XM Radio "Now Playing" scene.

Maybe overkill for some users ... but I like lots of simple feedback on my screens.

Enjoy!

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Wed Jun 10, 2009 1:05 pm

Cool.

Yours is a lot prettier than the one I initially set up.

Had to search hard fr an artist I did not have!

Later
You do not have the required permissions to view the files attached to this post.
J.J. Jukebox

Member


Return to “Tips, Tricks and Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests