From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-22-2009 06:32 AM
I have implemented the WMP apllication into labview with the ActiveX object and also loaded my desired playlist (which I earlier saved with the WMP under C:\Songs\myplaylist.wpl) through writing a constant string into the URL. So far so god. I want now to load all the songnames from this play list into my labview program. The best would be to use a WMP-Methode which delivers me a 1D Stringarray with all the songs which are in this playlist. I experimented with the Classes "Current Media" and "Current Playlist" but unfortenately, I was not able to get all the songs of this play list at once.
Can somebody help me out?
06-23-2009 02:33 AM - edited 06-23-2009 02:38 AM
Hi Serdj,
see the attached example.
Mike
02-24-2010 08:15 AM
Thanx for your help Mike - it did solve my problem.
Now i have a new problem: When I load a playlist and use Mikes little program to read the songnames, I get the title names of all the songs, which is also what I want. As soon as this is done I start continously reading the following informations during WMP is playing - actual time, duration and name of the song.The problem is with the name-string and the duration-valure. If the WMP is in stop mode, I get the filename for the name-string and a 0 for duration. As soon as the player is playing the song, the name-string switches automaticly to the title and i get the correct duration time. I want always to get the title name and the correct duration, even when the WMP is in stop mode. Is this somehow possible?
This is how i read the songinformations:
02-25-2010 01:35 AM
Hi Serdj,
i think in "StopMode" the currentItem Refnum is empty, so you can't read anything from it.
How do you change between RUN and STOP?
Can you post your vi?
Mike
02-25-2010 06:01 PM
Hello Mike. I made a simple WMP LabVIEW program which is attached to this thread. As soon as i load a mp3-song (with the load-button) I get the file-name as the song-name and a 0 for duration. After I press play (on the WMP play button) this 2 informatins change. The songname is suddenly the title and the duration has a correct value. I can use some mp3-editing tool like mp3tag to change the title of a mp3 song, so that the filename and the title have same names. But it is not a nice solution. And there is still the problem with the duration value which is 0 in the begining.
I realized that your liddle program (attached in your first reply) gets the title-names and not the filenames, while going through that loop. I could use the "item" method of the "IWMPPLaylist Class" like you did in your for-loop. In order to do that, I need to know exactly which songnumber of a songlist is beeing played, as the "count" value for that method. How can I get that information? This would solve at least the "filename - titlename" problem. But I still dont know what to do with the duration problem?!?
02-09-2011 01:57 PM
Is it possible to have the WMP playlist in LabVIEW like it is at the WMP usually. Where you double-click the song you want to be played? That would be awsome!
02-10-2011 12:16 AM
Hi Serdj,
yes i think it's possible. You can use an Event Structure to get the double click event and react on it.
Mike
02-10-2011 04:25 AM
Mike, if you tell me how, I will go to my church and ask for a blessing of Mike´s soul !!!
02-10-2011 05:51 AM
Hi Serdj,
see the attached example.
Mike
02-12-2011 09:33 AM
Mike thanks a LOT!
I am now able to get the songnumber which has to be played using your double-klick method (i didnt know about it earlier since I am a beginner). Now that I have the number as an I32, how do I tell WMP to play that song number? Which method is this? I am trying all different thing all day, but cant find a solution. I just want to tell WMP to play a certain songnumber (playlist has been uploaded at the beginning through the class "currentPlaylist->URL ").