ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I play MP3 files within Labview?

Hello,

Is it possible to play MP3 files within labview? I know you can play a wav, but is there anything I can modify within the wave playing VI so I can play mp3's?

Thanks
0 Kudos
Message 1 of 9
(11,111 Views)
Hi
You can download the Gamp mp3 player from this link:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBC8F111EE034080020E74861

Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 2 of 9
(11,101 Views)
Could you use an Active X container to execute Windoze media player?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 9
(11,070 Views)
AnalogKid2DigitalMan

I took a look at the example that "alipio" pointed out and it uses the windows media player... so I guess the answer to your question is yes. 🙂
0 Kudos
Message 4 of 9
(11,053 Views)
I neglected to look at the link. I remeber in LV Intermediate class we did an example with Active X and WMP.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 9
(11,042 Views)
with gamp, How can I have it automatically load a playlist that I want? For my project I want to input a mood, and based on that mood, I want GAMP to play a specific list of songs (i.e. a playlist)

Thanks

Hooman
0 Kudos
Message 6 of 9
(11,006 Views)
Hi
I do not use Gamp nor player1. I know they play wav, mp3, etc using activeX, but can´t help in your work.

You can download player1 and see if fits better in your project.
Link: http://ibme.mc.ntu.edu.tw/labview/cgi-bin/download/files/
File: playe1.vi.

Hope it helps
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 7 of 9
(10,991 Views)

Is this thread updated ...LOL

0 Kudos
Message 8 of 9
(8,150 Views)

Although the code I'm posting below is dreadful, it shows a simple example I put together quickly.

 

Information about the Windows Media Player COM Object can be found at this MSDN link.

 

The code below is a VI Snippet. It can be dragged and dropped into a blank block diagram. You might need to re-insert the WMP ActiveX Object (they can be annoying - I don't know) by right clicking on the container and selecting Insert Object...

 

wmp-playlist-list.png

 

Take care to close the appropriate references (I haven't!) and use the appropriate combination of Invoke Nodes and Property Nodes to find information or set/get values from the references you acquire.

 

Here, I get a 'playlistCollection' object and then getAll. You could instead getByName and pass the name of a string. I'm pretty confident there will be a way from there to start playing the playlist object reference returned!

 


GCentral
Message 9 of 9
(8,137 Views)