Create a QlikView Music Player

QlikView Music Player - Featured Image - Piano with a Green Key

Why Would we Build a QlikView Music Player?

This is a “just because I can” post. I use QlikView in all sorts of personal applications from reviewing my investment accounts to analyzing my workout performance. I thought it would be clever to create a QlikView Music Player app that sorts through my music collection and even plays tracks.

One obvious limitation of this app is that we can only look at music stored in accessible folders so as most of us move to cloud solutions for music, this becomes less usable. I have mostly switched to Amazon Prime and Pandora, but I still have local digital copies of most of my music.  Either way, this is a fun little app and illustrates a few tips we might use to create other use cases.

You can download this app here:  Music Player.qvw

To load your own collection into it, simply change the path in line 121 and reload.

[qlikview]CallScanFolder(‘\\HOME_MEDIA\Users\Aaron\Music’);[/qlikview]

How Can You Do It?

There are a few simple tricks to create this app that are probably worth mentioning for those of you that want to know…

Firstly, most of us with local digital music would store it in folders by artist and then by album. Because of that, we need to direct QlikView to a root folder and then have it go through all of the subdirectories looking for mp3 files. To do that, you can refer to an earlier post regarding Looping Through Files.

Next, there is a neat trick in the QlikView script that is already built in to pull the metadata from mp3 files. Go to the script editor, hold Ctrl and then press Q, M, P, 3 in sequence (Ctrl+Q,M,P,3). This will create script automatically that pulls metadata from mp3 files.  Just for reference, there is a shortcut for jpg files (Ctrl+Q,J,P,G) and a shortcut for wma files (Ctrl+Q,W,M,A).

The final trick is to create the mechanism to get a file to play. We use the info prefix on a resident load to attach the path and file name to the corresponding key field in the QlikView data model. Then we can use a list box on the front end to initiate. When only 1 possible track is associated or selected, the info icon appears in the caption, allowing us to execute (play) the track. This technique could be also used to open pdf’s or images.

QlikView Music Player - Track Listing

I did not bother creating an extensive front end on this. We could have created something very fancy that counts tracks by genre, for example. I took a look at some of the genres and it looks like there are lots of corrections to make in the data so this at least is useful for locating metadata issues.

QlikView Music Player - List Boxes to fine-tune your play list

Limitations

  • As mentioned above, this can currently only be used on music where you have directory visibility. Until some of these cloud services publish API’s we cannot apply to our online collections.
  • You must have either Windows Media Player or another music player loaded on your machine and set up as the default program to open MP3 files.
  • If you publish this app on a server, the playing of tracks can only be done with the IePlugin. The info icon we use to execute the playing of a track will not function with the AJAX client.

Vision

I tried to migrate this script to Sense and did not have luck getting it to run. I didn’t spend too much time on it but it appeared that it was not looping through the directories. I am also not sure what it would take to get Sense to play a track (execute a file). Maybe somebody wants to take this on as a project? –> Have discovered that this is due to inability to process variables in the connection paths. Can be resolved by disabling standard mode.

I hope you enjoy the QlikView Music Player. Do you have ideas on this topic? I would love to hear them.

5 comments… add one
  • Reply Steve Dark March 20, 2015, 2:11 pm

    Thanks for sharing Aaron. I created an app like this some time ago – but nothing polished enough to share! I used it more for tidying my collection – looking for tracks that existed in more than one place.

    As you touch on briefly QlikView is also excellent with image files, as you can pull all the meta data – details such as what camera was used and the GPS position of images. The display of dynamic images is also good – though you have to be careful showing thumbnails of hi-res images as showing too many causes things to slow up quite a bit.

    Steve

  • Reply Aaron Couron March 20, 2015, 4:04 pm

    Thanks for the comment Steve. It would be really cool for somebody to take this a step further by adding input boxes with macros that would actually allow editing of the metadata from inside QlikView. Then this would be REALLY useful for both music and pictures.

  • Reply Wilbert Klinton July 23, 2015, 4:48 pm

    Ir’s seems interesting. I will try it as soon as possible. It looks very amazing to hear. I think to have fun with this player.
    QliKView

  • Reply boopesh July 1, 2016, 1:15 pm

    Thanks for sharing different ideas.
    The links to download are throwing some junk files. Are there different ways to use it. Guide me if I am wrong. Correct the links it would help us understand better.

    Regards,
    Boopesh

  • Reply Aaron Couron August 27, 2016, 2:40 pm

    Boopesh,
    Sorry for delay in reply. My site builder has some issues which means that the downloads are renamed to some gibberish but the files are still good. I added a note to the page that says to rename the file and add a qvw extension and then you should be good to go. Sorry about the inconvenience.

Leave a Comment

Join us at Living QlikView

Never miss a post.

We Never Spam. NEVER.

Show Buttons
Hide Buttons